Welcome to the World of Continuous Random Variables!

In your previous studies, you probably worked with Discrete Random Variables—things you can count, like the number of heads in ten coin flips or the result of rolling a die. In this chapter, we move into the "smooth" side of math: Continuous Random Variables (CRVs).

Think about measuring the exact time it takes for a kettle to boil or the precise height of every student in your school. These aren't just whole numbers; they can be any value within a range (like 165.234 cm). Because there are infinitely many possible values, we need calculus to help us find probabilities. Don't worry if this seems tricky at first—once you see the patterns, it’s just like regular integration and differentiation!

1. What is a Probability Density Function (PDF)?

Since a continuous variable can take an infinite number of values, the probability of it being exactly one specific number (like exactly 1.500000... cm) is actually zero. Instead, we look at the probability of a value falling within a range.

We represent this using a Probability Density Function, written as \( f(x) \).

The Two Golden Rules of PDFs

For any function to be a valid PDF, it must follow these two rules:

1. It can't be negative: \( f(x) \geq 0 \) for all \( x \). (You can't have a negative "density" of probability!)
2. The total area must be 1: The sum of all probabilities must equal 100%. In calculus terms: \( \int_{-\infty}^{\infty} f(x) \, dx = 1 \).

Quick Review: If an exam question asks you to "find the constant \( k \)" for a PDF, just integrate the function over its given range, set it equal to 1, and solve for \( k \).

2. The Cumulative Distribution Function (CDF)

If the PDF tells us the "density" at a specific point, the Cumulative Distribution Function, written as \( F(x) \), tells us the "accumulated" probability up to that point.

Analogy: If the PDF is like the rate at which water is dripping into a bucket, the CDF is the total amount of water in the bucket at time \( x \).

Moving Between PDF and CDF

This is where your calculus skills shine:

To get the CDF from the PDF: Integrate! \( F(x) = \int_{-\infty}^{x} f(t) \, dt \)
To get the PDF from the CDF: Differentiate! \( f(x) = \frac{d}{dx} F(x) \)

Important Point: For a CDF, \( F(x) \) will always be 0 at the start of the range and 1 at the very end of the range.

3. Calculating Probabilities

To find the probability that \( X \) falls between two values \( a \) and \( b \), you are looking for the area under the curve between those two points.

\( P(a < X < b) = \int_{a}^{b} f(x) \, dx \)

Or, if you already have the CDF:
\( P(a < X < b) = F(b) - F(a) \)

Did you know? In continuous distributions, \( P(X \leq a) \) is exactly the same as \( P(X < a) \). Because the probability of hitting a specific point is zero, the "equals to" sign doesn't change the area!

4. Expectation and Variance

Just like with discrete variables, we want to find the "average" (Mean) and the "spread" (Variance) of our data.

The Mean (Expectation)

The mean, or \( E(X) \), is the center of gravity of the distribution.
\( E(X) = \int_{-\infty}^{\infty} x f(x) \, dx \)

The Variance

Variance measures how much the values "stretch" away from the mean.
1. First, find \( E(X^2) \): \( E(X^2) = \int_{-\infty}^{\infty} x^2 f(x) \, dx \)
2. Then use the formula: \( Var(X) = E(X^2) - [E(X)]^2 \)

Common Mistake: Don't forget to square the mean at the end of the variance formula! It’s a very common slip-up under exam pressure.

5. Median and Percentiles

The median (\( m \)) is the value where exactly 50% of the probability lies to the left and 50% to the right.

To find it, solve for \( m \) in this equation:
\( F(m) = 0.5 \) or \( \int_{-\infty}^{m} f(x) \, dx = 0.5 \)

For any other percentile (like the 75th percentile or upper quartile), you just set the CDF equal to that decimal (e.g., 0.75) and solve for \( x \).

6. Functions of a Random Variable

Sometimes, the syllabus will ask you to find the distribution of a new variable that depends on \( X \). For example, if \( X \) is the side of a square, what is the distribution of the Area \( Y = X^2 \)?

Step-by-Step Process (The CDF Method):

1. Start with the CDF of Y: Write \( G(y) = P(Y \leq y) \).
2. Substitute: Replace \( Y \) with the function of \( X \). (e.g., \( P(X^2 \leq y) \)).
3. Rearrange: Get \( X \) by itself. (e.g., \( P(X \leq \sqrt{y}) \)).
4. Relate to X: This is now the CDF of \( X \), so \( F_X(\sqrt{y}) \).
5. Differentiate: Once you have the new CDF, differentiate it to get the new PDF, \( g(y) \).

Key Takeaway: Always work with the Cumulative distribution (the integral) first when changing variables. Trying to jump straight to the PDF usually leads to mistakes!

Summary Checklist

• Does the total area under my \( f(x) \) equal 1?
• To go from PDF to CDF, did I integrate correctly and add the limits?
• When finding the median, am I setting \( F(x) = 0.5 \)?
• For variance, did I remember to subtract the mean squared?

You've got this! Continuous random variables are just a way of using calculus to describe the real, "smooth" world. Keep practicing the integration, and the rest will fall into place.