Continuous Random Variables and PDFs — Full Worked Solutions
Full Worked Solutions
-
Question: Show that f(x) = 3x² on [0, 1] is a valid pdf by verifying both conditions. Then find k if instead f(x) = kx² on [0, 2].
Verifying f(x) = 3x² on [0, 1]
Condition 1 — Non-negativity:
For x ∈ [0, 1]: x² ≥ 0, so 3x² ≥ 0. ✓Condition 2 — Total area = 1:
∫01 3x² dx = [x³]01 = 1 − 0 = 1 ✓Both conditions satisfied; f(x) = 3x² is a valid pdf.
Find k for f(x) = kx² on [0, 2]
Set ∫02 kx² dx = 1:
k[x³/3]02 = 1
k × 8/3 = 1
k = 3/8Check: f(x) = (3/8)x² ≥ 0 on [0, 2] ✓
-
Question: Given f(x) = (3/4)(1 − x²) on [−1, 1], find P(0 ≤ X ≤ 0.5).
Setting Up the Integral
P(0 ≤ X ≤ 0.5) = ∫00.5 (3/4)(1 − x²) dx
Evaluating
= (3/4)[x − x³/3]00.5
= (3/4)[(0.5 − (0.5)³/3) − 0]
= (3/4)[0.5 − 0.125/3]
= (3/4)[0.5 − 0.04167]
= (3/4) × 0.45833
= 0.344 (to 3 d.p.) -
Question: For f(x) = 3x² on [0, 1], find the CDF F(x) for x ∈ [0, 1].
Deriving the CDF
The CDF is obtained by integrating the pdf from the lower bound:
F(x) = ∫0x 3t² dt = [t³]0x = x³ for x ∈ [0, 1]
Verification
• F(0) = 0³ = 0 ✓ (no probability below the lower bound)
• F(1) = 1³ = 1 ✓ (all probability is accumulated by the upper bound) -
Question: Using f(x) = 3x² on [0, 1] (with CDF F(x) = x³), find: (a) P(X > 0.7) (b) The median of the distribution.
(a) P(X > 0.7)
Using the complement rule:
P(X > 0.7) = 1 − F(0.7) = 1 − (0.7)³ = 1 − 0.343 = 0.657(b) Finding the Median
The median m satisfies F(m) = 0.5:
m³ = 0.5
m = (0.5)1/3 = 0.794 (to 3 d.p.)Check: m ∈ [0, 1] ✓
-
Question: Given f(x) = k(4 − x) on [0, 4]: (a) Find k (b) Find P(1 ≤ X ≤ 3) (c) Find P(X > 2.5)
(a) Find k
∫04 k(4 − x) dx = 1
k[4x − x²/2]04 = 1
k[(16 − 8) − 0] = 1
8k = 1
k = 1/8(b) P(1 ≤ X ≤ 3)
= ∫13 (4 − x)/8 dx = (1/8)[4x − x²/2]13
= (1/8)[(12 − 9/2) − (4 − 1/2)]
= (1/8)[(12 − 4.5) − (4 − 0.5)]
= (1/8)[7.5 − 3.5]
= 4/8 = 0.5(c) P(X > 2.5)
= ∫2.54 (4 − x)/8 dx = (1/8)[4x − x²/2]2.54
= (1/8)[(16 − 8) − (10 − 3.125)]
= (1/8)[8 − 6.875]
= 1.125/8 = 0.141 (to 3 d.p.) -
Question: A piecewise pdf is defined by f(x) = 2x for 0 ≤ x ≤ 1, f(x) = 0 otherwise. Verify this is a valid pdf, then find the CDF F(x) and use it to find P(0.4 ≤ X ≤ 0.8).
Verification
Non-negativity: f(x) = 2x ≥ 0 for x ∈ [0, 1] ✓
Total area: ∫01 2x dx = [x²]01 = 1 ✓CDF F(x)
For 0 ≤ x ≤ 1:
F(x) = ∫0x 2t dt = [t²]0x = x²P(0.4 ≤ X ≤ 0.8)
= F(0.8) − F(0.4)
= (0.8)² − (0.4)²
= 0.64 − 0.16 = 0.48 -
Question: Find the constant k so that f(x) = kx(1 − x) is a valid pdf on [0, 1]. Then find the median of this distribution.
Find k
∫01 kx(1 − x) dx = 1
k ∫01 (x − x²) dx = 1
k[x²/2 − x³/3]01 = 1
k(1/2 − 1/3) = 1
k × 1/6 = 1
k = 6Find the Median
Note that f(x) = 6x(1 − x) is symmetric about x = 1/2 (since f(1 − x) = 6(1 − x)x = f(x)). Therefore, by symmetry, the median is m = 1/2.
Verification: ∫00.5 6x(1 − x) dx = 6[x²/2 − x³/3]00.5
= 6(0.125 − 0.04167) = 6 × 0.08333 = 0.5 ✓ -
Question: The pdf of X is f(x) = c/x² for x ∈ [1, 5]. (a) Find c (b) Find P(X > 3) (c) Find the CDF F(x)
(a) Find c
∫15 c/x² dx = 1
c[−1/x]15 = 1
c(−1/5 − (−1)) = 1
c(1 − 1/5) = 1
c × 4/5 = 1
c = 5/4(b) P(X > 3)
= ∫35 (5/4)/x² dx = (5/4)[−1/x]35
= (5/4)(−1/5 − (−1/3))
= (5/4)(1/3 − 1/5)
= (5/4)(2/15)
= 10/60 = 1/6 ≈ 0.167(c) CDF F(x)
F(x) = ∫1x (5/4)/t² dt = (5/4)[−1/t]1x
= (5/4)(1 − 1/x)
= 5(x − 1)/(4x) for x ∈ [1, 5]Check: F(1) = 0 ✓, F(5) = 5(4)/(20) = 1 ✓
-
Question: A random variable X has pdf f(x) = ax + b on [0, 2], where f(0) = 0.2 and f(2) = 0.8. (a) Find a and b (b) Verify that f(x) is a valid pdf (c) Find P(X ≤ 1) and the median.
(a) Find a and b
Using the given boundary values:
f(0) = a(0) + b = b = 0.2, so b = 0.2
f(2) = 2a + 0.2 = 0.8, so 2a = 0.6, a = 0.3
Therefore: f(x) = 0.3x + 0.2(b) Verify f(x) is a Valid PDF
Non-negativity: f(x) = 0.3x + 0.2 ≥ 0.2 > 0 on [0, 2] ✓
Total area:
∫02 (0.3x + 0.2) dx = [0.15x² + 0.2x]02
= (0.15 × 4 + 0.4) − 0 = 0.6 + 0.4 = 1 ✓(c) P(X ≤ 1) and Median
P(X ≤ 1):
= ∫01 (0.3x + 0.2) dx = [0.15x² + 0.2x]01 = 0.15 + 0.2 = 0.35Median m:
[0.15x² + 0.2x]0m = 0.5
0.15m² + 0.2m = 0.5
Multiply by 20: 3m² + 4m − 10 = 0
Using the quadratic formula:
m = (−4 + √(16 + 120)) / 6 = (−4 + √136) / 6
√136 ≈ 11.662
m ≈ 7.662 / 6 ≈ 1.277 (taking the positive root since m ∈ [0, 2]) -
Question: A machine produces components with a fault occurring at position X (in mm from one end) modelled by f(x) = k(6x − x²) on [0, 6]. (a) Find k (b) Find P(2 ≤ X ≤ 4) (c) A component is rejected if the fault position is less than 1 mm or greater than 5 mm from the end. Find the probability that a component is rejected.
(a) Find k
∫06 k(6x − x²) dx = 1
k[3x² − x³/3]06 = 1
k[(108 − 72) − 0] = 1
36k = 1
k = 1/36(b) P(2 ≤ X ≤ 4)
= (1/36) ∫24 (6x − x²) dx
= (1/36)[3x² − x³/3]24
= (1/36)[(48 − 64/3) − (12 − 8/3)]
= (1/36)[(48 − 21.33) − (12 − 2.67)]
= (1/36)[26.67 − 9.33]
= (1/36)(17.33)
≈ 0.481(c) P(Rejected)
P(rejected) = P(X < 1) + P(X > 5)
P(X < 1):
= (1/36)[3x² − x³/3]01
= (1/36)(3 − 1/3)
= (1/36)(8/3) = 8/108 ≈ 0.0741P(X > 5): By symmetry of f(x) = (1/36)(6x − x²) about x = 3 (since f(3 + t) = f(3 − t)):
P(X > 5) = P(X < 1) ≈ 0.0741P(rejected) = 0.0741 + 0.0741 ≈ 0.148