
Random Variables, PDFs, CDFs
A random variable is a variable whose values depend on the outcomes of a random experiment – we don’t know for sure the probability of a certain outcome occuring, but we can determine the probability for the occurrence of any particular outcome
A continuous random variable can only take on any values within a certain range
- Example: height of a randomly selected student at UBC
- Example: time it takes for a randomly chosen student to write their MATH exam
Probability Density Function (PDF) p(x)
Suppose that we have a random variable X that can take on any value x∈[a,b]
Then the criteria for the probability density function are
- p(x)≥0 for all x
- ∫abp(x)dx=1 (total area under the curve is 1)
→Probability that X takes on a value between a1 and a2 is ∫a1a2p(x)dx
Cumulative Distribution Function (CDF) F(x)
The cumulative function represents the probability that the random variable takes on a value in the range (a,x)
- F(x)=∫axp(s)ds
- F(x) is an increasing, continuous function
- By the Fundamental Theorem of Calculus I, F′(x)=p(x)
- By the Fundamental Theorem of Calculus II, F(a2)−F(a1)=∫a1a2p(x)dx
- Important properties: F(b)=1 and F(a)=0
Practice: CDF
Find a, b, and k such that this is a valid cumulative distribution function
F(x)=⎩⎨⎧ak arctanxbx<00≤x<1x≥1

Mean, Median, and Variance
Suppose we have a probability density function p(x) defined for a random variable on the interval a≤x≤b
Mean (Expected value)
μ=x=∫abx p(x)dx
*This is like the weighted average
Median
The median xmed is a value in the interval a≤xmed≤b such that
∫axmedp(x)dx=∫xmedbp(x)dx=21
(i.e. F(xmed)=21)
Variance
The variance V is the "average square distance between the mean and the whole distribution"
V=∫ab(x−μ)2p(x)dx
Standard deviation
The standard deviation σ is the "average distance between the mean and the whole distribution". It is just the square root of the variance
σ=V
Moments

Practice
The flight altitude x of a certain bird (measured from the ground) is given by the probability density function p(x)=5e−3x for x≥0.
a) What is the average altitute Havg?
b) What is the probability that a bird's flight altitude is higher than 3?
Practice: Median
Which of the following PDFs has the largest median?
