Continuous Random Variables
We call a random variable X a continuous random variable if it satisfies these two properties:
- X can be any value on an entire interval (like [0,1] or (−∞,∞))
- For any a, P(X=a)=0. (This is like taking an integral of a function over an empty interval – the result will always be 0 regardless of the function.)
Instead of studying cases of P(X=0), we instead focus on P(a≤X≤b). Using "≤" and "<" is equivalent for continuous random variables, unlike the discrete case.
Ex. Consider a chance wheel. Let X be the angle that the arrow is pointing to after the wheel is spun. In this case, X can take any value on the interval [0,2π), so it’s continuous.
You can see how it’s pointless to ask what the probability is that X lands exactly on a specific angle, since it’ll always be 0. Instead, we can calculate expressions like: P(0≤X≤π)P(aπ≤X≤bπ)P(aπ≤X)=P(aπ≤X≤2π)=21=2ππ=2π(b−a)π=2b−a=22−a
We can add together the probabilities of X being in consecutive intervals to get the probability of X being in the union of the two intervals: P(a1≤X≤a2)+P(a2≤X≤a3)=P(a1≤X≤a3). 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 f such that, for any a≤b, P(a≤X≤b)=∫abf(x)dx. We call f the probability density function (pdf), probability distribution, or density curve of X. 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(a1≤X≤a2)=2πa2−a1 for 0<a1<a2<2π.
In this case, the probability density function f(x) for X should be f(x)={2π10x∈[0,2π)otherwise
- f(x)≥0 for all x.
- ∫−∞∞f(x)dx=1.
- P(X=a)=f(a), don’t mess this up!
- P(a−21Δ≤X≤a+21Δ)≈Δf(a)
Ex. Suppose the pdf of a random variable X is f(x)={kx200≤x≤2otherwise
- What is k? We know that the integral over all values of f(x) has to equal 1. ∫−∞∞f(x)dx=∫02kx2dx=31kx3∣∣∣02=38k=1→k=83.
- Calculate P(X≤1). P(X≤1)=∫−∞1f(x)dx=∫0183x2dx=81x3∣∣∣01=81.
Definition. A continuous random variable X is said to be a uniform distribution on an interval [A,B] if its probability density function is f(x;A,B)={B−A10x∈[A,B]otherwise Here, we say X follows unif(A,B).
(Note that our chance wheel example from before follows this distribution.)