Introduction: Welcoming Continuous Variables
Hello future statisticians! Unit S2 introduces us to the beautiful world of Continuous Random Variables. You are already an expert in Discrete Random Variables (from S1), where we counted things (like the number of heads, 0, 1, 2...).
In this chapter, we switch gears to measuring things—like time, height, weight, or temperature. These measurements can take on any value within a range, not just specific whole numbers.
This section is crucial because it blends statistics with calculus (integration and differentiation). Don't worry! We will break down every concept step-by-step. Mastering these calculations will unlock powerful predictive abilities!
Quick Review: Discrete vs. Continuous
- Discrete: Countable values. Probability is defined at exact points: \(P(X = x)\).
- Continuous: Measurable values over a range. Probability is defined over intervals.
Section 1: Understanding Continuous Random Variables (CRVs)
What Defines a CRV?
A Continuous Random Variable (CRV), often denoted by \(X\), is a variable that can assume any value within a specified interval or set of intervals.
The key difference from discrete variables is how we handle probability:
The Zero Probability Rule
For any continuous random variable \(X\), the probability that \(X\) takes on an exact, single value is always zero.
\[P(X = x) = 0\]
Analogy: Imagine trying to hit a target that is a continuous line segment. What is the chance you hit the exact point 3.000000000...? The probability is infinitesimally small, so we treat it as zero.
Key Implication: Because the probability of hitting an exact point is zero, it doesn't matter if we include the endpoints of an interval when calculating probability:
\[P(a \le X \le b) = P(a < X < b) = P(a \le X < b)\]
This is a HUGE simplification compared to discrete variables!
Section 2: The Probability Density Function (PDF) – \(f(x)\)
Since we cannot assign probability to single points, we use a function to describe how probability is distributed over a range. This is the Probability Density Function (PDF), denoted \(f(x)\).
Think of the PDF as the shape of the probability distribution. Where \(f(x)\) is high, the variable is more likely to occur.
Properties of the PDF, \(f(x)\)
For \(f(x)\) to be a valid PDF, it must satisfy two fundamental rules:
- Non-Negative: The density function must never be negative. \[f(x) \ge 0 \quad \text{for all } x\]
- Total Area is One: The total area under the curve \(f(x)\) must equal 1. This represents the total probability (100%). \[\int_{\text{all } x} f(x) \, dx = 1\]
Calculating Probability Using the PDF
Probability is found by calculating the Area Under the Curve of \(f(x)\) over the desired interval. This means we use integration.
The probability that \(X\) lies between \(a\) and \(b\) is:
\[P(a < X < b) = \int_{a}^{b} f(x) \, dx\]
Step-by-Step: Finding an Unknown Constant (k)
Often, the PDF is given in the form \(f(x) = kx^2\) (for a defined interval). You must find \(k\).
- Set up the integral: Use the Total Area Rule (Property 2). \[\int_{\text{Lower Limit}}^{\text{Upper Limit}} f(x) \, dx = 1\]
- Integrate and substitute limits: Integrate the function with respect to \(x\).
- Solve for k: Set the result equal to 1 and solve the equation.
Important Note for Step 1: Only integrate over the range where \(f(x)\) is non-zero. If \(f(x)\) is defined for \(1 \le x \le 3\), your limits of integration are 1 and 3.
Quick Review: PDF Takeaway
PDF (\(f(x)\)): Describes probability density.
Probability: Area under the PDF curve (integration).
Crucial Identity: Total area must equal 1.
Section 3: The Cumulative Distribution Function (CDF) – \(F(x)\)
While the PDF tells us the density at a point, the Cumulative Distribution Function (CDF) tells us the accumulated probability up to a certain value \(x\).
Definition and Calculation
The CDF, denoted \(F(x)\), is defined as the probability that the random variable \(X\) is less than or equal to a specific value \(x\).
\[F(x) = P(X \le x) = \int_{\text{Lowest possible value}}^{x} f(t) \, dt\]
Note: We use \(t\) as the dummy variable inside the integral to avoid confusion with the upper limit \(x\).
Properties of the CDF, \(F(x)\)
- \(F(x)\) is a non-decreasing function (probability can only increase or stay constant as \(x\) increases).
- At the start of the distribution (Lower Limit, L): \(F(L) = 0\).
- At the end of the distribution (Upper Limit, U): \(F(U) = 1\).
The PDF/CDF Relationship: Calculus is Your Friend
These two functions are linked by the fundamental theorems of calculus:
- PDF \(\to\) CDF: Integrate \(f(x)\) to find \(F(x)\).
- CDF \(\to\) PDF: Differentiate \(F(x)\) to find \(f(x)\). \[f(x) = \frac{d}{dx} F(x)\]
Memory Aid: C comes after P in the alphabet. If you go from F(x) to f(x) (backwards in the alphabet), you differentiate (a simpler operation). If you go from f(x) to F(x) (forward), you integrate (a more complex operation).
Using the CDF to Find Interval Probability
Once you have \(F(x)\), finding the probability for an interval is simple subtraction:
\[P(a < X < b) = F(b) - F(a)\]
This is often much faster than performing another integration of the PDF!
Common Mistake to Avoid!
When calculating \(F(x)\) using integration, do not forget to include the +C (constant of integration) if you are doing indefinite integration. You determine C by using the boundary condition \(F(\text{Lower Limit}) = 0\).
Section 4: Measures of Location (Mean, Median, Mode)
Just like any dataset, we need to locate the center and typical value of the distribution.
1. The Mean (Expected Value, \(\mu\) or \(E(X)\))
The mean represents the average value you would expect if you sampled the variable many times. It is the center of gravity of the distribution.
For a continuous variable, the expected value is calculated using this formula:
\[E(X) = \mu = \int_{\text{all } x} x \cdot f(x) \, dx\]
Did you know? This is the continuous analogue of the discrete formula \(\sum x P(X=x)\). Here, integration replaces summation, and \(f(x) \, dx\) replaces \(P(X=x)\).
2. The Median (\(m\))
The median is the value \(m\) that divides the probability distribution exactly in half. 50% of the distribution lies below \(m\), and 50% lies above it.
To find the median \(m\), you solve one of the following equations:
Using the CDF: \[F(m) = 0.5\]
Using the PDF: \[\int_{\text{Lower Limit}}^{m} f(x) \, dx = 0.5\]
Tip for Struggling Students: Finding the median is usually easier if you have already derived the CDF, \(F(x)\). Just set your derived expression for \(F(x)\) equal to 0.5 and solve for \(x\).
3. The Mode
The mode is the value of \(X\) where the probability density function \(f(x)\) reaches its maximum height (the peak of the curve).
Finding the Mode (Non-Calculus):
If \(f(x)\) is a simple shape (e.g., a constant, or a straight line), the mode is found by inspection or at the boundary of the range.
Finding the Mode (Calculus):
If \(f(x)\) is a complex curve (e.g., a quadratic or cubic):
- Differentiate the PDF: Find \(f'(x)\).
- Set the derivative to zero: \(f'(x) = 0\).
- Solve for \(x\).
- Check boundaries and use the second derivative test (or inspection) to ensure this is a maximum, not a minimum.
Section 5: Measures of Spread (Variance and Standard Deviation)
Measures of spread tell us how concentrated or dispersed the data is around the mean.
Expected Value of \(X^2\)
Before calculating variance, we must first calculate the expected value of \(X^2\), denoted \(E(X^2)\). This is calculated similarly to \(E(X)\), but we integrate \(x^2 f(x)\).
\[E(X^2) = \int_{\text{all } x} x^2 \cdot f(x) \, dx\]
Variance (\(Var(X)\) or \(\sigma^2\))
The variance measures the average squared distance from the mean. It is defined using the famous identity:
\[Var(X) = E(X^2) - [E(X)]^2\]
Step-by-Step Calculation of Variance:
- Calculate \(E(X) = \mu\) using \(\int x f(x) \, dx\).
- Calculate \(E(X^2)\) using \(\int x^2 f(x) \, dx\).
- Substitute the results into the variance formula: \(E(X^2) - (\mu)^2\).
Standard Deviation (\(\sigma\))
The standard deviation is the square root of the variance. It is preferred because it is in the same units as the random variable \(X\).
\[\sigma = \sqrt{Var(X)}\]
🚨 Common Mistake Alert!
Do NOT confuse \(E(X^2)\) with \([E(X)]^2\). They are completely different. You must calculate the expected value of \(X\) first, and then square that result when finding the variance.
You have now covered all the core concepts of Continuous Random Variables! Remember that practice with integration is the key to success in this chapter.