Pratidin
2026 · Statistics Optional Paper I · 10 marksMainsQuestion 2ai

Find the moment generating function (m.g.f.) of a random variable X with probability density function (p.d.f.)
f(x) = x, 0 ≤ x < 1
= 2 − x, 1 ≤ x < 2
= 0, otherwise
Using this m.g.f., find E(X) and V(X).

10 marks · directive: Find

Answer

The core of a good answer

M_X(t) = (e^t − 1)²/t² for t ≠ 0 (and M_X(0) = 1); expanding, M_X(t) = 1 + t + (7/12)t² + …, so E(X) = 1, E(X²) = 7/6 and V(X) = 1/6.

An outline written by upsc.help, not an official UPSC answer; every fact checked by a separate review. How we work

What the question asks

The m.g.f. is found by integrating e^{tx} f(x) over the two pieces (integration by parts). The moments must then be extracted from the m.g.f. itself, either by series expansion or by differentiation at t = 0; because the closed form has t² in the denominator, the series route is cleaner.

Answer outline

Introduction

M_X(t) = E(e^{tX}) = ∫₀¹ x e^{tx} dx + ∫₁² (2 − x) e^{tx} dx. This is the triangular distribution on (0, 2) with mode 1; it is the distribution of the sum of two independent U(0, 1) variables.

Step 1: First integral

Step 2: Second integral

Step 3: Add

Step 4: Series

Step 5: Moments

Conclusion

E(X) = 1 and V(X) = 1/6. Check: the sum of two independent U(0, 1) variables has mean 1/2 + 1/2 = 1 and variance 1/12 + 1/12 = 1/6. The m.g.f. and moments were verified symbolically in Python.

Examples and data to cite

Facts

Facts to remember

Sources used for the explanation

Write a timed answer in the app