IB Mathematics AA Variance of random variable Study Notes
IB Mathematics AA Variance of random variable Study Notes
IB Mathematics AA Variance of random variable Notes Offer a clear explanation of Use of Variance of random variable, including various formula, rules, exam style questions as example to explain the topics. Worked Out examples and common problem types provided here will be sufficient to cover for topic Variance of random variable.
Variance of a Discrete Random Variable
Variance of a Discrete Random Variable
The variance of a discrete random variable \( X \) measures how much the values of \( X \) spread out from the mean (expected value).
\( \operatorname{Var}(X) = E[(X – \mu)^2] = \sum (x_i – \mu)^2 P(X = x_i) \)
Alternatively:
\( \operatorname{Var}(X) = E(X^2) – [E(X)]^2 \)
Where:
- \( E(X) \) is the expected value (mean)
- \( E(X^2) = \sum x_i^2 P(X = x_i) \)
Example:
A discrete random variable \( X \) has the following probability distribution:
X | 1 | 2 | 3 |
P(X) | 0.2 | 0.5 | 0.3 |
Find the variance of \( X \).
▶️ Answer/Explanation
\( E(X) = 1 \times 0.2 + 2 \times 0.5 + 3 \times 0.3 \)
\( = 0.2 + 1.0 + 0.9 = 2.1 \)
\( E(X^2) = 1^2 \times 0.2 + 2^2 \times 0.5 + 3^2 \times 0.3 \)
\( = 0.2 + 2.0 + 2.7 = 4.9 \)
\( \operatorname{Var}(X) = E(X^2) – [E(X)]^2 \)
\( = 4.9 – (2.1)^2 \)
\( = 4.9 – 4.41 = 0.49 \)
Conclusion: The variance of \( X \) is 0.49.
Continuous Random Variables and Probability Density Functions (PDFs)
Continuous Random Variables and Probability Density Functions (PDFs)
A continuous random variable (CRV) is a variable that can take any value within a given range (interval) on the real number line.
Its probabilities are described by a probability density function (PDF), \( f(x) \).
Key properties:
- \( f(x) \ge 0 \) for all \( x \)
The total area under the curve is 1:
- \( \int_{-\infty}^{\infty} f(x) \, dx = 1 \)
The probability that \( X \) lies between \( a \) and \( b \):
- \( P(a \le X \le b) = \int_a^b f(x) \, dx \)
The expected value (mean):
- \( E(X) = \int_{-\infty}^{\infty} x f(x) \, dx \)
Example:
Let \( X \) be a continuous random variable with PDF:
\( f(x) = \begin{cases} kx & \text{for } 0 \le x \le 2 \\ 0 & \text{otherwise} \end{cases} \)
(a) Find \( k \).
(b) Find \( P(1 \le X \le 1.5) \).
▶️ Answer/Explanation
(a)
Total area = 1
\( \int_0^2 kx \, dx = 1 \)
\( k \int_0^2 x \, dx = 1 \)
\( k \left[ \frac{x^2}{2} \right]_0^2 = 1 \)
\( k \left( \frac{4}{2} \right) = 1 \Rightarrow k \times 2 = 1 \Rightarrow k = 0.5 \)
(b)
\( P(1 \le X \le 1.5) = \int_1^{1.5} 0.5x \, dx \)
\( = 0.5 \left[ \frac{x^2}{2} \right]_1^{1.5} \)
\( = 0.5 \left( \frac{(1.5)^2}{2} – \frac{1^2}{2} \right) \)
\( = 0.5 \left( \frac{2.25}{2} – \frac{1}{2} \right) \)
\( = 0.5 \times (1.125 – 0.5) = 0.5 \times 0.625 = 0.3125 \)
Conclusion: \( k = 0.5 \), \( P(1 \le X \le 1.5) = 0.3125 \).
Mode and Median of Continuous Random Variables
Mode and Median of Continuous Random Variables
For continuous random variables:
Mode: The value of \( x \) where the probability density function (PDF) \( f(x) \) reaches its maximum (the peak of the curve).
Solve \( f'(x) = 0 \) to find critical points, then determine where \( f(x) \) is largest.
Median: The value of \( m \) such that:
\( P(X \le m) = 0.5 \)
Find \( m \) by solving:
\( \int_{-\infty}^m f(x)\, dx = 0.5 \)
Example:
Let \( X \) have the PDF:
\( f(x) = \begin{cases} 2x & 0 \le x \le 1 \\ 0 & \text{otherwise} \end{cases} \)
Find the mode and median of \( X \).
▶️ Answer/Explanation
Mode
Since \( f(x) = 2x \) is increasing on \( 0 \le x \le 1 \),
The mode is at the maximum of \( f(x) \), which is at \( x = 1 \).
Mode = 1
Median
\( \int_0^m 2x \, dx = 0.5 \)
\( = 2 \left[ \frac{x^2}{2} \right]_0^m = m^2 = 0.5 \)
\( m = \sqrt{0.5} = 0.707 \)
Median ≈ 0.707
Mean, Variance, and Standard Deviation of Random Variables
Discrete random variables
Mean (expected value):
- \( E(X) = \sum x_i P(X = x_i) \)
Variance:
- \( \operatorname{Var}(X) = E(X^2) – [E(X)]^2 \)
Standard deviation:
- \( \sigma = \sqrt{\operatorname{Var}(X)} \)
Continuous random variables
Mean (expected value):
- \( E(X) = \int_{-\infty}^{\infty} x f(x)\, dx \)
Variance:
- \( \operatorname{Var}(X) = E(X^2) – [E(X)]^2 \)
Standard deviation:
- \( \sigma = \sqrt{\operatorname{Var}(X)} \)
Example
\( X \) has:
X | 0 | 1 | 2 | 3 |
P(X) | 0.1 | 0.3 | 0.4 | 0.2 |
Find Mean, variance and standard deviation .
▶️ Answer/Explanation
Mean:
\( E(X) = 0 \times 0.1 + 1 \times 0.3 + 2 \times 0.4 + 3 \times 0.2 \)
\( = 0 + 0.3 + 0.8 + 0.6 = 1.7 \)
\( E(X^2) \):
\( E(X^2) = 0^2 \times 0.1 + 1^2 \times 0.3 + 2^2 \times 0.4 + 3^2 \times 0.2 \)
\( = 0 + 0.3 + 1.6 + 1.8 = 3.7 \)
Variance:
\( \operatorname{Var}(X) = 3.7 – (1.7)^2 = 3.7 – 2.89 = 0.81 \)
Standard deviation:
\( \sigma = \sqrt{0.81} = 0.9 \)
Example
\( f(x) = 2x \) for \( 0 \le x \le 1 \)
Find mean, variance and standard deviation.
▶️ Answer/Explanation
Mean:
\( E(X) = \int_0^1 2x^2\, dx = 2 \left[\frac{x^3}{3}\right]_0^1 = 2 \times \frac{1}{3} = \frac{2}{3} \)
Find \( E(X^2) \):
\( E(X^2) = \int_0^1 2x^3\, dx = 2 \left[\frac{x^4}{4}\right]_0^1 = 2 \times \frac{1}{4} = \frac{1}{2} \)
Variance:
\( \operatorname{Var}(X) = \frac{1}{2} – \left(\frac{2}{3}\right)^2 = \frac{1}{2} – \frac{4}{9} = \frac{9}{18} – \frac{8}{18} = \frac{1}{18} \)
Standard deviation:
\( \sigma = \sqrt{\frac{1}{18}} \approx 0.236 \)
The Effect of Linear Transformations of X
The Effect of Linear Transformations of X
Suppose we have a random variable \( X \), and we apply a linear transformation:
\( Y = aX + b \)
Effect on mean, variance, and standard deviation:
Mean:
- \( E(Y) = a E(X) + b \)
Variance:
- \( \operatorname{Var}(Y) = a^2 \operatorname{Var}(X) \)
Standard deviation:
- \( \sigma_Y = |a| \sigma_X \)
Note: The constant \( b \) shifts the mean but does not affect variance or standard deviation.
Example:
Let \( X \) be a random variable with \( E(X) = 10 \) and \( \operatorname{Var}(X) = 4 \).
Find the mean, variance, and standard deviation of \( Y = 3X – 5 \).
▶️ Answer/Explanation
Mean:
\( E(Y) = 3 E(X) – 5 = 3 \times 10 – 5 = 25 \)
Variance:
\( \operatorname{Var}(Y) = 9 \times 4 = 36 \)
Standard deviation:
\( \sigma_Y = 6 \)