Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

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)\color{orange}p\left(x\right)

Suppose that we have a random variable XX that can take on any value x∈[a,b]x\in\left[a,b\right]

Then the criteria for the probability density function are

  • p(x)≥0p(x)\ge0 for all xx
  • ∫abp(x)dx=1\int_a^bp\left(x\right)dx=1 (total area under the curve is 1)

→\toProbability that X takes on a value between a1a_1 and a2a_2 is ∫a1a2p(x)dx\int_{a_1}^{a_2}p\left(x\right)dx



Cumulative Distribution Function (CDF) F(x)\color{orange}F\left(x\right)

The cumulative function represents the probability that the random variable takes on a value in the range (a,x)(a,x)

  • F(x)=∫axp(s)dsF(x)=\int_a^xp\left(s\right)ds
  • F(x)F\left(x\right) is an increasing, continuous function
  • By the Fundamental Theorem of Calculus I, F′(x)=p(x)F'\left(x\right)=p\left(x\right)
  • By the Fundamental Theorem of Calculus II, F(a2)−F(a1)=∫a1a2p(x)dxF\left(a_2\right)-F\left(a_1\right)=\int_{a_1}^{a_2}p\left(x\right)dx
  • Important properties: F(b)=1F\left(b\right)=1 and F(a)=0F\left(a\right)=0



Practice: PDF

Given the probability density function p(t)=k(1−t2)p\left(t\right)=k\left(1-t^2\right) for 0≤t≤10\le t\le1,

a. determine the value of kk such that p(t)p\left(t\right) is a proper probability density function.

b. what is the probability that t<0.5t<0.5?

c. find the cumulative distribution function F(t)F\left(t\right).

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: CDF

Find a, b, and k such that this is a valid cumulative distribution function

F(x)={ax<0k arctan⁡x0≤x<1bx≥1F\left(x\right)= \begin{cases} a&x<0\\ k\ \arctan x&0\le x<1\\ b&x\ge1 \end{cases}

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Mean, Median, and Variance

Suppose we have a probability density function p(x)p\left(x\right) defined for a random variable on the interval a≤x≤ba\le x\le b


Mean (Expected value)

μ=x‾=∫abx p(x)dx\displaystyle \mu=\overline{x}=\int_a^bx\ p\left(x\right)dx

*This is like the weighted average


Median

The median xmedx_{med} is a value in the interval a≤xmed≤ba\le x_{med}\le b such that

∫axmedp(x)dx=∫xmedbp(x)dx=12\displaystyle \int_a^{x_{med}}p\left(x\right)dx=\int_{x_{med}}^bp\left(x\right)dx=\frac{1}{2}

(i.e. F(xmed)=12F\left(x_{med}\right)=\frac{1}{2})



Variance

The variance VV is the "average square distance between the mean and the whole distribution"

V=∫ab(x−μ)2p(x)dx\displaystyle V=\int_a^b(x-\mu)^2p(x)dx


Standard deviation

The standard deviation σ\sigma is the "average distance between the mean and the whole distribution". It is just the square root of the variance

σ=V\sigma=\sqrt V

Moments


Image illustrating Mean, Median, and Variance


Practice

The flight altitude xx of a certain bird (measured from the ground) is given by the probability density function p(x)=5e−3xp(x)=5e^{-3x} for x≥0x\ge0.

a) What is the average altitute HavgH_{avg}?

b) What is the probability that a bird's flight altitude is higher than 3?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: Median

Which of the following PDFs has the largest median?

Illustration for practice question: Practice: Median



Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors