Menu Close

Expectation and moments: UPSC Statistics Optional PYQ Solutions (1995–2026)

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

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Let the joint probability density function of X and Y be f(x,y)=34(xy+x22);0<x<1,0<y<2 Find– (i) the marginal probability density functions of X and Y; (ii) E(X) and V(X); (iii) E(Y) and V(Y); (iv) covariance between X and Y; (v) correlation coefficient between X and Y.

2026 · Paper I · Q3a · 20 marks

Solution

Check the density. ∫02∫0134(xy+x22)dxdy=34(12⋅2+16⋅2)=1.\displaystyle\int_0^2\!\!\int_0^1\tfrac34\left(xy+\tfrac{x^2}2\right)dx\,dy=\tfrac34\left(\tfrac12\cdot2+\tfrac16\cdot2\right)=1. ✓

(i) Marginals. fX(x)=∫0234(xy+x22)dy=34(2x+x2)=34x(x+2),0<x<1;f_X(x)=\int_0^2\tfrac34\left(xy+\tfrac{x^2}2\right)dy=\tfrac34(2x+x^2)=\tfrac34x(x+2),\quad 0<x<1; fY(y)=∫0134(xy+x22)dx=34(y2+16)=3y+18,0<y<2.f_Y(y)=\int_0^1\tfrac34\left(xy+\tfrac{x^2}2\right)dx=\tfrac34\left(\tfrac y2+\tfrac16\right)=\frac{3y+1}{8},\quad 0<y<2.

(ii) XX. E(X)=34∫01(x3+2x2)dx=34(14+23)=1116,E(X2)=34∫01(x4+2x3)dx=34(15+12)=2140,E(X)=\tfrac34\int_0^1(x^3+2x^2)\,dx=\tfrac34\left(\tfrac14+\tfrac23\right)=\tfrac{11}{16},\qquad E(X^2)=\tfrac34\int_0^1(x^4+2x^3)\,dx=\tfrac34\left(\tfrac15+\tfrac12\right)=\tfrac{21}{40}, V(X)=2140−121256=671280≈0.0523.V(X)=\tfrac{21}{40}-\tfrac{121}{256}=\tfrac{67}{1280}\approx0.0523.

(iii) YY. E(Y)=18∫02(3y2+y)dy=18(8+2)=54,E(Y2)=18∫02(3y3+y2)dy=18(12+83)=116,E(Y)=\tfrac18\int_0^2(3y^2+y)\,dy=\tfrac18(8+2)=\tfrac54,\qquad E(Y^2)=\tfrac18\int_0^2(3y^3+y^2)\,dy=\tfrac18\left(12+\tfrac83\right)=\tfrac{11}6, V(Y)=116−2516=1348≈0.2708.V(Y)=\tfrac{11}6-\tfrac{25}{16}=\tfrac{13}{48}\approx0.2708.

(iv) Covariance. E(XY)=34∫01∫02(x2y2+x3y2)dydx=34(13⋅83+18⋅2)=34(89+14)=4148,E(XY)=\tfrac34\int_0^1\!\!\int_0^2\left(x^2y^2+\tfrac{x^3y}2\right)dy\,dx=\tfrac34\left(\tfrac13\cdot\tfrac83+\tfrac18\cdot2\right)=\tfrac34\left(\tfrac89+\tfrac14\right)=\tfrac{41}{48}, Cov(X,Y)=4148−1116⋅54=4148−5564=−1192≈−0.0052.\text{Cov}(X,Y)=\tfrac{41}{48}-\tfrac{11}{16}\cdot\tfrac54=\tfrac{41}{48}-\tfrac{55}{64}=-\tfrac1{192}\approx-0.0052.

(v) Correlation. ρ=−1/192671280⋅1348=−52613≈−0.044.\rho=\frac{-1/192}{\sqrt{\frac{67}{1280}\cdot\frac{13}{48}}}=-\sqrt{\frac{5}{2613}}\approx\mathbf{-0.044}. XX and YY are very weakly, negatively correlated. They are not independent: f(x,y)≠fX(x)fY(y)f(x,y)\ne f_X(x)f_Y(y).

✓ Checked by computer We recomputed every integral symbolically in Python (SymPy): E(X)=1116E(X)=\tfrac{11}{16}, V(X)=671280V(X)=\tfrac{67}{1280}, E(Y)=54E(Y)=\tfrac54, V(Y)=1348V(Y)=\tfrac{13}{48}, Cov=−1192\text{Cov}=-\tfrac1{192}, ρ=−0.0437\rho=-0.0437.

↑ Back to the question list

The joint probability mass function of two random variables (X,Y) be P(X=x,Y=y)={(x+1y)(16x)(16)y(56)x+1−y(12)16,y=0,1,2,…,x+1;x=0,1,2,…,16.0,otherwise. Evaluate the following: (i) E(X), Var.(X) (ii) E(Y), Var.(Y) (iii) Cov.(X,Y)

2025 · Paper I · Q2b · 15 marks

Solution

Read the structure. The pmf factorises as P(X=x,Y=y)=(16x)(12)16⏟P(X=x)⋅(x+1y)(16)y(56)x+1−y⏟P(Y=y∣X=x).P(X=x,Y=y)=\underbrace{\binom{16}{x}\left(\tfrac12\right)^{16}}_{P(X=x)}\cdot\underbrace{\binom{x+1}{y}\left(\tfrac16\right)^y\left(\tfrac56\right)^{x+1-y}}_{P(Y=y\mid X=x)}. So X∼B(16,12)X\sim B(16,\tfrac12) and, given X=xX=x, Y∼B(x+1,16)Y\sim B(x+1,\tfrac16).

(i) XX. E(X)=16⋅12=𝟖E(X)=16\cdot\tfrac12=\mathbf 8 and V(X)=16⋅12⋅12=𝟒V(X)=16\cdot\tfrac12\cdot\tfrac12=\mathbf 4.

(ii) YY. E(Y∣X)=X+16E(Y\mid X)=\dfrac{X+1}6 and V(Y∣X)=(X+1)⋅16⋅56=5(X+1)36V(Y\mid X)=(X+1)\cdot\dfrac16\cdot\dfrac56=\dfrac{5(X+1)}{36}. Then E(Y)=E[X+16]=96=𝟑𝟐,E(Y)=E\!\left[\frac{X+1}6\right]=\frac96=\mathbf{\tfrac32}, V(Y)=E[V(Y∣X)]+V[E(Y∣X)]=5⋅936+V(X)36=4536+436=𝟒𝟗𝟑𝟔≈1.361.V(Y)=E[V(Y\mid X)]+V[E(Y\mid X)]=\frac{5\cdot9}{36}+\frac{V(X)}{36}=\frac{45}{36}+\frac4{36}=\mathbf{\tfrac{49}{36}}\approx1.361.

(iii) Covariance. Cov(X,Y)=Cov(X,E(Y∣X))=Cov(X,X+16)=V(X)6=𝟐𝟑.\text{Cov}(X,Y)=\text{Cov}\big(X,E(Y\mid X)\big)=\text{Cov}\!\left(X,\frac{X+1}6\right)=\frac{V(X)}6=\mathbf{\tfrac23}.

✓ Checked by computer We summed the joint pmf over all 170 points with exact fractions in Python: total 1, E(X)=8E(X)=8, V(X)=4V(X)=4, E(Y)=32E(Y)=\tfrac32, V(Y)=4936V(Y)=\tfrac{49}{36}, Cov=23\text{Cov}=\tfrac23.

↑ Back to the question list

Let probability of obtaining Head on a biased coin be 45 and X be the number of heads obtained in a sequence of 25 independent tosses of the coin. The same coin is tossed again X number of times independently and we obtain Y heads. Compute Var.(X+25Y).

2025 · Paper I · Q3a · 20 marks

Solution

Set-up. X∼B(25,45)X\sim B(25,\tfrac45), so E(X)=20E(X)=20 and V(X)=25⋅45⋅15=4V(X)=25\cdot\tfrac45\cdot\tfrac15=4. Given XX, Y∼B(X,45)Y\sim B(X,\tfrac45).

Moments of YY. E(Y∣X)=45XE(Y\mid X)=\tfrac45X and V(Y∣X)=X⋅45⋅15=425XV(Y\mid X)=X\cdot\tfrac45\cdot\tfrac15=\tfrac4{25}X. So E(Y)=45⋅20=16,V(Y)=E[425X]+V(45X)=8025+1625⋅4=3.2+2.56=5.76.E(Y)=\tfrac45\cdot20=16,\qquad V(Y)=E\!\left[\tfrac4{25}X\right]+V\!\left(\tfrac45X\right)=\tfrac{80}{25}+\tfrac{16}{25}\cdot4=3.2+2.56=5.76. (Equivalently, each of the 25 first tosses leads to a head on the second round with probability 45⋅45=1625\tfrac45\cdot\tfrac45=\tfrac{16}{25}, so Y∼B(25,1625)Y\sim B(25,\tfrac{16}{25}) and V(Y)=25⋅1625⋅925=5.76V(Y)=25\cdot\tfrac{16}{25}\cdot\tfrac9{25}=5.76.)

Covariance. Cov(X,Y)=Cov(X,E(Y∣X))=45V(X)=3.2\text{Cov}(X,Y)=\text{Cov}\big(X,E(Y\mid X)\big)=\tfrac45V(X)=3.2.

Answer. Var(X+25Y)=V(X)+625V(Y)+2⋅25Cov(X,Y)=4+3600+160=𝟑𝟕𝟔𝟒.\text{Var}(X+25Y)=V(X)+625\,V(Y)+2\cdot25\,\text{Cov}(X,Y)=4+3600+160=\mathbf{3764}.

✓ Checked by computer We computed Var(X+25Y)\text{Var}(X+25Y) exactly in Python by summing over the joint distribution of (X,Y)(X,Y): 3764.

↑ Back to the question list

If (X,Y) have the joint probability density function g(x,y)={ye−y(x+1),x≥0,y≥00,elsewhere, then find the regression curve of X on Y and comment on the nature of the curve.

2025 · Paper I · Q6a(ii) · 8 marks

Solution

Marginal of YY. gY(y)=∫0∞ye−y(x+1)dx=e−y∫0∞ye−yxdx=e−y,y>0.g_Y(y)=\int_0^\infty y\,e^{-y(x+1)}\,dx=e^{-y}\int_0^\infty y\,e^{-yx}\,dx=e^{-y},\qquad y>0. So Y∼Y\sim Exp(1).

Conditional of XX given Y=yY=y. g(x∣y)=ye−y(x+1)e−y=ye−yx,x≥0.g(x\mid y)=\frac{y\,e^{-y(x+1)}}{e^{-y}}=y\,e^{-yx},\qquad x\ge0. That is, X∣Y=yX\mid Y=y is exponential with rate yy (mean 1/y1/y).

Regression curve of XX on YY. E(X∣Y=y)=1y,y>0.E(X\mid Y=y)=\frac1y,\qquad y>0.

Comment. The regression curve x=1/yx=1/y is a rectangular hyperbola, not a straight line. The regression is non-linear, so a least-squares line would describe the relation poorly. As yy grows the conditional mean falls towards 0, and as y→0y\to0 it shoots up. In fact E(X)=E(1/Y)=∫0∞e−y/ydyE(X)=E(1/Y)=\int_0^\infty e^{-y}/y\,dy diverges, so XX has no finite mean.

✓ Checked by computer We checked the marginal of YY and E(X∣Y=y)=1/yE(X\mid Y=y)=1/y symbolically in Python (SymPy).

↑ Back to the question list

Let the joint probability density function of two random variables X and Y be f(x,y)={x3,0<2x<3y<60,otherwise Compute the following: E(Y|X=x)

2024 · Paper I · Q2a(i) · 10 marks

Solution

The support. 0<2x<3y<60<2x<3y<6 means 0<x<30<x<3 and 2x3<y<2\tfrac{2x}3<y<2. Check: ∫03x3(2−2x3)dx=[x23−2x327]03=3−2=1\displaystyle\int_0^3\frac x3\left(2-\frac{2x}3\right)dx=\left[\frac{x^2}3-\frac{2x^3}{27}\right]_0^3=3-2=1. ✓

011.523012xyy = 2y = 2x/3Y | X = 1.5
The density is x/3 on the shaded triangle 0 < 2x < 3y < 6. For a fixed x, y runs from 2x/3 to 2 (gold segment, drawn for x = 1.5), and f does not depend on y there, so Y | X = x is uniform on that interval.

Marginal of XX. fX(x)=∫2x/32x3dy=x3(2−2x3)=2x3(1−x3),0<x<3.f_X(x)=\int_{2x/3}^2\frac x3\,dy=\frac x3\left(2-\frac{2x}3\right)=\frac{2x}3\left(1-\frac x3\right),\qquad 0<x<3.

Conditional of YY. f(y∣x)=x/3fX(x)=12−2x/3,2x3<y<2.f(y\mid x)=\frac{x/3}{f_X(x)}=\frac{1}{2-2x/3},\qquad \frac{2x}3<y<2. So Y∣X=xY\mid X=x is uniform on (2x3,2)\left(\tfrac{2x}3,\,2\right).

Answer. The mean of a uniform distribution is the midpoint: E(Y∣X=x)=12(2x3+2)=𝟏+𝐱𝟑,0<x<3.E(Y\mid X=x)=\frac12\left(\frac{2x}3+2\right)=\mathbf{1+\frac x3},\qquad 0<x<3.

✓ Checked by computer We checked in SymPy that the density integrates to 1, and recomputed E(Y∣X=x)=1+x/3E(Y\mid X=x)=1+x/3.

↑ Back to the question list

E(var(Y|X=x))

2024 · Paper I · Q2a(ii) · 10 marks

Solution

(This continues the 2024 question above, with f(x,y)=x/3f(x,y)=x/3 on 0<2x<3y<60<2x<3y<6.)

Conditional variance. Y∣X=xY\mid X=x is uniform on (2x3,2)\left(\tfrac{2x}3,2\right), an interval of length 2−2x3=2(1−x3)2-\tfrac{2x}3=2\left(1-\tfrac x3\right). So Var(Y∣X=x)=[2(1−x/3)]212=13(1−x3)2.\text{Var}(Y\mid X=x)=\frac{\left[2(1-x/3)\right]^2}{12}=\frac13\left(1-\frac x3\right)^2.

Average over XX. With fX(x)=2x3(1−x3)f_X(x)=\tfrac{2x}3\left(1-\tfrac x3\right) on (0,3)(0,3), E[Var(Y∣X)]=∫0313(1−x3)2⋅2x3(1−x3)dx.E[\text{Var}(Y\mid X)]=\int_0^3\frac13\left(1-\frac x3\right)^2\cdot\frac{2x}3\left(1-\frac x3\right)dx. Put u=x/3u=x/3, dx=3dudx=3\,du: =∫0113(1−u)2⋅2u(1−u)⋅3du=2∫01u(1−u)3du=2B(2,4)=2⋅1!3!5!=𝟏𝟏𝟎.=\int_0^1\frac13(1-u)^2\cdot2u(1-u)\cdot3\,du=2\int_0^1u(1-u)^3\,du=2\,B(2,4)=2\cdot\frac{1!\,3!}{5!}=\mathbf{\frac1{10}}.

✓ Checked by computer We computed the integral in SymPy: E[Var(Y∣X)]=110E[\text{Var}(Y\mid X)]=\tfrac1{10}.

↑ Back to the question list

Let X and Y be independent random variables with exponential distribution having respective means 1λ1 and 1λ2, λ1>0,λ2>0. Find E[max(X,Y)].

2022 · Paper I · Q1a · 10 marks

Solution

Idea. max(X,Y)+min(X,Y)=X+Y\max(X,Y)+\min(X,Y)=X+Y, and the minimum of independent exponentials is again exponential.

The minimum. P(min(X,Y)>t)=P(X>t)P(Y>t)=e−λ1te−λ2t=e−(λ1+λ2)t.P(\min(X,Y)>t)=P(X>t)P(Y>t)=e^{-\lambda_1t}e^{-\lambda_2t}=e^{-(\lambda_1+\lambda_2)t}. So min(X,Y)∼\min(X,Y)\sim Exp(λ1+λ2)(\lambda_1+\lambda_2), with mean 1λ1+λ2\dfrac1{\lambda_1+\lambda_2}.

Answer. E[max(X,Y)]=E(X)+E(Y)−E[min(X,Y)]=𝟏𝛌𝟏+𝟏𝛌𝟐−𝟏𝛌𝟏+𝛌𝟐.E[\max(X,Y)]=E(X)+E(Y)-E[\min(X,Y)]=\mathbf{\frac1{\lambda_1}+\frac1{\lambda_2}-\frac1{\lambda_1+\lambda_2}}. (For λ1=λ2=λ\lambda_1=\lambda_2=\lambda this is 32λ\tfrac{3}{2\lambda}.)

✓ 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.

↑ Back to the question list

Let X and Y be independent and identically distributed exponential random variables with mean λ>0. Define Z={1,if X<Y0,if X≥Y Find E[X∣Z=1]+E[X∣Z=0].

2021 · Paper I · Q1c · 10 marks

Solution

Set-up. X,YX,Y are i.i.d. exponential with mean λ\lambda, so P(Z=1)=P(X<Y)=12P(Z=1)=P(X<Y)=\tfrac12.

E[X∣Z=1]E[X\mid Z=1]. On {X<Y}\{X<Y\}, X=min(X,Y)X=\min(X,Y). The minimum is exponential with mean λ/2\lambda/2, and it is independent of which variable is smaller (by the memoryless property). So E[X∣Z=1]=E[min(X,Y)]=λ2.E[X\mid Z=1]=E[\min(X,Y)]=\frac\lambda2.

E[X∣Z=0]E[X\mid Z=0]. On {X≥Y}\{X\ge Y\}, X=max(X,Y)X=\max(X,Y). By memorylessness, after the minimum the larger one runs on for a further Exp(mean λ\lambda) time, so E[X∣Z=0]=E[max(X,Y)]=λ2+λ=3λ2.E[X\mid Z=0]=E[\max(X,Y)]=\frac\lambda2+\lambda=\frac{3\lambda}2.

Check. E(X)=12⋅λ2+12⋅3λ2=λE(X)=\tfrac12\cdot\tfrac\lambda2+\tfrac12\cdot\tfrac{3\lambda}2=\lambda. ✓

Answer. E[X∣Z=1]+E[X∣Z=0]=λ2+3λ2=𝟐𝛌.E[X\mid Z=1]+E[X\mid Z=0]=\dfrac\lambda2+\dfrac{3\lambda}2=\mathbf{2\lambda}.

✓ Checked by computer We checked by simulation in Python (10⁶ pairs, λ = 2): E[X∣Z=1]=0.999E[X\mid Z=1]=0.999, E[X∣Z=0]=2.998E[X\mid Z=0]=2.998, sum 3.997 against 2λ=42\lambda=4.

↑ Back to the question list

Let f(x,y)=e−yx22y3/2e−y2π,−∞<x<∞,y>0. (i) Obtain the marginal distribution of Y and conditional distribution of X given Y. (ii) Find E(Y),V(Y),E(X∣Y),V(X∣Y). (iii) Use (ii) to find E(X),V(X).

2021 · Paper I · Q4b · 15 marks

Solution

(i) Marginal of YY. For fixed yy, ∫−∞∞e−yx2/2dx=2π/y\int_{-\infty}^\infty e^{-yx^2/2}dx=\sqrt{2\pi/y}, so fY(y)=y3/2e−y2π2πy=ye−y,y>0.f_Y(y)=\frac{y^{3/2}e^{-y}}{\sqrt{2\pi}}\sqrt{\frac{2\pi}y}=y\,e^{-y},\qquad y>0. YY is Gamma(2, 1).

Conditional of XX. f(x∣y)=f(x,y)fY(y)=y2πe−yx2/2,−∞<x<∞.f(x\mid y)=\frac{f(x,y)}{f_Y(y)}=\sqrt{\frac y{2\pi}}\,e^{-yx^2/2},\qquad -\infty<x<\infty. So X∣Y=y∼N(0,1y)X\mid Y=y\sim N\!\left(0,\ \tfrac1y\right).

(ii) Moments. E(Y)=2,V(Y)=2(Gamma(2,1));E(X∣Y)=0,V(X∣Y)=1Y.E(Y)=2,\qquad V(Y)=2\quad(\text{Gamma}(2,1));\qquad E(X\mid Y)=0,\qquad V(X\mid Y)=\frac1Y.

(iii) Unconditional moments of XX. E(X)=E[E(X∣Y)]=𝟎,E(X)=E[E(X\mid Y)]=\mathbf 0, V(X)=E[V(X∣Y)]+V[E(X∣Y)]=E(1Y)+0=∫0∞1yye−ydy=𝟏.V(X)=E[V(X\mid Y)]+V[E(X\mid Y)]=E\!\left(\frac1Y\right)+0=\int_0^\infty\frac1y\,y\,e^{-y}\,dy=\mathbf 1.

✓ Checked by computer We checked in SymPy that fY(y)=ye−yf_Y(y)=ye^{-y}, E(Y)=V(Y)=2E(Y)=V(Y)=2 and E(1/Y)=1E(1/Y)=1.

↑ Back to the question list

Let X∼ uniform U(0,2θ),θ>0 distribution. Define Y=max(X,2θ−X). Find E(Y).

2020 · Paper I · Q3b · 15 marks

Solution

Distribution of YY. Y=max(X,2θ−X)Y=\max(X,2\theta-X) is the larger of the two distances of XX from the two ends, so θ≤Y≤2θ\theta\le Y\le2\theta. For θ≤y≤2θ\theta\le y\le2\theta, P(Y≤y)=P(X≤y and 2θ−X≤y)=P(2θ−y≤X≤y)=2y−2θ2θ=y−θθ.P(Y\le y)=P(X\le y\text{ and }2\theta-X\le y)=P(2\theta-y\le X\le y)=\frac{2y-2\theta}{2\theta}=\frac{y-\theta}\theta. So Y∼U(θ,2θ)Y\sim U(\theta,2\theta).

Answer. E(Y)=θ+2θ2=𝟑𝛉𝟐.E(Y)=\frac{\theta+2\theta}2=\mathbf{\frac{3\theta}2}. (Directly: E(Y)=12θ[∫0θ(2θ−x)dx+∫θ2θxdx]=12θ[3θ22+3θ22]=3θ2E(Y)=\dfrac1{2\theta}\left[\int_0^\theta(2\theta-x)\,dx+\int_\theta^{2\theta}x\,dx\right]=\dfrac1{2\theta}\left[\dfrac{3\theta^2}2+\dfrac{3\theta^2}2\right]=\dfrac{3\theta}2.)

✓ Checked by computer We checked by simulation in Python (10⁶ draws, θ = 1.5): mean of YY = 2.2499 against 3θ/2=2.253\theta/2=2.25.

↑ Back to the question list

If the random variable X follows normal distribution N(μ,1), then find the expectation of Y=1−Φ(X)ϕ(X), where Φ and ϕ denote the cumulative distribution function and probability density function respectively of N(0,1), the standard normal distribution.

2017 · Paper I · Q4b · 15 marks

Solution

Note on the question. The answer depends on the sign of μ\mu: E(Y)E(Y) is finite only for μ>0\mu>0. We find it for μ>0\mu>0 and show why it is infinite otherwise.

Set up the integral. The density of X∼N(μ,1)X\sim N(\mu,1) is ϕ(x−μ)\phi(x-\mu), and ϕ(x−μ)ϕ(x)=eμx−μ2/2\dfrac{\phi(x-\mu)}{\phi(x)}=e^{\mu x-\mu^2/2}. So E(Y)=∫−∞∞1−Φ(x)ϕ(x)ϕ(x−μ)dx=e−μ2/2∫−∞∞(1−Φ(x))eμxdx.E(Y)=\int_{-\infty}^\infty\frac{1-\Phi(x)}{\phi(x)}\,\phi(x-\mu)\,dx=e^{-\mu^2/2}\int_{-\infty}^\infty\big(1-\Phi(x)\big)e^{\mu x}\,dx.

Integrate by parts (μ>0\mu>0). With u=1−Φ(x)u=1-\Phi(x) and dv=eμxdxdv=e^{\mu x}dx: ∫−∞∞(1−Φ(x))eμxdx=[(1−Φ(x))eμxμ]−∞∞+1μ∫−∞∞ϕ(x)eμxdx.\int_{-\infty}^\infty\big(1-\Phi(x)\big)e^{\mu x}dx=\left[\big(1-\Phi(x)\big)\frac{e^{\mu x}}\mu\right]_{-\infty}^{\infty}+\frac1\mu\int_{-\infty}^\infty\phi(x)e^{\mu x}\,dx.

  • At +∞+\infty: 1−Φ(x)≤ϕ(x)/x1-\Phi(x)\le\phi(x)/x decays like e−x2/2e^{-x^2/2}, which beats eμxe^{\mu x}, so the term is 0.
  • At −∞-\infty: 1−Φ→11-\Phi\to1 and eμx→0e^{\mu x}\to0 (since μ>0\mu>0), so the term is 0.
  • ∫ϕ(x)eμxdx=E(eμZ)=eμ2/2\displaystyle\int\phi(x)e^{\mu x}dx=E(e^{\mu Z})=e^{\mu^2/2}, the m.g.f. of N(0,1)N(0,1).

Answer. E(Y)=e−μ2/2⋅1μeμ2/2=𝟏𝛍(μ>0).E(Y)=e^{-\mu^2/2}\cdot\frac1\mu e^{\mu^2/2}=\mathbf{\frac1\mu}\qquad(\mu>0). For μ≤0\mu\le0 the integrand (1−Φ(x))eμx\big(1-\Phi(x)\big)e^{\mu x} does not tend to 0 as x→−∞x\to-\infty (it tends to 1 when μ=0\mu=0 and grows when μ<0\mu<0), so the integral diverges and E(Y)=+∞E(Y)=+\infty.

(YY is Mills’ ratio R(X)=1−Φ(X)ϕ(X)R(X)=\dfrac{1-\Phi(X)}{\phi(X)}.)

✓ Derivation checked step by step Every step was checked. We also computed E(Y)E(Y) numerically in Python for μ = 0.5, 1 and 2: 2.000, 1.000 and 0.500, exactly 1/μ1/\mu.

↑ Back to the question list

A box contains N tickets numbered 1 to N. A boy draws n tickets from the box randomly. If X1,X2,…,Xn be the numbers of tickets drawn, what is E{maxXi}?

2016 · Paper I · Q1a · 10 marks

Solution

Note on the question. We take the usual reading: the nn tickets are drawn without replacement (n≤Nn\le N). The with-replacement answer is given at the end.

Distribution of M=maxXiM=\max X_i. All (Nn)\binom Nn sets of tickets are equally likely. M=kM=k when ticket kk is drawn and the other n−1n-1 come from 1,…,k−11,\dots,k-1: P(M=k)=(k−1n−1)(Nn),k=n,…,N.P(M=k)=\frac{\binom{k-1}{n-1}}{\binom Nn},\qquad k=n,\dots,N.

Expectation. Use k(k−1n−1)=n(kn)k\binom{k-1}{n-1}=n\binom kn and the hockey-stick identity ∑k=nN(kn)=(N+1n+1)\sum_{k=n}^N\binom kn=\binom{N+1}{n+1}: E(M)=n∑k=nN(kn)(Nn)=n(N+1n+1)(Nn)=𝐧(𝐍+𝟏)𝐧+𝟏.E(M)=\frac{n\sum_{k=n}^N\binom kn}{\binom Nn}=\frac{n\binom{N+1}{n+1}}{\binom Nn}=\mathbf{\frac{n(N+1)}{n+1}}.

Check. n=1n=1 gives N+12\tfrac{N+1}2, the mean of one ticket. n=Nn=N gives NN. ✓

With replacement. P(M≤k)=(k/N)nP(M\le k)=(k/N)^n, so E(M)=∑k=0N−1P(M>k)=N−∑k=1N−1(kN)nE(M)=\sum_{k=0}^{N-1}P(M>k)=N-\sum_{k=1}^{N-1}\left(\dfrac kN\right)^n.

✓ Checked by computer We checked the formula by listing every sample in Python (N = 7, n = 3): average maximum 6.0, equal to n(N+1)/(n+1)n(N+1)/(n+1).

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

For a continuous non-negative random variable X with E(X)<∞, show that for t>0. E(X−t∣X>t)=1F‾(t)∫t∞F‾(x)dx, where F‾(x)=P(X>x). Evaluate the conditional expectation for the exponential model specified by F‾(x)=e−x/λ;x>0.

2012 · Paper I · Q2b · 20 marks

Solution

Step 1: write the conditional expectation as a ratio. E(X−t∣X>t)=E[(X−t)𝟏{X>t}]P(X>t)=E[(X−t)+]F‾(t).E(X-t\mid X>t)=\frac{E\big[(X-t)\,\mathbf 1\{X>t\}\big]}{P(X>t)}=\frac{E\big[(X-t)^+\big]}{\bar F(t)}.

Step 2: the tail formula. For a non-negative variable WW, E(W)=∫0∞P(W>u)duE(W)=\int_0^\infty P(W>u)\,du. Apply it to W=(X−t)+W=(X-t)^+: E[(X−t)+]=∫0∞P(X−t>u)du=∫0∞F‾(t+u)du=∫t∞F‾(x)dx.E\big[(X-t)^+\big]=\int_0^\infty P(X-t>u)\,du=\int_0^\infty\bar F(t+u)\,du=\int_t^\infty\bar F(x)\,dx. (The integral is finite because E(X)<∞E(X)<\infty.)

Conclusion. E(X−t∣X>t)=1F‾(t)∫t∞F‾(x)dx.◼E(X-t\mid X>t)=\frac1{\bar F(t)}\int_t^\infty\bar F(x)\,dx.\qquad\blacksquare This is the mean residual life at age tt.

Exponential model. With F‾(x)=e−x/λ\bar F(x)=e^{-x/\lambda}, E(X−t∣X>t)=∫t∞e−x/λdxe−t/λ=λe−t/λe−t/λ=𝛌.E(X-t\mid X>t)=\frac{\int_t^\infty e^{-x/\lambda}dx}{e^{-t/\lambda}}=\frac{\lambda e^{-t/\lambda}}{e^{-t/\lambda}}=\mathbf{\lambda}. The expected remaining life is λ\lambda whatever the age tt: 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 F‾(x)=e−x/λ\bar F(x)=e^{-x/\lambda} the expression equals λ\lambda.

↑ Back to the question list

The joint probability density function of random variables X and Y is given as f(x,y)={k(y2−x2)e−y,if |x|<y,y>00,otherwise Comment on independence and correlation between X and Y.

2010 · Paper I · Q2b · 20 marks

Solution

Find kk. For fixed yy, ∫−yy(y2−x2)dx=2y3−23y3=43y3\int_{-y}^y(y^2-x^2)\,dx=2y^3-\tfrac23y^3=\tfrac43y^3. So 1=k∫0∞43y3e−ydy=k⋅43⋅3!=8k⇒k=18.1=k\int_0^\infty\tfrac43y^3e^{-y}\,dy=k\cdot\tfrac43\cdot3!=8k\quad\Rightarrow\quad k=\tfrac18.

Independence. The support {|x|<y}\{|x|<y\} is not a rectangle: if Y=1Y=1 then |X|<1|X|<1, but if Y=5Y=5, XX can be 4. Formally, the marginal of YY is fY(y)=16y3e−yf_Y(y)=\tfrac16y^3e^{-y} for y>0y>0, and fX(x)>0f_X(x)>0 for every real xx. So fX(x)fY(y)>0f_X(x)f_Y(y)>0 at (4,1)(4,1), where f(4,1)=0f(4,1)=0. Hence XX and YY are not independent.

Correlation. f(−x,y)=f(x,y)f(-x,y)=f(x,y), so given Y=yY=y the distribution of XX is symmetric about 0 and E(X∣Y)=0E(X\mid Y)=0. Therefore E(X)=0,Cov(X,Y)=E(XY)−E(X)E(Y)=E[YE(X∣Y)]=0.E(X)=0,\qquad\text{Cov}(X,Y)=E(XY)-E(X)E(Y)=E\big[Y\,E(X\mid Y)\big]=0. So ρ(X,Y)=0\rho(X,Y)=0: XX and YY 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 XX, which grows with YY (V(X∣Y=y)=y2/5V(X\mid Y=y)=y^2/5).

✓ Checked by computer We checked in SymPy that k=18k=\tfrac18 and E(XY)=0E(XY)=0.

↑ Back to the question list

2 sets of n cards, both numbered from 1 to n, are randomly matched. Find E(X) and V(X) where X is the number of matches realised.

2009 · Paper I · Q1b · 12 marks

Solution

Indicators. Let Ik=1I_k=1 if card kk of the first set is matched with card kk of the second, else 0. Then X=∑k=1nIkX=\sum_{k=1}^nI_k, with E(Ik)=P(Ik=1)=1n,E(IjIk)=P(Ij=Ik=1)=1n(n−1)(j≠k).E(I_k)=P(I_k=1)=\frac1n,\qquad E(I_jI_k)=P(I_j=I_k=1)=\frac1{n(n-1)}\quad(j\ne k).

Mean. E(X)=n⋅1n=𝟏E(X)=n\cdot\dfrac1n=\mathbf 1.

Variance. V(Ik)=1n(1−1n)V(I_k)=\dfrac1n\left(1-\dfrac1n\right) and Cov(Ij,Ik)=1n(n−1)−1n2=1n2(n−1)\text{Cov}(I_j,I_k)=\dfrac1{n(n-1)}-\dfrac1{n^2}=\dfrac1{n^2(n-1)}. So V(X)=n⋅n−1n2+n(n−1)⋅1n2(n−1)=n−1n+1n=𝟏(n≥2).V(X)=n\cdot\frac{n-1}{n^2}+n(n-1)\cdot\frac1{n^2(n-1)}=\frac{n-1}n+\frac1n=\mathbf 1\qquad(n\ge2).

Both answers are 1, whatever the value of nn. (For large nn, XX 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.

↑ Back to the question list

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?

2009 · Paper I · Q4a · 20 marks

Solution

Set-up. Let D∼D\sim Exp(mean 25) be the demand and SS the stock. The profit is Rs 20 per kg sold and −Rs 10 per kg left over: π(S)=20min(D,S)−10(S−D)+.\pi(S)=20\min(D,S)-10\,(S-D)^+.

Expected profit and its derivative. ddSE[π(S)]=20P(D>S)−10P(D≤S).\frac{d}{dS}E[\pi(S)]=20\,P(D>S)-10\,P(D\le S). (Adding one more kg earns 20 if it sells, which happens when D>SD>S, and loses 10 if it does not.)

Optimum. Set the derivative to zero: 20(1−F(S))=10F(S)⇒F(S*)=2020+10=23.20\big(1-F(S)\big)=10F(S)\ \Rightarrow\ F(S^*)=\frac{20}{20+10}=\frac23. The second derivative is −30f(S)<0-30f(S)<0, so this is a maximum.

Solve. F(S)=1−e−S/25=23⇒e−S/25=13F(S)=1-e^{-S/25}=\tfrac23\Rightarrow e^{-S/25}=\tfrac13, so S*=25ln3≈27.5𝐤𝐠.S^*=25\ln3\approx\mathbf{27.5\ kg}.

Expected profit at the optimum. Emin(D,S*)=25(1−e−S*/25)=503E\min(D,S^*)=25\left(1-e^{-S^*/25}\right)=\tfrac{50}3 kg, and E(S*−D)+=S*−503≈10.80E(S^*-D)^+=S^*-\tfrac{50}3\approx10.80 kg. So the expected profit is 20⋅503−10⋅10.80≈20\cdot\tfrac{50}3-10\cdot10.80\approx Rs 225 a day.

020406080-1000100200stock procured S (kg)expected profit (Rs)S* = 25 ln 3 ≈ 27.5 kg
Expected profit 20·E[min(D, S)] − 10·E[(S − D)⁺] for exponential demand with mean 25 kg. The peak, about Rs 225 a day, is at S* = 25 ln 3 ≈ 27.5 kg.

✓ Checked by computer We recomputed S*=25ln3=27.47S^*=25\ln3=27.47 kg and the expected profit (Rs 225.35 a day) in Python, and checked that it is lower one kg either side.

↑ Back to the question list

(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 x+2y and 2x+y (iv) When is a statistic called the best unbiased estimate of a parameter?

2001 · Paper I · Q1e · 12 marks

Solution

(i) Exponential distribution. For f(x)=θe−θxf(x)=\theta e^{-\theta x}, x>0x>0: E(X)=∫0∞xθe−θxdx=1θ,E(X2)=2θ2,V(X)=2θ2−1θ2=1θ2.E(X)=\int_0^\infty x\,\theta e^{-\theta x}dx=\frac1\theta,\qquad E(X^2)=\frac2{\theta^2},\qquad V(X)=\frac2{\theta^2}-\frac1{\theta^2}=\frac1{\theta^2}. (Mean θ\theta and variance θ2\theta^2 if the density is written 1θe−x/θ\tfrac1\theta e^{-x/\theta}.)

(ii) Reproductive property of the Poisson. If X1,…,XkX_1,\dots,X_k are independent with Xi∼P(λi)X_i\sim P(\lambda_i), then X1+⋯+Xk∼P(λ1+⋯+λk).X_1+\cdots+X_k\sim P(\lambda_1+\cdots+\lambda_k). Proof by m.g.f.: ∏ieλi(et−1)=e(∑λi)(et−1)\prod_ie^{\lambda_i(e^t-1)}=e^{(\sum\lambda_i)(e^t-1)}.

(iii) Correlation. V(x)=V(y)=1V(x)=V(y)=1 and Cov(x,y)=0.4\text{Cov}(x,y)=0.4. V(x+2y)=1+4+2⋅2⋅0.4=6.6,V(2x+y)=4+1+2⋅2⋅0.4=6.6,V(x+2y)=1+4+2\cdot2\cdot0.4=6.6,\qquad V(2x+y)=4+1+2\cdot2\cdot0.4=6.6, Cov(x+2y,2x+y)=2V(x)+Cov(x,y)+4Cov(y,x)+2V(y)=2+0.4+1.6+2=6.\text{Cov}(x+2y,\,2x+y)=2V(x)+\text{Cov}(x,y)+4\,\text{Cov}(y,x)+2V(y)=2+0.4+1.6+2=6. r=66.6×6.6=66.6=1011≈0.909.r=\frac{6}{\sqrt{6.6\times6.6}}=\frac{6}{6.6}=\frac{10}{11}\approx\mathbf{0.909}.

(iv) Best unbiased estimate. A statistic TT is the best (minimum variance) unbiased estimator of θ\theta if

  1. it is unbiased: Eθ(T)=θE_\theta(T)=\theta for all θ\theta, and
  2. for any other unbiased estimator T′T', Vθ(T)≤Vθ(T′)V_\theta(T)\le V_\theta(T') for every θ\theta.

Such a TT 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.

↑ Back to the question list

Define expectation of a random variable (r.v.). Show that if X is a non-negative r.v. with distribution function F then E(X)=∫0∞(1−F(x))dx, provided the expectation exists.

2000 · Paper I · Q2a(i) · 8 marks

Solution

Definition. For a random variable XX with distribution function FF, the expectation is E(X)=∫−∞∞xdF(x),E(X)=\int_{-\infty}^{\infty}x\,dF(x), provided ∫|x|dF(x)<∞\int|x|\,dF(x)<\infty. This is ∑xxP(X=x)\sum_xx\,P(X=x) for a discrete variable and ∫xf(x)dx\int xf(x)\,dx for a continuous one.

Result. If X≥0X\ge0, then E(X)=∫0∞(1−F(x))dxE(X)=\displaystyle\int_0^\infty\big(1-F(x)\big)\,dx.

Proof. Write x=∫0xdt=∫0∞𝟏{t<x}dtx=\int_0^x dt=\int_0^\infty\mathbf 1\{t<x\}\,dt for x≥0x\ge0. Then E(X)=∫0∞xdF(x)=∫0∞∫0∞𝟏{t<x}dtdF(x).E(X)=\int_0^\infty x\,dF(x)=\int_0^\infty\!\!\int_0^\infty\mathbf 1\{t<x\}\,dt\,dF(x). The integrand is non-negative, so by Tonelli’s theorem we may swap the order: E(X)=∫0∞(∫(t,∞)dF(x))dt=∫0∞P(X>t)dt=∫0∞(1−F(t))dt.◼E(X)=\int_0^\infty\left(\int_{(t,\infty)}dF(x)\right)dt=\int_0^\infty P(X>t)\,dt=\int_0^\infty\big(1-F(t)\big)\,dt.\qquad\blacksquare

(Geometrically, E(X)E(X) is the area between the graph of FF and the line y=1y=1, 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.

↑ Back to the question list

If X is an integer-valued random variable, prove that E(x)=∑k=0∞P(X>k). Prove the corresponding result for a non-negative continuous random variable.

1999 · Paper I · Q3a · 25 marks

Solution

Note on the question. The identity needs XX to be non-negative integer-valued (X∈{0,1,2,…}X\in\{0,1,2,\dots\}). For example, if X=−1X=-1 always, the right side is 0 but E(X)=−1E(X)=-1.

Discrete case. For X∈{0,1,2,…}X\in\{0,1,2,\dots\}, ∑k=0∞P(X>k)=∑k=0∞∑j=k+1∞P(X=j).\sum_{k=0}^\infty P(X>k)=\sum_{k=0}^\infty\sum_{j=k+1}^\infty P(X=j). All terms are non-negative, so we may change the order of summation. For a fixed jj, the index kk runs over 0,1,…,j−10,1,\dots,j-1, which is jj values: ∑j=1∞∑k=0j−1P(X=j)=∑j=1∞jP(X=j)=E(X).◼\sum_{j=1}^\infty\sum_{k=0}^{j-1}P(X=j)=\sum_{j=1}^\infty j\,P(X=j)=E(X).\qquad\blacksquare

Picture: write the probabilities in a triangle. Row kk holds P(X=k+1),P(X=k+2),…P(X=k+1),P(X=k+2),\dots, whose sum is P(X>k)P(X>k). Column jj holds P(X=j)P(X=j) exactly jj times. Summing by rows gives the left side, and by columns gives E(X)E(X).

Continuous case. If X≥0X\ge0 has density ff, then ∫0∞P(X>x)dx=∫0∞∫x∞f(t)dtdx=∫0∞(∫0tdx)f(t)dt=∫0∞tf(t)dt=E(X).◼\int_0^\infty P(X>x)\,dx=\int_0^\infty\!\!\int_x^\infty f(t)\,dt\,dx=\int_0^\infty\!\left(\int_0^t dx\right)f(t)\,dt=\int_0^\infty t\,f(t)\,dt=E(X).\qquad\blacksquare Again the swap is valid because the integrand is non-negative (Tonelli).

Example. For X∼X\sim Geometric on {0,1,…}\{0,1,\dots\} with P(X>k)=qk+1P(X>k)=q^{k+1}: E(X)=∑k≥0qk+1=qpE(X)=\sum_{k\ge0}q^{k+1}=\dfrac qp, 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.

↑ Back to the question list

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.

1999 · Paper I · Q3b · 15 marks

Solution

Model. Each trial picks one of the nn keys at random, with replacement. So each trial succeeds with probability p=1np=\tfrac1n, independently. The number of trials XX up to and including the first success is geometric: P(X=k)=(1−1n)k−11n,k=1,2,…P(X=k)=\left(1-\frac1n\right)^{k-1}\frac1n,\qquad k=1,2,\dots

Mean and variance. E(X)=1p=𝐧,V(X)=1−pp2=(1−1n)n2=𝐧(𝐧−𝟏).E(X)=\frac1p=\mathbf n,\qquad V(X)=\frac{1-p}{p^2}=\left(1-\frac1n\right)n^2=\mathbf{n(n-1)}.

(If the failed keys were set aside, XX would be uniform on {1,…,n}\{1,\dots,n\}, with mean n+12\tfrac{n+1}2 and variance n2−112\tfrac{n^2-1}{12}.)

✓ Checked by computer We recomputed in Python: for n = 6 keys, mean 6 and variance 30.

↑ Back to the question list

(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 E(XX+Y)=12.

1998 · Paper I · Q2a · 10 marks

Solution

(i) Mean deviation and standard deviation. The mean is x‾=11+15+19+234=17\bar x=\tfrac{11+15+19+23}4=17, and the deviations are −6,−2,2,6-6,-2,2,6. MD=6+2+2+64=4,SD=36+4+4+364=20=25≈4.472.\text{MD}=\frac{6+2+2+6}4=4,\qquad \text{SD}=\sqrt{\frac{36+4+4+36}4}=\sqrt{20}=2\sqrt5\approx4.472. So SD=52MD≈1.118MD\text{SD}=\tfrac{\sqrt5}2\,\text{MD}\approx1.118\,\text{MD}: the SD is larger than the MD. This always holds: MD≤SD\text{MD}\le\text{SD}, because the root-mean-square of the |xi−x‾||x_i-\bar x| is at least their mean. (For normal data, MD≈45SD\text{MD}\approx\tfrac45\,\text{SD}.)

(ii) E(XX+Y)=12E\left(\dfrac X{X+Y}\right)=\dfrac12.

Note on the question. “Symmetric” here means that XX and YY are exchangeable: (X,Y)(X,Y) has the same distribution as (Y,X)(Y,X), for example when X,YX,Y are i.i.d. We also need X+Y≠0X+Y\ne0 and the expectation to exist (say X,Y>0X,Y>0).

Proof. Exchangeability gives XX+Y=dYY+X\dfrac X{X+Y}\overset d=\dfrac Y{Y+X}, so the two have the same expectation: E(XX+Y)=E(YX+Y).E\left(\frac X{X+Y}\right)=E\left(\frac Y{X+Y}\right). Their sum is E(X+YX+Y)=1E\left(\dfrac{X+Y}{X+Y}\right)=1. So each equals 12\dfrac12. ◼\blacksquare

✓ Checked by computer We recomputed the mean deviation (4) and standard deviation (4.472) in Python.

↑ Back to the question list

Let X and Y be jointly distributed with p.d.f. f(x,y)={x+y,0<x<1,0<y<10,otherwise Find marginals conditional distributions and correlation coefficient.

1998 · Paper I · Q2b · 20 marks

Solution

Marginals. fX(x)=∫01(x+y)dy=x+12,0<x<1;fY(y)=y+12,0<y<1.f_X(x)=\int_0^1(x+y)\,dy=x+\tfrac12,\quad0<x<1;\qquad f_Y(y)=y+\tfrac12,\quad0<y<1.

Conditional distributions. f(y∣x)=x+yx+12,0<y<1;f(x∣y)=x+yy+12,0<x<1.f(y\mid x)=\frac{x+y}{x+\frac12},\quad0<y<1;\qquad f(x\mid y)=\frac{x+y}{y+\frac12},\quad0<x<1. These depend on the conditioning value, so XX and YY are not independent.

Moments. By symmetry, XX and YY have the same moments. E(X)=∫01x(x+12)dx=13+14=712,E(X2)=14+16=512,E(X)=\int_0^1x\left(x+\tfrac12\right)dx=\tfrac13+\tfrac14=\tfrac7{12},\qquad E(X^2)=\tfrac14+\tfrac16=\tfrac5{12}, V(X)=512−49144=11144,E(XY)=∫01∫01xy(x+y)dxdy=16+16=13.V(X)=\tfrac5{12}-\tfrac{49}{144}=\tfrac{11}{144},\qquad E(XY)=\int_0^1\!\!\int_0^1xy(x+y)\,dx\,dy=\tfrac16+\tfrac16=\tfrac13. Cov(X,Y)=13−49144=−1144.\text{Cov}(X,Y)=\tfrac13-\tfrac{49}{144}=-\tfrac1{144}.

Correlation coefficient. ρ=−1/14411/144=−𝟏𝟏𝟏≈−0.091.\rho=\frac{-1/144}{11/144}=\mathbf{-\frac1{11}}\approx-0.091.

✓ Checked by computer We recomputed the moments in SymPy: E(X)=712E(X)=\tfrac7{12}, V(X)=11144V(X)=\tfrac{11}{144}, Cov=−1144\text{Cov}=-\tfrac1{144}, ρ=−111\rho=-\tfrac1{11}.

↑ Back to the question list

Let X and Y be jointly distributed with pdf f(x,y)={14(1+xy),|x|<1,|y|<10,otherwise Find the correlation coefficient between X and Y.

1997 · Paper I · Q2a · 20 marks

Solution

Marginals. fX(x)=∫−1114(1+xy)dy=12\displaystyle f_X(x)=\int_{-1}^1\tfrac14(1+xy)\,dy=\tfrac12 on (−1,1)(-1,1), since ∫−11ydy=0\int_{-1}^1y\,dy=0. Likewise fY(y)=12f_Y(y)=\tfrac12. Both are U(−1,1)U(-1,1), so E(X)=E(Y)=0,V(X)=V(Y)=13.E(X)=E(Y)=0,\qquad V(X)=V(Y)=\tfrac13.

Product moment. E(XY)=14∫−11∫−11(xy+x2y2)dxdy=14(0+23⋅23)=19.E(XY)=\tfrac14\int_{-1}^1\!\!\int_{-1}^1(xy+x^2y^2)\,dx\,dy=\tfrac14\left(0+\tfrac23\cdot\tfrac23\right)=\tfrac19.

Correlation. ρ=1/9−013⋅13=𝟏𝟑.\rho=\frac{1/9-0}{\sqrt{\frac13\cdot\frac13}}=\mathbf{\frac13}. (Note: both marginals are uniform, yet XX and YY are correlated, since f(x,y)≠fX(x)fY(y)f(x,y)\ne f_X(x)f_Y(y).)

✓ Checked by computer We recomputed the moments in SymPy: E(X)=0E(X)=0, E(X2)=13E(X^2)=\tfrac13, E(XY)=19E(XY)=\tfrac19, ρ=13\rho=\tfrac13.

↑ Back to the question list

An urn contains 3 red and 2 white balls. A random sample of two balls is drawn with replacement. Let X=0 if the first ball drawn is white and X=1 if the first ball drawn is red. Let Y=0 if the second ball drawn is white and Y=1 if the second ball drawn is red. Find the conditional expectation E[X/Y].

1995 · Paper I · Q2c · 20 marks

Solution

Joint distribution. The draws are with replacement, so the two draws are independent, each red with probability 35\tfrac35:

Y=0Y=0 Y=1Y=1 Total
X=0X=0 425\tfrac4{25} 625\tfrac6{25} 25\tfrac25
X=1X=1 625\tfrac6{25} 925\tfrac9{25} 35\tfrac35
Total 25\tfrac25 35\tfrac35 1

Conditional expectation. E(X∣Y=0)=P(X=1,Y=0)P(Y=0)=6/252/5=35,E(X∣Y=1)=9/253/5=35.E(X\mid Y=0)=\frac{P(X=1,Y=0)}{P(Y=0)}=\frac{6/25}{2/5}=\frac35,\qquad E(X\mid Y=1)=\frac{9/25}{3/5}=\frac35.

Answer. E(X∣Y)=𝟑𝟓E(X\mid Y)=\mathbf{\tfrac35} whatever the value of YY. This is because XX and YY are independent, so E(X∣Y)=E(X)E(X\mid Y)=E(X).

(Had the balls been drawn without replacement, E(X∣Y=0)=34E(X\mid Y=0)=\tfrac34 and E(X∣Y=1)=12E(X\mid Y=1)=\tfrac12.)

✓ Checked by computer We recomputed the joint table and the conditional means with exact fractions.

↑ Back to the question list

More on Probability

Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 1995–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted