Expected Value and Variance of Continuous RVs — Full Worked Solutions
Full Worked Solutions
-
Question: Given f(x) = 2x on [0, 1], find E(X).
Setting Up the Integral
E(X) = ∫01 x · f(x) dx = ∫01 x · 2x dx = ∫01 2x² dx
Evaluating
= [2x³/3]01 = 2/3 − 0 = E(X) = 2/3 ≈ 0.667
This makes sense: f(x) = 2x is skewed right (increasing), so the mean lies above the midpoint 0.5 of the domain.
-
Question: Using f(x) = 2x on [0, 1], find Var(X) and SD(X).
Step 1: Find E(X²)
E(X²) = ∫01 x² · 2x dx = ∫01 2x³ dx = [x4/2]01 = 1/2
Step 2: Apply the Variance Formula
From Q1, E(X) = 2/3.
Var(X) = E(X²) − [E(X)]² = 1/2 − (2/3)² = 1/2 − 4/9Finding common denominator: 1/2 = 9/18 and 4/9 = 8/18
Var(X) = 9/18 − 8/18 = 1/18Step 3: Standard Deviation
SD(X) = √(1/18) = 1/(3√2) = √2/6 ≈ 0.236
-
Question: For f(x) = 3x² on [0, 1], find the mode of the distribution.
Finding the Mode
The mode is the value of x where f(x) is maximum.
f′(x) = 6x
Setting f′(x) = 0 gives x = 0 (a boundary point, not an interior maximum).Since f′(x) = 6x > 0 for all x ∈ (0, 1], the function f(x) = 3x² is strictly increasing on [0, 1].
The maximum occurs at the right endpoint: Mode = x = 1
Confirmation: f(1) = 3(1)² = 3, the maximum value of f(x) on the domain.
-
Question: For f(x) = 2x on [0, 1], find the median m.
Setting Up the Median Equation
The median m satisfies: ∫0m f(x) dx = 0.5
∫0m 2x dx = 0.5
[x²]0m = 0.5
m² = 0.5Solving
m = √(0.5) = 1/√2 = √2/2 ≈ 0.707
Check: m ∈ [0, 1] ✓. Notice the median (0.707) < mean (2/3 ≈ 0.667)... actually median > mean here, consistent with the right-skewed distribution.
-
Question: If X has E(X) = 3 and Var(X) = 4, find E(2X + 5) and Var(2X + 5).
Applying Linear Transformation Rules
E(2X + 5):
Using E(aX + b) = aE(X) + b with a = 2, b = 5:
E(2X + 5) = 2 × 3 + 5 = 6 + 5 = 11Var(2X + 5):
Using Var(aX + b) = a²Var(X) with a = 2:
Var(2X + 5) = 2² × 4 = 4 × 4 = 16Note: adding 5 has no effect on variance. SD(2X + 5) = √16 = 4.
-
Question: If X has E(X) = 5 and SD(X) = 2, find E(3X − 1) and SD(3X − 1).
E(3X − 1)
E(3X − 1) = 3E(X) − 1 = 3(5) − 1 = 15 − 1 = 14
SD(3X − 1)
SD(aX + b) = |a| · SD(X)
SD(3X − 1) = |3| × 2 = 6Var(3X − 1) = 6² = 36 (equivalently, 3² × Var(X) = 9 × 4 = 36)
-
Question: Two distributions for modelling waiting times (minutes): Distribution A: E(X) = 4, SD(X) = 1. Distribution B: E(X) = 4, SD(X) = 3. Which is more reliable? Explain.
Analysis
Both distributions have the same mean E(X) = 4 minutes, so on average the waiting time is the same.
However, their standard deviations differ:
- Distribution A: SD = 1 minute — waiting times are typically within about 1 minute of the 4-minute average
- Distribution B: SD = 3 minutes — waiting times vary considerably, often ranging from about 1 to 7 minutes
Distribution A produces more reliable (consistent) waiting times. A smaller standard deviation means less variability around the mean — the service is more predictable and consistent for customers.
-
Question: A random variable X has pdf f(x) = (3/2)x(2 − x) on [0, 2]. Find E(X) and interpret it.
Recognising Symmetry
Check if f(x) is symmetric: f(2 − x) = (3/2)(2 − x)(2 − (2 − x)) = (3/2)(2 − x)(x) = f(x). Yes, f is symmetric about x = 1.
Therefore E(X) = 1 (the axis of symmetry) without needing to integrate.
Verification by Integration
E(X) = (3/2) ∫02 x · x(2 − x) dx = (3/2) ∫02 (2x² − x³) dx
= (3/2)[2x³/3 − x4/4]02
= (3/2)[(16/3 − 4) − 0]
= (3/2)(4/3) = E(X) = 2Wait — recalculating: 16/3 − 16/4 = 16/3 − 4 = (16 − 12)/3 = 4/3. Then (3/2)(4/3) = 2. But symmetry about x=1 should give E(X)=1. The issue is f(0)=0 and f(2)=0, peak at x=1. Let me recheck: ∫02(3/2)x(2−x)dx = (3/2)[x²−x³/3]02 = (3/2)(4−8/3)=(3/2)(4/3)=2. So actually ∫f = 2 ≠ 1 — we need to verify f is a valid pdf first. ∫02(3/2)x(2−x)dx = (3/2)(4/3) = 2 ≠ 1. So f(x)=(3/4)x(2−x) would be valid. Given the question states (3/2), this is not a valid pdf. Using f(x)=(3/4)x(2−x): E(X) = ∫02x·(3/4)x(2−x)dx = (3/4)[2x³/3−x4/4]02 = (3/4)(4/3)×... = 1. E(X) = 1.
Interpretation: The average fault position is 1 m from the end — the midpoint of the beam — consistent with the symmetric bell-shaped pdf centred at x = 1.
-
Question: A piecewise pdf: f(x) = 2x for 0 ≤ x ≤ 1; f(x) = 2(2 − x) for 1 < x ≤ 2. Find E(X) and Var(X).
E(X) by Symmetry
The pdf is a triangular function, symmetric about x = 1 (verify: f(1−t) = 2(1−t) and f(1+t) = 2(2−(1+t)) = 2(1−t), equal). Therefore E(X) = 1.
E(X²)
E(X²) = ∫01 x² · 2x dx + ∫12 x² · 2(2−x) dx
= [x4/2]01 + ∫12(4x²−2x³)dx
= 1/2 + [4x³/3 − x4/2]12
= 1/2 + [(32/3 − 8) − (4/3 − 1/2)]
= 1/2 + [32/3 − 8 − 4/3 + 1/2]
= 1/2 + [28/3 − 8 + 1/2]
= 1/2 + [28/3 − 15/2]
= 1/2 + [56/6 − 45/6] = 1/2 + 11/6 = 3/6 + 11/6 = 14/6 = 7/3Var(X)
Var(X) = E(X²) − [E(X)]² = 7/3 − 1 = 4/3
Note: the standard result for a symmetric triangular distribution on [0, 2] is Var = (2−0)²/24 = 4/24 = 1/6. Recheck: the triangular pdf on [0,2] with peak at 1 has f(x) = x for x∈[0,1] and f(x)=2−x for x∈[1,2] (with k=1 giving integral=1). Here f(x)=2x and 2(2−x) gives integral = 2, so this is not normalised to 1. Assuming the question intends f(x)=x for [0,1] and 2−x for [1,2]: Var = 1/6. If the pdf is as stated (2x, 2(2−x)), then it integrates to 2, not 1, and would need to be halved: correct pdf is x and (2−x), giving E(X) = 1 and Var(X) = 1/6 ≈ 0.167.
-
Question: The pdf of X is f(x) = k(1 − x²) on [−1, 1]. (a) Find k. (b) Find E(X) using symmetry. (c) Find Var(X).
(a) Find k
∫−11 k(1 − x²) dx = k[x − x³/3]−11
= k[(1 − 1/3) − (−1 + 1/3)]
= k[(2/3) − (−2/3)]
= k × 4/3 = 1
k = 3/4(b) E(X) by Symmetry
f(x) = (3/4)(1 − x²) is an even function since f(−x) = (3/4)(1 − (−x)²) = (3/4)(1 − x²) = f(x). The distribution is symmetric about x = 0.
Therefore, E(X) = 0 (by symmetry, no integration needed).(c) Var(X)
Var(X) = E(X²) − [E(X)]² = E(X²) − 0 = E(X²)
E(X²) = ∫−11 x² · (3/4)(1−x²) dx
Since x²(1−x²) is an even function, use symmetry:
= 2 × (3/4) ∫01 (x² − x4) dx
= (3/2)[x³/3 − x5/5]01
= (3/2)(1/3 − 1/5)
= (3/2)(2/15) = 6/30 = 1/5
Var(X) = 1/5 = 0.2