Welcome to Continuous Random Variables!
In your previous studies (Unit S1), you looked at discrete random variables—things you can count, like the number of heads when flipping a coin. In this chapter, we move into the world of the "infinite." We are going to explore continuous random variables. These are things we measure, like the time it takes for a lightbulb to fail or the exact height of a tree. Because you can always be more precise with a measurement (e.g., 1.5m, 1.52m, 1.5234m...), these variables can take any value within a range. Don't worry if this seems a bit abstract at first; we will use your existing skills in integration and differentiation to make it clear!
1. What is a Continuous Random Variable?
A continuous random variable (CRV) is a variable \( X \) that can take any value in a given interval.
Example: The weight of an apple. It could be 150g, 150.1g, or 150.115g.
Important Concept: The Probability of a Single Point
Did you know? For a continuous random variable, the probability of the variable being exactly one specific value is always zero. \( P(X = 2) = 0 \).
Think of it this way: if you try to throw a dart at a number line, the chance of hitting exactly 2.000000... with infinite zeros is impossible. Instead, we always look at the probability of being in a range, like \( P(1.9 < X < 2.1) \).
Quick Review: Discrete vs. Continuous
- Discrete: Countable values. Use a probability distribution table.
- Continuous: Measurable values. Use a Probability Density Function (pdf).
2. The Probability Density Function (pdf)
The Probability Density Function, written as \( f(x) \), describes the shape of the distribution. It isn't a probability itself, but the area under its curve represents probability.
Two Golden Rules for \( f(x) \):
1. The function can never be negative: \( f(x) \ge 0 \) for all \( x \).
2. The total area under the curve must equal 1: \( \int_{-\infty}^{\infty} f(x) dx = 1 \).
To find the probability that \( X \) falls between two values \( a \) and \( b \), we find the area under the curve between those points:
\( P(a < X \le b) = \int_{a}^{b} f(x) dx \)
Memory Tip: Think of the pdf as a "density map." Where the graph is high, the values are more likely to occur. The total "mass" of the map is always 1.
3. The Cumulative Distribution Function (cdf)
The Cumulative Distribution Function, written as \( F(x) \), tells us the probability that the variable is less than or equal to a certain value \( x_0 \).
\( F(x_0) = P(X \le x_0) = \int_{-\infty}^{x_0} f(x) dx \)
The "Bridge" Between \( f(x) \) and \( F(x) \)
You can move between these two functions using your calculus skills:
- To go from pdf to cdf: Integrate \( f(x) \).
- To go from cdf to pdf: Differentiate \( F(x) \).
\( f(x) = \frac{dF(x)}{dx} \)
Common Mistake to Avoid: When integrating \( f(x) \) to find \( F(x) \), don't forget the constant of integration \( +C \). You usually find \( C \) by knowing that \( F(\text{lower limit}) = 0 \) or \( F(\text{upper limit}) = 1 \).
Key Takeaway: \( f(x) \) is the "slope" or rate of change of the probability, while \( F(x) \) is the "running total" of the probability.
4. Measures of Location: Mode, Median, and Quartiles
Just like in S1, we want to find the "center" of our data.
The Mode
The Mode is the value of \( x \) where the pdf \( f(x) \) is at its maximum.
How to find it: Look at the graph. If it's a simple curve, use differentiation: set \( f'(x) = 0 \) and solve for \( x \). Check the boundaries of your range too, as the maximum might be at an endpoint!
The Median and Quartiles
The Median \( m \) is the value such that half the area is to the left and half is to the right.
Set \( F(m) = 0.5 \) and solve for \( m \).
Similarly for Quartiles:
- Lower Quartile (\( Q_1 \)): Set \( F(Q_1) = 0.25 \).
- Upper Quartile (\( Q_3 \)): Set \( F(Q_3) = 0.75 \).
Step-by-Step for Median:
1. Find the expression for the cdf \( F(x) \).
2. Set that expression equal to 0.5.
3. Solve the resulting equation for \( x \). This value is your median!
5. Mean and Variance
The mean (or Expectation) and Variance tell us the average value and how spread out the values are.
The Mean (Expectation)
In discrete math, you did \( \sum x P(X=x) \). In continuous math, we use integration:
\( E(X) = \mu = \int_{-\infty}^{\infty} x f(x) dx \)
The Variance
The formula for variance is the same as in S1, but we calculate the components with integrals:
\( Var(X) = \sigma^2 = E(X^2) - [E(X)]^2 \)
Where \( E(X^2) = \int_{-\infty}^{\infty} x^2 f(x) dx \).
Don't worry if this seems tricky! Just remember that to find the expectation of "anything," you just put that "anything" inside the integral multiplied by \( f(x) \).
Example: To find \( E(X^2) \), integrate \( x^2 \times f(x) \).
6. Summary Table of Operations
If you want to find... Use this method:
- Probabilities \( P(a < X < b) \): Integrate \( f(x) \) from \( a \) to \( b \), or calculate \( F(b) - F(a) \).
- Expectation \( E(X) \): Integrate \( x \times f(x) \).
- Mode: Find the \( x \) value that gives the maximum \( f(x) \).
- Median: Solve \( F(x) = 0.5 \).
- Relationship: \( f(x) \) is the derivative of \( F(x) \).
Key Takeaway: Integration is your best friend in this chapter! Always check that your total probability equals 1 at the end of your work to ensure you haven't made a calculation error.