Continuous
Random Variables
Explore probability density functions, understand how area under a curve represents probability, and master the tools for continuous distributions.
What is a Continuous Random Variable?
A continuous random variable \(X\) can take any value within an interval on the real number line. Unlike discrete variables that take countable values, continuous variables have uncountably many possible outcomes.
From Histograms to Density Curves
As we collect more data and use narrower bins, a histogram's outline approaches a smooth curve. This limiting curve is the probability density function (pdf).
Why Continuous Variables Matter
Continuous random variables model real-world measurements where precision is limited only by our instruments. They form the backbone of statistical inference, quality control, and scientific modelling.
The Probability Density Function
A function \(f(x)\) is a probability density function (pdf) for a continuous random variable \(X\) if it satisfies two conditions:
Visualising \(P(a \leq X \leq b)\)
Discrete vs Continuous
| Discrete | Continuous | |
|---|---|---|
| Values | Countable (0, 1, 2, ...) | Any real number in an interval |
| Probability model | \(P(X = x)\) via pmf | \(f(x)\) via pdf |
| Finding \(P\) | Sum: \(\sum P(X = x_i)\) | Integral: \(\int_a^b f(x)\,dx\) |
| \(P(X = a)\) | Can be > 0 | Always 0 |
| Expected value | \(\sum x_i P(X = x_i)\) | \(\int_{-\infty}^{\infty} x f(x)\,dx\) |
Expected Value and Variance
How to Work with a PDF
Example 1: Finding \(k\)
A continuous random variable \(X\) has pdf: \(f(x) = kx\) for \(0 \leq x \leq 4\), and \(f(x) = 0\) otherwise. Find the value of \(k\).
Example 2: Finding Probabilities
Using \(\displaystyle f(x) = \frac{x}{8}\) for \(0 \leq x \leq 4\), find \(P(1 \leq X \leq 3)\).
Example 3: \(E(X)\) and \(\text{Var}(X)\)
Still using \(\displaystyle f(x) = \frac{x}{8}\) for \(0 \leq x \leq 4\). Find the expected value and variance.
Finding the Median
For the same pdf \(\displaystyle f(x) = \frac{x}{8}\) on \([0, 4]\), find the median \(m\).
Handling Piecewise PDFs
Some pdfs are defined in pieces. For example:
Common Mistakes to Avoid
Summary of Key Formulas
| Quantity | Formula |
|---|---|
| Normalisation | \(\displaystyle\int_{-\infty}^{\infty} f(x)\,dx = 1\) |
| Probability | \(\displaystyle P(a \leq X \leq b) = \int_a^b f(x)\,dx\) |
| Expected Value | \(\displaystyle E(X) = \int x\,f(x)\,dx\) |
| Variance | \(E(X^2) - [E(X)]^2\) |
| Median | \(\displaystyle\int_{-\infty}^{m} f(x)\,dx = 0.5\) |
| Mode | Value of \(x\) maximising \(f(x)\) |
Question 1 of 5
A continuous random variable \(X\) has pdf \(f(x) = kx^2\) for \(0 \leq x \leq 3\) and \(f(x) = 0\) otherwise. What is the value of \(k\)?
Question 2 of 5
If \(\displaystyle f(x) = \frac{3}{8}x^2\) for \(0 \leq x \leq 2\), what is \(P(X \leq 1)\)?
Question 3 of 5
For a continuous random variable with pdf \(f(x)\), which statement is always true?
Question 4 of 5
Given \(\displaystyle f(x) = \frac{x}{8}\) for \(0 \leq x \leq 4\), what is \(E(X)\)?
Question 5 of 5
A pdf is given by \(\displaystyle f(x) = \frac{1}{2}\) for \(0 \leq x \leq 2\). What is \(\text{Var}(X)\)?