0% found this document useful (0 votes)
22 views7 pages

UMA401 A4 Solutions

The document contains solutions to an assignment on probability and statistics, covering various topics such as expectation of random variables, discrete uniform distributions, expected areas, percentiles, quantile functions, and variance calculations. It includes detailed calculations and results for each question, demonstrating methods for finding expected values, variances, and other statistical measures. Key results include E(X) = 2, E(X²) = 11, and the variance of Y = 1/12.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views7 pages

UMA401 A4 Solutions

The document contains solutions to an assignment on probability and statistics, covering various topics such as expectation of random variables, discrete uniform distributions, expected areas, percentiles, quantile functions, and variance calculations. It includes detailed calculations and results for each question, demonstrating methods for finding expected values, variances, and other statistical measures. Key results include E(X) = 2, E(X²) = 11, and the variance of Y = 1/12.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UMA401 – Probability and Statistics

Assignment 4 – Expectation of Random Variables | Complete Solutions


Thapar Institute of Engineering & Technology, Patiala

Q1. E(X), E[(X+2)³], E[6X − 2(X+2)³]

Given: f(x) = (x+2)/18, −2 < x < 4


Use: E[g(X)] = ∫ g(x)·f(x) dx

Finding E(X)

E(X) = ∫₋ ₂ ⁴ x·(x+2)/18 dx
= (1/18) ∫₋ ₂ ⁴ (x² + 2x) dx
= (1/18) [x³/3 + x²]₋ ₂ ⁴
= (1/18) [(64/3 + 16) − (−8/3 + 4)]
= (1/18) [(64/3 + 48/3) − (−8/3 + 12/3)]
= (1/18) [112/3 − 4/3]
= (1/18)(108/3) = (1/18)(36) = 2

E(X) = 2

Finding E[(X+2)³]

E[(X+2)³] = ∫₋ ₂ ⁴ (x+2)³·(x+2)/18 dx = (1/18)∫₋ ₂ ⁴ (x+2)⁴ dx


Let u = x+2, du=dx. When x=−2,u=0; x=4,u=6
= (1/18) ∫₀ ⁶ u⁴ du = (1/18)[u⁵ /5]₀ ⁶
= (1/18)(6⁵ /5) = (1/18)(7776/5) = 7776/90 = 432/5

E[(X+2)³] = 432/5 = 86.4

Finding E[6X − 2(X+2)³]

Use linearity of expectation:


E[6X − 2(X+2)³] = 6E(X) − 2E[(X+2)³]
= 6(2) − 2(432/5)
= 12 − 864/5 = 60/5 − 864/5 = −804/5

E[6X − 2(X+2)³] = −804/5 = −160.8

Q2. E(X), E(X²), E[(X+2)²] for discrete uniform

Given: f(x)=1/5, x=1,2,3,4,5


E(X) = Σ x·(1/5) = (1/5)(1+2+3+4+5) = 15/5 = 3
E(X²) = Σ x²·(1/5) = (1/5)(1+4+9+16+25) = 55/5 = 11
E[(X+2)²] = E[X²+4X+4] = E(X²)+4E(X)+4 = 11+12+4 = 27

E(X) = 3, E(X²) = 11, E[(X+2)²] = 27

Q3. Expected Area of Random Rectangle

Given: f(x)=3x², 0<x<1. Sides: X and (1−X)


Area A = X(1−X). Find E(A).

E[X(1−X)] = ∫₀ ¹ x(1−x)·3x² dx = 3∫₀ ¹ (x³ − x⁴ ) dx


= 3[x⁴ /4 − x⁵ /5]₀ ¹ = 3(1/4 − 1/5) = 3(1/20) = 3/20

E[Area] = 3/20 = 0.15

Q4. Median and 20th Percentile of Discrete X

PMF: P(X=−2)=1/4, P(X=0)=1/4, P(X=1)=1/3, P(X=2)=1/6


CDF (cumulative):
F(−2) = 1/4 = 0.25
F(0) = 1/4+1/4 = 1/2 = 0.50
F(1) = 1/2+1/3 = 5/6 ≈ 0.833
F(2) = 1

Median (50th percentile)

Median = smallest x such that F(x) ≥ 0.5


F(−2)=0.25 < 0.5, F(0)=0.50 ≥ 0.5 → Median = 0

Median = 0

20th Percentile

20th percentile = smallest x such that F(x) ≥ 0.20


F(−2) = 0.25 ≥ 0.20 → P₂ ₀ = −2

20th Percentile = −2

Q5. Quantile Function for Exponential pdf


Given: f(x) = θe^(−θx), x>0 (Exponential distribution)
Quantile function Q(p): solve F(Q(p)) = p for Q(p)

Step 1 – Find CDF F(x):


F(x) = ∫₀ ˣ θe^(−θt) dt = 1 − e^(−θx)
Step 2 – Invert: set F(Q) = p
1 − e^(−θQ) = p → e^(−θQ) = 1−p → Q = −ln(1−p)/θ

Q(p) = −ln(1−p)/θ

Q1 (p=0.25): Q1 = −ln(0.75)/θ = ln(4/3)/θ ≈ 0.2877/θ


Median (p=0.50): m = −ln(0.5)/θ = ln2/θ ≈ 0.6931/θ
Q3 (p=0.75): Q3 = −ln(0.25)/θ = ln4/θ ≈ 1.3863/θ

Q6. Mean and Variance of Y = (X³+1)/9

Given: f(x) = x²/3, −1<x<2. Y=(X³+1)/9


Strategy: E(Y) = E[(X³+1)/9] = (E(X³)+1)/9. Need E(X³) and Var(Y).

E(X) = ∫₋₁² x·(x²/3) dx = (1/3)∫₋₁² x³ dx = (1/3)[x⁴/4]₋₁² = (1/3)(16/4−1/4) = (1/3)(15/4) = 5/4


E(X²) = ∫₋₁² x²·(x²/3) dx = (1/3)∫₋₁² x⁴ dx = (1/3)[x⁵/5]₋₁² = (1/3)(32/5+1/5) = (1/3)(33/5) = 11/5
E(X³) = ∫₋₁² x³·(x²/3) dx = (1/3)∫₋₁² x⁵ dx = (1/3)[x⁶/6]₋₁² = (1/3)(64/6−1/6) = (1/3)(63/6) = 7/2
E(X⁶) = ∫₋₁² x⁶·(x²/3) dx = (1/3)[x⁸/8]₋₁² = (1/3)(256/8−1/8) = (1/3)(255/8) = 85/8

E(Y) = (E(X³)+1)/9 = (7/2+1)/9 = (9/2)/9 = 1/2


E(Y²) = E[(X³+1)²/81] = E[X⁶+2X³+1]/81 = (E(X⁶)+2E(X³)+1)/81
= (85/8 + 2(7/2) + 1)/81 = (85/8 + 7 + 1)/81 = (85/8 + 64/8)/81 =
(149/8)/81 = 149/648
Var(Y) = E(Y²)−(E(Y))² = 149/648 − 1/4 = 149/648 − 162/648 = −13/648

Note: Since variance cannot be negative, let us recheck. E(Y²)=149/648≈0.2299 and (E(Y))²=(1/2)²=0.25. This
gives negative variance, suggesting a recheck of E(X⁶).
E(X⁸ /3... wait, Y=(X³+1)/9 → Y²=(X³+1)²/81
E(X⁶ )=(1/3)∫₋ ₁ ² x⁶ dx=(1/3)[x⁷ /7]₋ ₁ ²=(1/3)(128/7+1/7)=(1/3)(129/7)=43/7
E(Y²)=(43/7+7+1)/81=(43/7+56/7)/81=(99/7)/81=99/567=11/63
Var(Y)=11/63−1/4=44/252−63/252=−19/252 → still negative
Recheck E(X³) carefully:
E(X³)=∫₋ ₁ ²x³·(x²/3)dx=(1/3)∫₋ ₁ ²x⁵ dx=(1/3)[x⁶ /6]₋ ₁ ²=(1/3)(64/6−1/6)=63/18=7
/2 ✓
Recheck E(X⁶):
E(X⁶ )=(1/3)∫₋ ₁ ²x⁶ dx=(1/3)[x⁷ /7]₋ ₁ ²=(1/3)[(128−(−1))/7]=(1/3)(129/7)=43/7≈6
.143
E(Y)=(7/2+1)/9=9/2/9=1/2 ✓
E(Y²)=(E(X⁶)+2E(X³)+1)/81=(43/7+7+1)/81=(43/7+8)/81=(43/7+56/7)/81=99/(7×81)=99/567=11/63≈0.1746
Var(Y)=11/63−(1/2)²=11/63−1/4=44/252−63/252 → still negative
Check if E(Y) calculation is correct: E(Y)=E[(X³+1)/9]=(E(X³)+1)/9=(7/2+1)/9=(9/2)/9=1/2
Something is off with E(X³). Let us redo carefully:
∫₋ ₁ ² x⁵ dx = [x⁶ /6]₋ ₁ ² = (64/6)−(1/6) = 63/6 = 21/2
E(X³) = (1/3)(21/2) = 7/2 ✓
∫₋ ₁ ² x⁷ dx = [x⁸ /8]₋ ₁ ² = 256/8 − 1/8 = 255/8
E(X⁶ ) = (1/3)(255/8) = 255/24 = 85/8
WAIT: for E(X⁶), integral is ∫x⁶·f(x)dx = ∫x⁶·(x²/3)dx = (1/3)∫x⁸dx NOT x⁶!
E(X⁶ ) = ∫₋ ₁ ² x⁶ ·(x²/3) dx = (1/3)∫₋ ₁ ² x⁸ dx = (1/3)[x⁹ /9]₋ ₁ ² =
(1/3)(512/9+1/9) = (1/3)(513/9) = 513/27 = 19
NOW: Var(Y) = (19+7+1)/81 − 1/4 = 27/81 − 1/4 = 1/3 − 1/4 = 4/12−3/12 = 1/12

E(Y) = 1/2
Var(Y) = E(Y²)−[E(Y)]² = 27/81 − 1/4 = 1/3 − 1/4 = 1/12

Q7. Mean and Variance from MGF

Key: E(X) = M'(0), Var(X) = M''(0) − [M'(0)]²

Part (a): M(t) = (1−t)^(−3), t < 1

M'(t) = 3(1−t)^(−4)·(1) = 3(1−t)^(−4)


E(X) = M'(0) = 3(1)^(−4) = 3
M''(t) = 12(1−t)^(−5)
E(X²) = M''(0) = 12
Var(X) = E(X²)−[E(X)]² = 12−9 = 3

Mean = 3, Variance = 3

Part (b): M(t) = (eᵗ − e⁻ᵗ)/(2t), t ≠ 0

This is the MGF of Uniform(−1,1). Use L'Hopital or Taylor series.


Taylor expansion: eᵗ = 1+t+t²/2!+t³/3!+t⁴/4!+...
eᵗ − e⁻ ᵗ = 2t + 2t³/3! + 2t⁵ /5! + ...
(eᵗ−e⁻ ᵗ)/(2t) = 1 + t²/6 + t⁴ /120 + ...
M'(t) = 2t/6 + 4t³/120 + ... = t/3 + t³/30 + ...
E(X) = M'(0) = 0
M''(t) = 1/3 + 3t²/30 + ...
E(X²) = M''(0) = 1/3
Var(X) = 1/3 − 0 = 1/3
Mean = 0, Variance = 1/3 (consistent with Uniform(−1,1))

Q8. Laplace Distribution: MGF and Four Moments

Given: f(x) = (1/2)e^(−|x|), −∞ < x < ∞

Part (a): Show M(t) = (1−t²)^(−1)

M(t) = E[e^(tX)] = ∫₋ ∞^∞ e^(tx)·(1/2)e^(−|x|) dx


Split at 0:
= (1/2)∫₋ ∞⁰ e^(tx)·e^x dx + (1/2)∫₀ ^∞ e^(tx)·e^(−x) dx
= (1/2)∫₋ ∞⁰ e^((t+1)x) dx + (1/2)∫₀ ^∞ e^((t−1)x) dx
First integral converges if t+1>0 (i.e. t>−1). Second if t−1<0 (i.e. t<1). So |t|<1.
= (1/2)[e^((t+1)x)/(t+1)]₋ ∞⁰ + (1/2)[e^((t−1)x)/(t−1)]₀ ^∞
= (1/2)(1/(t+1)) + (1/2)(−1/(t−1))
= (1/2)(1/(t+1)) + (1/2)(1/(1−t))
= (1/2)·[(1−t)+(1+t)] / [(1+t)(1−t)]
= (1/2)·2/(1−t²) = 1/(1−t²) = (1−t²)^(−1) ✓

M(t) = (1−t²)^(−1), |t| < 1 — Proved

Part (b): First Four Moments using MGF derivatives

Moments: μ'ₙ = M^(n)(0). Easier via series expansion:


M(t) = (1−t²)^(−1) = 1 + t² + t⁴ + t⁶ + ... (geometric series)
Compare with MGF series: M(t) = Σ μ'ₙ tⁿ/n!
1 + t² + t⁴ = 1 + (μ'₂ /2!)t² + (μ'₄ /4!)t⁴ + ...
Coefficient of t⁰: μ'₀ = 1 ✓
Coefficient of t¹: 0 = μ'₁/1! → μ'₁ = E(X) = 0
Coefficient of t²: 1 = μ'₂/2! → μ'₂ = E(X²) = 2
Coefficient of t³: 0 = μ'₃/3! → μ'₃ = E(X³) = 0
Coefficient of t⁴: 1 = μ'₄/4! → μ'₄ = E(X⁴) = 24

μ'₁ = E(X) = 0
μ'₂ = E(X²) = 2
μ'₃ = E(X³) = 0
μ'₄ = E(X⁴) = 24
(Odd moments are 0 by symmetry of Laplace distribution)

Q9. Chebyshev's Inequality — Finding c


Given: μ=20, σ²=36 (σ=6). Find c s.t. P(10 < X < 30) ≥ c
Chebyshev's Inequality: P(|X−μ| < kσ) ≥ 1 − 1/k²

Rewrite the interval (10,30) in terms of |X−μ|:


|X−20| < 10 ↔ −10 < X−20 < 10 ↔ 10 < X < 30 ✓
So k·σ = 10 → k·6 = 10 → k = 5/3
P(|X−20| < 10) ≥ 1 − 1/k² = 1 − 1/(25/9) = 1 − 9/25 = 16/25

c = 16/25 = 0.64 → P(10 < X < 30) ≥ 0.64

Q10. Prove P(X ≥ 2μ) ≤ 1/2 using Markov's Inequality

Markov's Inequality: For X ≥ 0 and a > 0: P(X ≥ a) ≤ E(X)/a

Given: P(X≤0)=0 (so X≥0 a.s.) and E(X)=μ exists.


Apply Markov with a = 2μ:
P(X ≥ 2μ) ≤ E(X)/(2μ) = μ/(2μ) = 1/2

P(X ≥ 2μ) ≤ 1/2 — Proved via Markov's Inequality

Q11. Chernoff Bound: P(X≥a) ≤ e^(−at)·M(t)

Proof using Markov's Inequality and MGF:

For 0 < t < h (proving P(X ≥ a) ≤ e^(−at)M(t)):


Since t > 0: X ≥ a ⟺ tX ≥ ta ⟺ e^(tX) ≥ e^(ta)
(exponential is increasing, so inequality direction preserved)
P(X ≥ a) = P(e^(tX) ≥ e^(ta))
Apply Markov to the non-negative r.v. e^(tX) with threshold e^(ta):
P(e^(tX) ≥ e^(ta)) ≤ E[e^(tX)] / e^(ta) = M(t)/e^(at) =
e^(−at)·M(t) ✓
For −h < t < 0 (proving P(X ≤ a) ≤ e^(−at)M(t)):
Since t < 0: X ≤ a ⟺ tX ≥ ta ⟺ e^(tX) ≥ e^(ta)
(multiplying by negative t flips inequality; then exp preserves
it)
Same Markov argument gives:
P(X ≤ a) = P(e^(tX) ≥ e^(ta)) ≤ E[e^(tX)]/e^(ta) = e^(−at)·M(t) ✓

Both bounds proved using Markov's Inequality applied to e^(tX)


Q12. Lower Bound for P(−2 < X < 8) using Chebyshev

Given: E(X)=3, E(X²)=13


Var(X) = E(X²)−[E(X)]² = 13−9 = 4 → σ=2

Rewrite interval (−2, 8) in terms of |X−μ|:


|X−3| < 5 ↔ −5 < X−3 < 5 ↔ −2 < X < 8 ✓
kσ = 5 → k·2 = 5 → k = 5/2
P(|X−3| < 5) ≥ 1 − 1/k² = 1 − 4/25 = 21/25

P(−2 < X < 8) ≥ 21/25 = 0.84

Q13. Chebyshev Upper Bound vs Exact — Laplace Distribution

Given: Laplace: f(x)=(1/2)e^(−|x|)


From Q8: E(X)=0, E(X²)=2, so σ²=2, σ=√2
Need: P(|X| ≥ 5)

Chebyshev Upper Bound

P(|X−μ| ≥ kσ) ≤ 1/k². Here μ=0, so P(|X| ≥ 5) = P(|X−0| ≥ 5)


kσ = 5 → k·√2 = 5 → k = 5/√2
Chebyshev bound: P(|X| ≥ 5) ≤ 1/k² = 2/25 = 0.08

Chebyshev upper bound: P(|X| ≥ 5) ≤ 2/25 = 0.08

Exact Probability

P(|X| ≥ 5) = 2∫₅ ^∞ (1/2)e^(−x) dx = ∫₅ ^∞ e^(−x) dx = [−e^(−x)]₅ ^∞


= e^(−5)
e^(−5) ≈ 0.0067

Exact probability = e^(−5) ≈ 0.0067


Chebyshev bound = 0.08 vs Exact = 0.0067
Chebyshev gives a loose (conservative) upper bound — exact is ~12× smaller.

— End of Assignment 4 Solutions —

You might also like