All 24 questions UPSC has asked on expectation and moments in the Statistics Optional (Paper I, Probability) from 1995 to 2026, solved step by step – latest first.
Try them yourself first: the same questions, without solutions, are on our Probability topic-wise PYQs page.
How we check these solutions
These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:
- ✓ Checked by computer the numbers were worked out again independently in code (Python with NumPy/SciPy) and matched.
- ✓ Proof checked step by step for “prove that” and “examine whether” questions, every step was checked against the definitions and the standard theorems.
- ✓ Derivation checked step by step for derivations and approximations, every step was checked, and the result was also tested numerically.
Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.
Jump to a question (year · question number):
2026 · 3a 2025 · 2b 2025 · 3a 2025 · 6a(ii) 2024 · 2a(i) 2024 · 2a(ii) 2022 · 1a 2021 · 1c 2021 · 4b 2020 · 3b 2017 · 4b 2016 · 1a 2012 · 2b 2010 · 2b 2009 · 1b 2009 · 4a 2001 · 1e 2000 · 2a(i) 1999 · 3a 1999 · 3b 1998 · 2a 1998 · 2b 1997 · 2a 1995 · 2c
Let the joint probability density function of and be Find– (i) the marginal probability density functions of and ; (ii) and ; (iii) and ; (iv) covariance between and ; (v) correlation coefficient between and .
Solution
Check the density. ✓
(i) Marginals.
(ii) .
(iii) .
(iv) Covariance.
(v) Correlation. and are very weakly, negatively correlated. They are not independent: .
✓ Checked by computer We recomputed every integral symbolically in Python (SymPy): , , , , , .
The joint probability mass function of two random variables be Evaluate the following: (i) , (ii) , (iii)
Solution
Read the structure. The pmf factorises as So and, given , .
(i) . and .
(ii) . and . Then
(iii) Covariance.
✓ Checked by computer We summed the joint pmf over all 170 points with exact fractions in Python: total 1, , , , , .
Let probability of obtaining Head on a biased coin be and be the number of heads obtained in a sequence of 25 independent tosses of the coin. The same coin is tossed again number of times independently and we obtain heads. Compute .
Solution
Set-up. , so and . Given , .
Moments of . and . So (Equivalently, each of the 25 first tosses leads to a head on the second round with probability , so and .)
Covariance. .
Answer.
✓ Checked by computer We computed exactly in Python by summing over the joint distribution of : 3764.
If have the joint probability density function then find the regression curve of on and comment on the nature of the curve.
Solution
Marginal of . So Exp(1).
Conditional of given . That is, is exponential with rate (mean ).
Regression curve of on .
Comment. The regression curve is a rectangular hyperbola, not a straight line. The regression is non-linear, so a least-squares line would describe the relation poorly. As grows the conditional mean falls towards 0, and as it shoots up. In fact diverges, so has no finite mean.
✓ Checked by computer We checked the marginal of and symbolically in Python (SymPy).
Let the joint probability density function of two random variables and be Compute the following:
Solution
The support. means and . Check: . ✓
Marginal of .
Conditional of . So is uniform on .
Answer. The mean of a uniform distribution is the midpoint:
✓ Checked by computer We checked in SymPy that the density integrates to 1, and recomputed .
Solution
(This continues the 2024 question above, with on .)
Conditional variance. is uniform on , an interval of length . So
Average over . With on , Put , :
✓ Checked by computer We computed the integral in SymPy: .
Let and be independent random variables with exponential distribution having respective means and , . Find .
Solution
Idea. , and the minimum of independent exponentials is again exponential.
The minimum. So Exp, with mean .
Answer. (For this is .)
✓ Checked by computer We checked the formula by simulation in Python (10⁶ pairs, λ₁ = 1.3, λ₂ = 0.7): 1.6972 simulated against 1.6978 from the formula.
Let and be independent and identically distributed exponential random variables with mean . Define Find .
Solution
Set-up. are i.i.d. exponential with mean , so .
. On , . The minimum is exponential with mean , and it is independent of which variable is smaller (by the memoryless property). So
. On , . By memorylessness, after the minimum the larger one runs on for a further Exp(mean ) time, so
Check. . ✓
Answer.
✓ Checked by computer We checked by simulation in Python (10⁶ pairs, λ = 2): , , sum 3.997 against .
Let (i) Obtain the marginal distribution of and conditional distribution of given . (ii) Find . (iii) Use (ii) to find .
Solution
(i) Marginal of . For fixed , , so is Gamma(2, 1).
Conditional of . So .
(ii) Moments.
(iii) Unconditional moments of .
✓ Checked by computer We checked in SymPy that , and .
Let uniform distribution. Define . Find .
Solution
Distribution of . is the larger of the two distances of from the two ends, so . For , So .
Answer. (Directly: .)
✓ Checked by computer We checked by simulation in Python (10⁶ draws, θ = 1.5): mean of = 2.2499 against .
If the random variable follows normal distribution , then find the expectation of , where and denote the cumulative distribution function and probability density function respectively of , the standard normal distribution.
Solution
Note on the question. The answer depends on the sign of : is finite only for . We find it for and show why it is infinite otherwise.
Set up the integral. The density of is , and . So
Integrate by parts (). With and :
- At : decays like , which beats , so the term is 0.
- At : and (since ), so the term is 0.
- , the m.g.f. of .
Answer. For the integrand does not tend to 0 as (it tends to 1 when and grows when ), so the integral diverges and .
( is Mills’ ratio .)
✓ Derivation checked step by step Every step was checked. We also computed numerically in Python for μ = 0.5, 1 and 2: 2.000, 1.000 and 0.500, exactly .
A box contains tickets numbered 1 to . A boy draws tickets from the box randomly. If be the numbers of tickets drawn, what is ?
Solution
Note on the question. We take the usual reading: the tickets are drawn without replacement (). The with-replacement answer is given at the end.
Distribution of . All sets of tickets are equally likely. when ticket is drawn and the other come from :
Expectation. Use and the hockey-stick identity :
Check. gives , the mean of one ticket. gives . ✓
With replacement. , so .
✓ Checked by computer We checked the formula by listing every sample in Python (N = 7, n = 3): average maximum 6.0, equal to .
For a continuous non-negative random variable with , show that for . where . Evaluate the conditional expectation for the exponential model specified by .
Solution
Step 1: write the conditional expectation as a ratio.
Step 2: the tail formula. For a non-negative variable , . Apply it to : (The integral is finite because .)
Conclusion. This is the mean residual life at age .
Exponential model. With , The expected remaining life is whatever the age : this is the memoryless property of the exponential distribution.
✓ Proof checked step by step Every step was checked against the tail formula for expectations. We also confirmed in SymPy that for the expression equals .
The joint probability density function of random variables and is given as Comment on independence and correlation between and .
Solution
Find . For fixed , . So
Independence. The support is not a rectangle: if then , but if , can be 4. Formally, the marginal of is for , and for every real . So at , where . Hence and are not independent.
Correlation. , so given the distribution of is symmetric about 0 and . Therefore So : and are uncorrelated.
Comment. This is a standard example where zero correlation does not imply independence. The dependence is not linear: it shows in the spread of , which grows with ().
✓ Checked by computer We checked in SymPy that and .
2 sets of cards, both numbered from 1 to , are randomly matched. Find and where is the number of matches realised.
Solution
Indicators. Let if card of the first set is matched with card of the second, else 0. Then , with
Mean. .
Variance. and . So
Both answers are 1, whatever the value of . (For large , is close to Poisson(1).)
✓ Checked by computer We checked by listing every permutation in Python for n = 2, 5 and 8: the mean and variance of the number of matches are both 1.
The daily demand (in kg) of fish of a certain variety upto 12 noon with a retailer follows exponential law with mean 25. He makes a profit of Rs. 20 on an average for each kg he is able to sell by 12 noon, and incurs a loss of Rs. 10 on an average for each kg that remains unsold after 12 noon. What is the optimum daily stock he should procure?
Solution
Set-up. Let Exp(mean 25) be the demand and the stock. The profit is Rs 20 per kg sold and −Rs 10 per kg left over:
Expected profit and its derivative. (Adding one more kg earns 20 if it sells, which happens when , and loses 10 if it does not.)
Optimum. Set the derivative to zero: The second derivative is , so this is a maximum.
Solve. , so
Expected profit at the optimum. kg, and kg. So the expected profit is Rs 225 a day.
✓ Checked by computer We recomputed kg and the expected profit (Rs 225.35 a day) in Python, and checked that it is lower one kg either side.
(i) Obtain the mean and the variance of the exponential distribution. (ii) Write down the reproductive property of the Poisson distribution. (iii) If x and y have unit variances and correlation 0.4, find the correlation between and (iv) When is a statistic called the best unbiased estimate of a parameter?
Solution
(i) Exponential distribution. For , : (Mean and variance if the density is written .)
(ii) Reproductive property of the Poisson. If are independent with , then Proof by m.g.f.: .
(iii) Correlation. and .
(iv) Best unbiased estimate. A statistic is the best (minimum variance) unbiased estimator of if
- it is unbiased: for all , and
- for any other unbiased estimator , for every .
Such a is called the UMVUE.
✓ Checked by computer We recomputed the correlation in part (iii) in Python: 6/6.6 = 0.909. Parts (i), (ii) and (iv) were checked against the standard results.
Define expectation of a random variable (r.v.). Show that if X is a non-negative r.v. with distribution function F then provided the expectation exists.
Solution
Definition. For a random variable with distribution function , the expectation is provided . This is for a discrete variable and for a continuous one.
Result. If , then .
Proof. Write for . Then The integrand is non-negative, so by Tonelli’s theorem we may swap the order:
(Geometrically, is the area between the graph of and the line , to the right of 0.)
✓ Proof checked step by step Every step was checked: the interchange of the order of integration is justified by Tonelli’s theorem, since the integrand is non-negative.
If X is an integer-valued random variable, prove that . Prove the corresponding result for a non-negative continuous random variable.
Solution
Note on the question. The identity needs to be non-negative integer-valued (). For example, if always, the right side is 0 but .
Discrete case. For , All terms are non-negative, so we may change the order of summation. For a fixed , the index runs over , which is values:
Picture: write the probabilities in a triangle. Row holds , whose sum is . Column holds exactly times. Summing by rows gives the left side, and by columns gives .
Continuous case. If has density , then Again the swap is valid because the integrand is non-negative (Tonelli).
Example. For Geometric on with : , the familiar mean.
✓ Proof checked step by step Every step was checked: the rearrangement of the double sum (and the double integral) is justified because all terms are non-negative.
A man with n keys wants to open his door and tries the keys independently and at random. Only one key fits the door. Find the mean and variance of the number of trials required to open the door if unsuccessful keys are not eliminated from further selections.
Solution
Model. Each trial picks one of the keys at random, with replacement. So each trial succeeds with probability , independently. The number of trials up to and including the first success is geometric:
Mean and variance.
(If the failed keys were set aside, would be uniform on , with mean and variance .)
✓ Checked by computer We recomputed in Python: for n = 6 keys, mean 6 and variance 30.
(i) What is the relationship between standard deviation and mean deviation of the data 11, 15, 19 and 23 [?]? (ii) if X and Y are symmetric show that
Solution
(i) Mean deviation and standard deviation. The mean is , and the deviations are . So : the SD is larger than the MD. This always holds: , because the root-mean-square of the is at least their mean. (For normal data, .)
(ii) .
Note on the question. “Symmetric” here means that and are exchangeable: has the same distribution as , for example when are i.i.d. We also need and the expectation to exist (say ).
Proof. Exchangeability gives , so the two have the same expectation: Their sum is . So each equals .
✓ Checked by computer We recomputed the mean deviation (4) and standard deviation (4.472) in Python.
Let X and Y be jointly distributed with p.d.f. Find marginals conditional distributions and correlation coefficient.
Solution
Marginals.
Conditional distributions. These depend on the conditioning value, so and are not independent.
Moments. By symmetry, and have the same moments.
Correlation coefficient.
✓ Checked by computer We recomputed the moments in SymPy: , , , .
Let X and Y be jointly distributed with pdf Find the correlation coefficient between X and Y.
Solution
Marginals. on , since . Likewise . Both are , so
Product moment.
Correlation. (Note: both marginals are uniform, yet and are correlated, since .)
✓ Checked by computer We recomputed the moments in SymPy: , , , .
An urn contains 3 red and 2 white balls. A random sample of two balls is drawn with replacement. Let if the first ball drawn is white and if the first ball drawn is red. Let if the second ball drawn is white and if the second ball drawn is red. Find the conditional expectation .
Solution
Joint distribution. The draws are with replacement, so the two draws are independent, each red with probability :
| Total | |||
|---|---|---|---|
| Total | 1 |
Conditional expectation.
Answer. whatever the value of . This is because and are independent, so .
(Had the balls been drawn without replacement, and .)
✓ Checked by computer We recomputed the joint table and the conditional means with exact fractions.
More on Probability
- All Statistics PYQ solutions, topic by topic
- Probability topic-wise PYQs (questions only, for practice)
- Statistics PYQ analysis: which units carry the marks year by year
- Year-wise question papers
- Statistics booklist
Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 1995–2026. Solutions: Optional Province. Found an error? Tell us.

