STAT 400

Wed. February 26th, 2020


Continuous Random Variables

We call a random variable XX a continuous random variable if it satisfies these two properties:

Instead of studying cases of P(X=0)P(X=0), we instead focus on P(aXb)P(a\le X\le b). Using "\le" and "<<" is equivalent for continuous random variables, unlike the discrete case.


Ex. Consider a chance wheel. Let XX be the angle that the arrow is pointing to after the wheel is spun. In this case, XX can take any value on the interval [0,2π)[0,2\pi), so it’s continuous.

You can see how it’s pointless to ask what the probability is that XX lands exactly on a specific angle, since it’ll always be 0. Instead, we can calculate expressions like: P(0Xπ)=12=π2πP(aπXbπ)=(ba)π2π=ba2P(aπX)=P(aπX2π)=2a2\begin{aligned} P(0\le X\le \pi)&=\frac{1}{2}=\frac{\pi}{2\pi}\\ P(a\pi \le X\le b\pi)&=\frac{(b-a)\pi}{2\pi}=\frac{b-a}{2}\\ P(a\pi \le X)=P(a\pi \le X \le 2\pi)&=\frac{2-a}{2} \end{aligned}


Probability Density Function

We can add together the probabilities of XX being in consecutive intervals to get the probability of XX being in the union of the two intervals: P(a1Xa2)+P(a2Xa3)=P(a1Xa3).P(a_1\le X\le a_2)+P(a_2\le X\le a_3)=P(a_1\le X\le a_3). Integrals also have this property as well, so it could be useful to find a way to represent our probabilities using them.

We’re looking for a function ff such that, for any aba\le b, P(aXb)=abf(x)dx.P(a\le X\le b)=\int^{b}_{a}f(x)dx. We call ff the probability density function (pdf), probability distribution, or density curve of XX. This turns out to be the analogue of the probability mass function for continuous random variables.

Most of the continuous distributions we’ll study don’t really have easy-to-explain motivations behind them, but we can still start with a pdf function and derive all other properties from there (expected value, variance, cdf).


Ex. Going back to our chance wheel example, P(a1Xa2)=a2a12πP(a_1\le X\le a_2)=\frac{a_2-a_1}{2\pi} for 0<a1<a2<2π0< a_1< a_2< 2\pi.
In this case, the probability density function f(x)f(x) for XX should be f(x)={12πx[0,2π)0otherwisef(x)=\begin{cases} \frac{1}{2\pi}&x\in[0,2\pi)\\ 0&\text{otherwise} \end{cases}


PDF Remarks

  1. f(x)0f(x)\ge 0 for all xx.
  2. f(x)dx=1.\int_{-\infin}^{\infin}f(x)dx=1.
  3. P(X=a)f(a)P(X=a)\ne f(a), don’t mess this up!
  4. P(a12ΔXa+12Δ)Δf(a)P(a-\frac{1}{2}\Delta \le X\le a+\frac{1}{2}\Delta)\approx \Delta f(a)

Arbitrary PDFs

Ex. Suppose the pdf of a random variable XX is f(x)={kx20x20otherwisef(x)=\begin{cases} kx^2&0\le x\le 2\\ 0&\text{otherwise} \end{cases}

  1. What is kk? We know that the integral over all values of f(x)f(x) has to equal 11. f(x)dx=02kx2dx=13kx302=83k=1k=38.\begin{aligned} \int_{-\infin}^{\infin}f(x)dx&=\int_0^2 kx^2dx\\ &=\frac{1}{3}kx^3\big|_0^2\\&=\frac{8}{3}k=1\\&\rightarrow k=\frac{3}{8}. \end{aligned}
  2. Calculate P(X1)P(X\le 1). P(X1)=1f(x)dx=0138x2dx=18x301=18.\begin{aligned} P(X\le 1)&=\int_{-\infin}^1 f(x)dx\\ &=\int_0^1 \frac{3}{8}x^2dx\\& =\frac{1}{8}x^3\big|_0^1=\frac{1}{8}.\\ \end{aligned}

Uniform Distribution

Definition. A continuous random variable XX is said to be a uniform distribution on an interval [A,B][A,B] if its probability density function is f(x;A,B)={1BAx[A,B]0otherwisef(x;A,B)=\begin{cases} \frac{1}{B-A}&x\in[A,B]\\ 0&\text{otherwise} \end{cases} Here, we say XX follows unif(A,B)\text{unif}(A,B).

(Note that our chance wheel example from before follows this distribution.)