17 Continuous RVs
Definition 17.1 (Continuous random variable) We say a random variable \(X\) has a continuous random variable if the possible values of \(X\) takes the form of a continuum.
Definition 17.2 (Probability density function) For a continuous random variable \(X\), the probability density function (PDF) of \(X\) is a real-valued function \(f:\mathbb{R}\to[0,\infty)\) such that \[P(a\leq X\leq b)=\int_{a}^{b}f(x)dx.\]
Continuous random variables are usually measurements. Examples include height, weight, temperature, the amount of money and so on.
PDF differs from the discrete PMF in important ways:
- For a continuous random variable, \(P(X=x)=0\) for all \(x\);
- The quantity \(f(x)\) is not a probability. To get the probability, we integrate the PDF (probability is the area under the PDF): \[P(a<X\leq b)=F(b)-F(a)=\int_{a}^{b}f(x)dx.\]
- Since any single value has probability 0, including or excluding endpoints does not matter. \[P(a<X<b)=P(a<X\leq b)=P(a\leq X<b)=P(a\leq X\leq b).\]
Proposition 17.1 If \(X\) has density function \(f\) then
- \(P(X=x)=0\) for all \(x\in\mathbb{R}\)
- \(P(a\leq X\leq b) =\int_a^b f(x) dx\)
- \(\int_{-\infty}^{\infty}f(x)dx=1\)
Example 17.1 (Uniform distribution) A uniform distribution is a probability distribution where all values within a specified interval \([a, b]\) are equally likely to occur, and its probability density function (PDF) is given by: \[f(x) = \frac{1}{b - a} \quad \text{for} \quad a \leq x \leq b\] and \(f(x) = 0\) otherwise.
If random variable \(X\) has distribution \(f(x)\), the distribution of \(X^2\) is not \(f^2(x)\). To get the distribution of \(X+Y\), you can’t just add up \(f_X(x)+f_Y(y)\). The right way to do it will be discussed in later chapters (transformation and convolution).
Example 17.2 Every morning, a student waits for the elevator in their dormitory. The waiting time (in minutes) is equally likely to be anywhere between 0 and 3 minutes, depending on when the elevator arrives.
- Define \(X\) = “the student’s elevator waiting time.” What is the support of \(X\)?
- Derive the probability density function (PDF) of \(X\).
- Compute \(P(X \leq 1)\), i.e. the probability that the waiting time is at most 1 minute.
- If the student must wait more than 2 minutes, they decide to take the stairs instead. Define a new indicator random variable \(Y\), which equals \(1\) if \(X>2\) and \(0\) otherwise. Compute \(P(Y=1)\).