Menu Close

Testing of hypotheses: UPSC Statistics Optional PYQ Solutions (1995–2025)

All 46 questions UPSC has asked on testing of hypotheses in the Statistics Optional (Paper I, Statistical Inference) from 1995 to 2025, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Statistical Inference 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.
  • ✓ Answer checked step by step for descriptive questions, every point was checked against the standard theory.

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):

2025 · 1e 2024 · 1e 2024 · 4a 2022 · 1e 2021 · 1e 2020 · 1e 2020 · 2a 2019 · 1d 2019 · 2c 2018 · 2c 2018 · 4b 2017 · 4c 2016 · 1e 2015 · 2c 2015 · 3c 2014 · 4a 2013 · 1d 2013 · 3b 2011 · 4c 2009 · 1e 2009 · 4c 2007 · 4a 2007 · 4b 2006 · 1d 2006 · 3c 2005 · 4b 2004 · 1e 2004 · 3b 2004 · 3c 2003 · 4a 2002 · 3b 2001 · 1a 2001 · 1c 2000 · 4a(i) 2000 · 4a(ii) 1998 · 6a 1998 · 6b 1998 · 6c 1997 · 7a 1997 · 7b 1997 · 7c 1996 · 6a 1996 · 6b 1995 · 6a 1995 · 6b 1995 · 6c

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

A random variable X has the following distribution under H0 and H1:

x 1 2 3 4 5 6
f0(x) 0·01 0·01 0·01 0·01 0·01 0·95
f1(x) 0·05 0·04 0·03 0·02 0·01 0·85

Find the best test of size 0·03 and its probability of type-II error for testing H0:f=f0 versus H1:f=f1. Is it unbiased test? Why?

2025 · Paper I · Q1e · 10 marks

Solution

Neyman–Pearson lemma. The best (most powerful) test rejects H0H_0 at the values of xx with the largest ratio λ(x)=f1(x)/f0(x)\lambda(x)=f_1(x)/f_0(x), adding points until the size reaches α\alpha.

xx 1 2 3 4 5 6
f0(x)f_0(x) 0.01 0.01 0.01 0.01 0.01 0.95
f1(x)f_1(x) 0.05 0.04 0.03 0.02 0.01 0.85
λ(x)\lambda(x) 5 4 3 2 1 0.89

Best critical region of size 0.03. Take the three largest ratios, x=1,2,3x=1,2,3: W={1,2,3},P(W∣H0)=0.01+0.01+0.01=0.03.W=\{1,2,3\},\qquad P(W\mid H_0)=0.01+0.01+0.01=0.03 .

Power and type II error. Power=P(W∣H1)=0.05+0.04+0.03=0.12,β=1−0.12=0.88.\text{Power}=P(W\mid H_1)=0.05+0.04+0.03=0.12,\qquad\beta=1-0.12=0.88 .

Is it unbiased? Yes. A test is unbiased if its power is at least its size. Here 0.12>0.030.12>0.03. (Every most powerful test is unbiased: the test that ignores the data and rejects with probability α\alpha has power α\alpha, so the MP test cannot do worse.)

✓ Checked by computer We computed the likelihood ratios, the size (0.03) and the power (0.12) in Python.

↑ Back to the question list

For testing H0:μ=100 vs. H1:μ≠100, a random sample of size 50 is drawn from a normal population with unknown mean μ and variance 200. If α=0⋅05, then obtain the critical region.

2024 · Paper I · Q1e · 10 marks

Solution

Test statistic. σ2=200\sigma^2=200 is known and n=50n=50, so Z=X‾−100σ/n=X‾−100200/50=X‾−1002∼N(0,1) under H0.Z=\frac{\bar X-100}{\sigma/\sqrt n}=\frac{\bar X-100}{\sqrt{200/50}}=\frac{\bar X-100}2\ \sim\ N(0,1)\ \text{ under }H_0 .

Critical region. The alternative μ≠100\mu\ne100 is two-sided, so at α=0.05\alpha=0.05 we reject when |Z|>1.96|Z|>1.96: |x‾−100|>1.96×2=3.92.|\bar x-100|>1.96\times2=3.92 . W={x‾<96.08}∪{x‾>103.92}.W=\{\bar x<96.08\}\cup\{\bar x>103.92\}.

✓ Checked by computer We checked: the standard error is √(200/50) = 2, so the limits are 100 ± 3.92.

↑ Back to the question list

Find the most powerful test of size α(=0⋅05) for testing H0:μ=0 vs. H1:μ=1, given a random sample of size 25 from N(μ,16) population.

2024 · Paper I · Q4a · 20 marks

Solution

Neyman–Pearson ratio. σ2=16\sigma^2=16, n=25n=25. For μ1=1>μ0=0\mu_1=1>\mu_0=0, L1L0=exp{nσ2[(μ1−μ0)x‾−12(μ12−μ02)]},\frac{L_1}{L_0}=\exp\Big\{\frac{n}{\sigma^2}\big[(\mu_1-\mu_0)\bar x-\tfrac12(\mu_1^2-\mu_0^2)\big]\Big\}, which increases with x‾\bar x. So the MP test rejects H0H_0 when x‾>c\bar x>c.

Critical value. Under H0H_0, X‾∼N(0,16/25)\bar X\sim N(0,16/25), so its standard deviation is 4/5=0.84/5=0.8: P(X‾>c∣μ=0)=0.05⇒c0.8=1.645⇒c=1.316.P(\bar X>c\mid\mu=0)=0.05\ \Rightarrow\ \frac c{0.8}=1.645\ \Rightarrow\ c=1.316 .

MP test. Reject H0:μ=0H_0:\mu=0 if x‾>1.316\bar x>1.316.

Power. Under μ=1\mu=1: P(X‾>1.316∣μ=1)=P(Z>1.316−10.8)=P(Z>0.395)=0.346.P(\bar X>1.316\mid\mu=1)=P\Big(Z>\frac{1.316-1}{0.8}\Big)=P(Z>0.395)=0.346 .

−3−2−10123400.5x̄densityα = 0.05β = 0.654c = 1.316: reject →under H₀: μ = 0under H₁: μ = 1
The sampling distribution of x̄ (SD 0.8) under H₀ and H₁. The test rejects to the right of 1.316. The red tail is α = 0.05; the gold area is the type II error β = 0.654, so the power is 0.346.

✓ Checked by computer We computed the critical value 1.316 and the power 0.346 in Python.

↑ Back to the question list

An urn contains 5 marbles of which θ are white and the others black. In order to test null hypothesis H0:θ=3 versus alternative hypothesis H1:θ=4, two marbles are drawn at random. H0 is rejected if both the marbles are white, otherwise H0 is accepted. Show that probability of type I error in case of without replacement and with replacement schemes, both are less than 0.40, but power of the test under with replacement is higher than that of under without replacement scheme.

2022 · Paper I · Q1e · 10 marks

Solution

The test rejects H0H_0 when both marbles are white.

Without replacement. P(both white∣θ)=(θ2)(52).P(\text{both white}\mid\theta)=\frac{\binom\theta2}{\binom52}.

  • Type I error (θ=3\theta=3): 310=0.30\dfrac{3}{10}=0.30.
  • Power (θ=4\theta=4): 610=0.60\dfrac{6}{10}=0.60.

With replacement. P(both white∣θ)=(θ5)2.P(\text{both white}\mid\theta)=\Big(\frac\theta5\Big)^2 .

  • Type I error (θ=3\theta=3): 925=0.36\dfrac9{25}=0.36.
  • Power (θ=4\theta=4): 1625=0.64\dfrac{16}{25}=0.64.

Conclusion. Both type I errors (0.30 and 0.36) are below 0.40. The power with replacement (0.64) is higher than the power without replacement (0.60). ◼\blacksquare

(With replacement also has a larger type I error, so the comparison is not at equal size.)

✓ Checked by computer We computed the four probabilities exactly: 3/10, 6/10, 9/25 and 16/25.

↑ Back to the question list

Let f(x,θ) be the Cauchy pdf f(x,θ)=θπ1θ2+x2;−∞<x<∞,θ>0 (i) Show that this family does not have Monotone Likelihood Ratio (MLR). (ii) If X is one observation from f(x,θ), show that |X| is sufficient for θ and hence the distribution of |X| does have an MLR.

2021 · Paper I · Q1e · 10 marks

Solution

(i) No MLR in xx. For θ2>θ1\theta_2>\theta_1, λ(x)=f(x,θ2)f(x,θ1)=θ2θ1⋅θ12+x2θ22+x2.\lambda(x)=\frac{f(x,\theta_2)}{f(x,\theta_1)}=\frac{\theta_2}{\theta_1}\cdot\frac{\theta_1^2+x^2}{\theta_2^2+x^2}. This depends on xx only through x2x^2, so λ(−x)=λ(x)\lambda(-x)=\lambda(x). A non-constant even function cannot be monotone. For example, with θ1=1\theta_1=1, θ2=2\theta_2=2: λ(−3)=1.54,λ(0)=0.5,λ(3)=1.54.\lambda(-3)=1.54,\qquad\lambda(0)=0.5,\qquad\lambda(3)=1.54 . The ratio falls and then rises as xx increases. So the family has no MLR in xx.

(ii) |X||X| is sufficient. f(x,θ)=θπ⋅1θ2+|x|2f(x,\theta)=\dfrac\theta\pi\cdot\dfrac1{\theta^2+|x|^2} depends on xx only through |x||x|. By the factorisation theorem (with h(x)=1h(x)=1), |X||X| is sufficient for θ\theta.

|X||X| has MLR. Y=|X|Y=|X| has density g(y,θ)=2θπ(θ2+y2)g(y,\theta)=\dfrac{2\theta}{\pi(\theta^2+y^2)}, y>0y>0. For θ2>θ1\theta_2>\theta_1, g(y,θ2)g(y,θ1)=θ2θ1⋅θ12+y2θ22+y2=θ2θ1[1−θ22−θ12θ22+y2],\frac{g(y,\theta_2)}{g(y,\theta_1)}=\frac{\theta_2}{\theta_1}\cdot\frac{\theta_1^2+y^2}{\theta_2^2+y^2}=\frac{\theta_2}{\theta_1}\Big[1-\frac{\theta_2^2-\theta_1^2}{\theta_2^2+y^2}\Big], which is strictly increasing in y>0y>0. So the distribution of |X||X| has MLR in |X||X|. ◼\blacksquare

✓ Proof checked step by step Every step was checked: the likelihood ratio is not monotone in x, and it is monotone in |x|. We also evaluated the ratio at several points in Python.

↑ Back to the question list

Let X1 and X2 be two iid random variables with normal N(θ,1) distribution. Further, consider Bernoulli random variable V with P(V=1)=14 and which is independent of X1 and X2. Define X3 as X3={X1,if V=0X2,if V=1 For testing the hypothesis H0:θ=0 versus H1:θ=1, consider the test Reject H0 if X1+X2+X33>C Find C such that the test size becomes 0.05. Also compute power of the test. [Given that: P(Z>1.64)=0.05, P(|Z|>1.96)=0.05, P(Z>0.30)=0.03821].

2020 · Paper I · Q1e · 10 marks

Solution

Distribution of the test statistic. Let S=X1+X2+X3S=X_1+X_2+X_3.

  • If V=0V=0: S=2X1+X2∼N(3θ,4+1)=N(3θ,5)S=2X_1+X_2\sim N(3\theta,\ 4+1)=N(3\theta,5).
  • If V=1V=1: S=X1+2X2∼N(3θ,5)S=X_1+2X_2\sim N(3\theta,5).

The conditional distribution is the same in both cases, so unconditionally S∼N(3θ,5),S‾=S3∼N(θ,59),SD=53=0.7454.S\sim N(3\theta,5),\qquad\bar S=\frac S3\sim N\Big(\theta,\frac59\Big),\qquad\text{SD}=\frac{\sqrt5}3=0.7454 .

Critical value for size 0.05. P(S‾>C∣θ=0)=0.05⇒C0.7454=1.64⇒C=1.64×0.7454=1.222.P(\bar S>C\mid\theta=0)=0.05\ \Rightarrow\ \frac C{0.7454}=1.64\ \Rightarrow\ C=1.64\times0.7454=1.222 .

Power at θ=1\theta=1. P(S‾>1.222∣θ=1)=P(Z>1.222−10.7454)=P(Z>0.30)=0.382.P(\bar S>1.222\mid\theta=1)=P\Big(Z>\frac{1.222-1}{0.7454}\Big)=P(Z>0.30)=0.382 .

Note on the question. The given value “P(Z>0.30)=0.03821P(Z>0.30)=0.03821” is a misprint for 0.38210.3821.

(Since X3X_3 repeats X1X_1 or X2X_2, the mean of the three has variance 5/95/9, larger than the 1/21/2 of (X1+X2)/2(X_1+X_2)/2. The repeat adds no information, and the test is less powerful than the one based on X1+X2X_1+X_2.)

✓ Checked by computer We checked by simulation (10⁶ draws) that the mean has variance 5/9 whatever V is, that C = 1.2224 gives size 0.051, and that the power is 0.383.

↑ Back to the question list

The lifetime in hours of each bulb manufactured by a particular company follows an independent exponential distribution with mean θ. To test the hypothesis H0:θ=2000 versus H1:θ=1000, an experimenter sets up an experiment with 50 bulbs with 5 bulbs in each of 10 different locations to examine their lifetimes. To get quick preliminary results, the experimenter decides to stop the experiment as soon as one bulb fails at each location. Let Yi denote the lifetime of the first bulb to fail at location i, i=1,2,…,10. Obtain the most powerful test of size 0.05 to test H0 versus H1 based on the available lifetimes. If the available data is 510, 9752, 5650, 12385, 230, 4225, 860, 300, 3000 and 1500, give your conclusion. [Given that: P(χ(20)2<10.851)=0.05].

2020 · Paper I · Q2a · 20 marks

Solution

Distribution of YiY_i. YiY_i is the minimum of 5 independent exponential lifetimes with mean θ\theta: P(Yi>y)=(e−y/θ)5=e−5y/θ,P(Y_i>y)=\big(e^{-y/\theta}\big)^5=e^{-5y/\theta}, so YiY_i is exponential with mean θ/5\theta/5. The ten YiY_i are independent.

Most powerful test. With T=∑i=110YiT=\sum_{i=1}^{10}Y_i, L(θ)=(5θ)10e−5T/θ,L(1000)L(2000)=210exp{−5T(11000−12000)}=210e−T/400,L(\theta)=\Big(\frac5\theta\Big)^{10}e^{-5T/\theta},\qquad\frac{L(1000)}{L(2000)}=2^{10}\exp\Big\{-5T\Big(\frac1{1000}-\frac1{2000}\Big)\Big\}=2^{10}e^{-T/400}, which decreases in TT. So the MP test rejects H0H_0 when T<cT<c.

Critical value. 2⋅5Tθ=10Tθ∼χ202\dfrac{2\cdot5T}\theta=\dfrac{10T}\theta\sim\chi^2_{20}. Under H0H_0 (θ=2000\theta=2000): P(10T2000<10.851)=0.05⇒c=2000×10.85110=2170.2.P\Big(\frac{10T}{2000}<10.851\Big)=0.05\ \Rightarrow\ c=\frac{2000\times10.851}{10}=2170.2 . MP test: reject H0H_0 if ∑Yi<2170.2\sum Y_i<2170.2, that is, if ∑Yi200<10.851\dfrac{\sum Y_i}{200}<10.851.

Data. ∑yi=510+9752+5650+12385+230+4225+860+300+3000+1500=38,412\sum y_i=510+9752+5650+12385+230+4225+860+300+3000+1500=38{,}412. 38,412200=192.06>10.851.\frac{38{,}412}{200}=192.06>10.851 .

Conclusion. We do not reject H0H_0. There is no evidence that the mean life is 1000 hours rather than 2000 hours.

(Note: under H0H_0 each YiY_i has mean 400 hours, so the observed mean of 3841 is far above what either hypothesis predicts. The data look like whole-bulb lifetimes rather than first failures among five. The conclusion, not rejecting H0H_0 in favour of a shorter life, is unaffected.)

✓ Checked by computer We checked: the observed sum is 38,412, the critical value is 2170.2, and the χ² point is 10.851. A simulation confirmed that each Yᵢ has mean θ/5 (400 when θ = 2000).

↑ Back to the question list

The manufacturer of a spot remover claims that his product removes 90% of all spots. If, in a random sample, 17 of 20 spots were removed with the manufacturer’s product, test the null hypothesis H0:θ=0.90 against the alternative hypothesis H1:θ<0.90 at the 0.05 significance level and comment.

2019 · Paper I · Q1d · 10 marks

Solution

Set-up. XX, the number of spots removed out of 20, is B(20,θ)B(20,\theta). We test H0:θ=0.90H_0:\theta=0.90 against H1:θ<0.90H_1:\theta<0.90. Small values of XX support H1H_1.

pp-value. Under H0H_0, P(X≤17)=1−P(18)−P(19)−P(20)=1−0.2852−0.2702−0.1216=0.3231.P(X\le17)=1-P(18)-P(19)-P(20)=1-0.2852-0.2702-0.1216=0.3231 .

Critical region at 5%. P(X≤15)=0.0432P(X\le15)=0.0432 and P(X≤16)=0.1330P(X\le16)=0.1330. So the largest non-randomised region with size at most 0.05 is {X≤15}\{X\le15\}.

Decision. x=17x=17 is not in {X≤15}\{X\le15\}, and the pp-value 0.323>0.050.323>0.05. We do not reject H0H_0.

Comment. Removing 17 of 20 spots (85%) is quite consistent with the claimed 90%. The sample is too small to detect a shortfall of this size.

✓ Checked by computer We computed the binomial probabilities with SciPy: P(X ≤ 17) = 0.3231 and P(X ≤ 15) = 0.0432.

↑ Back to the question list

Let X have the pdf f(x,θ)={1θe−xθ,0<x<∞0,otherwise. To test H0:θ=2 against H1:θ=4, let X1 and X2 be a random sample of size 2. A test is defined by taking critical region as C={(X1,X2);9.5≤X1+X2<∞}. Determine size and power of the test.

2019 · Paper I · Q2c · 15 marks

Solution

Distribution of the sum. S=X1+X2S=X_1+X_2 is gamma with shape 2 and scale θ\theta, so P(S≥c)=e−c/θ(1+cθ).P(S\ge c)=e^{-c/\theta}\Big(1+\frac c\theta\Big).

Size (θ=2\theta=2, c=9.5c=9.5): α=e−4.75(1+4.75)=0.008652×5.75=0.0497.\alpha=e^{-4.75}(1+4.75)=0.008652\times5.75=0.0497 .

Power (θ=4\theta=4): 1−β=e−2.375(1+2.375)=0.09301×3.375=0.3139.1-\beta=e^{-2.375}(1+2.375)=0.09301\times3.375=0.3139 .

✓ Checked by computer We computed the gamma tail probabilities in Python: size 0.0497 and power 0.3139.

↑ Back to the question list

Let x1,x2,…,xn be a random sample from N(0,θ). The variance θ is unknown. Derive the most powerful test for H0:θ=θ0 against H1:θ>θ0, where θ0 is a fixed positive number. Is it a UMP test?

2018 · Paper I · Q2c · 15 marks

Solution

MP test for a simple alternative. Take any θ1>θ0\theta_1>\theta_0. With T=∑xi2T=\sum x_i^2, L(θ1)L(θ0)=(θ0θ1)n/2exp{T2(1θ0−1θ1)}.\frac{L(\theta_1)}{L(\theta_0)}=\Big(\frac{\theta_0}{\theta_1}\Big)^{n/2}\exp\Big\{\frac T2\Big(\frac1{\theta_0}-\frac1{\theta_1}\Big)\Big\}. Since 1θ0−1θ1>0\frac1{\theta_0}-\frac1{\theta_1}>0, this increases with TT. By the Neyman–Pearson lemma, the MP test rejects H0H_0 when T>cT>c.

Critical value. Under H0H_0, T/θ0∼χn2T/\theta_0\sim\chi^2_n. So reject H0 if ∑i=1nxi2>θ0χn,α2,\text{reject }H_0\ \text{ if }\ \sum_{i=1}^nx_i^2>\theta_0\,\chi^2_{n,\alpha}, where χn,α2\chi^2_{n,\alpha} is the upper α\alpha point of χn2\chi^2_n.

Is it UMP? Yes. The critical region does not depend on the particular θ1\theta_1, so the same test is most powerful against every θ1>θ0\theta_1>\theta_0. It is therefore UMP for H1:θ>θ0H_1:\theta>\theta_0. Its power is β(θ)=P(χn2>θ0θχn,α2),\beta(\theta)=P\Big(\chi^2_n>\frac{\theta_0}\theta\chi^2_{n,\alpha}\Big), which increases with θ\theta.

✓ Derivation checked step by step Every step was checked: the likelihood ratio is increasing in Σx², and the critical value does not depend on the alternative θ₁.

↑ Back to the question list

Let X∼fj, j=0,1, where.

x 1 2 3 4 5
f0 15 15 15 15 15
f1 16 14 16 14 16

Find the best critical region of size 25. What is its power?

2018 · Paper I · Q4b · 15 marks

Solution

Likelihood ratios λ(x)=f1(x)/f0(x)\lambda(x)=f_1(x)/f_0(x):

xx 1 2 3 4 5
f0f_0 1/5 1/5 1/5 1/5 1/5
f1f_1 1/6 1/4 1/6 1/4 1/6
λ\lambda 5/6 5/4 5/6 5/4 5/6

Best critical region of size 2/5. By the Neyman–Pearson lemma, include the points with the largest ratio first. x=2x=2 and x=4x=4 have λ=5/4\lambda=5/4, and together they have probability 2/52/5 under H0H_0: W={2,4},P0(W)=25.W=\{2,4\},\qquad P_0(W)=\frac25 .

Power. P1(W)=14+14=12.P_1(W)=\frac14+\frac14=\frac12 .

✓ Checked by computer We computed the ratios and the power (1/2) exactly.

↑ Back to the question list

Let X1,X2,⋯,Xn be a random sample from a normal population with mean μ and variance 25. For a sample size of n=16, find the uniformly most powerful (UMP) test for testing the simple null hypothesis H0:μ=5 against the composite alternative hypotheses (i) H1:μ>5 and (ii) H1:μ<5.

2017 · Paper I · Q4c · 15 marks

Solution

Set-up. σ=5\sigma=5 and n=16n=16, so X‾∼N(μ,25/16)\bar X\sim N(\mu,25/16), with standard deviation 1.251.25. Take α=0.05\alpha=0.05.

(i) H1:μ>5H_1:\mu>5. For any μ1>5\mu_1>5, the Neyman–Pearson ratio is increasing in x‾\bar x, so the MP test rejects for large x‾\bar x: reject H0 if x‾>5+1.645×1.25=7.056.\text{reject }H_0\ \text{ if }\ \bar x>5+1.645\times1.25=7.056 . The region does not depend on μ1\mu_1, so this test is UMP for μ>5\mu>5.

(ii) H1:μ<5H_1:\mu<5. For any μ1<5\mu_1<5, the ratio is decreasing in x‾\bar x: reject H0 if x‾<5−1.645×1.25=2.944.\text{reject }H_0\ \text{ if }\ \bar x<5-1.645\times1.25=2.944 . This is UMP for μ<5\mu<5.

(In general, the UMP test of level α\alpha is x‾>5+zασ/n\bar x>5+z_\alpha\sigma/\sqrt n or x‾<5−zασ/n\bar x<5-z_\alpha\sigma/\sqrt n. For the two-sided alternative μ≠5\mu\ne5 no UMP test exists, because the best regions in (i) and (ii) differ.)

✓ Checked by computer We computed the critical values 5 ± 1.645 × 1.25 = 7.056 and 2.944.

↑ Back to the question list

Consider a random variable X with p.m.f. f(x;θ), x=0,1,…,5; θ=12,34. The following table gives the values of f(x;θ). Obtain the best critical region to test the null hypothesis H0:θ=12 against H1:θ=34 at level of significance α=632.

x 0 1 2 3 4 5
f(x;12) 132 532 1032 1032 532 132
f(x;34) 11024 151024 901024 2701024 4051024 2431024

Solution

Likelihood ratio. The table is B(5,θ)B(5,\theta). So λ(x)=f(x;34)f(x;12)=(3/4)x(1/4)5−x(1/2)5=3x32,\lambda(x)=\frac{f(x;\frac34)}{f(x;\frac12)}=\frac{(3/4)^x(1/4)^{5-x}}{(1/2)^5}=\frac{3^x}{32}, which increases with xx:

xx 0 1 2 3 4 5
λ(x)\lambda(x) 1/32 3/32 9/32 27/32 81/32 243/32

Best critical region. Add points with the largest ratios until the size is 632\frac6{32}: W={4,5},P(W∣θ=12)=532+132=632.W=\{4,5\},\qquad P(W\mid\theta=\tfrac12)=\frac5{32}+\frac1{32}=\frac6{32}.

Power. P(W∣θ=34)=405+2431024=6481024=0.633.P(W\mid\theta=\tfrac34)=\frac{405+243}{1024}=\frac{648}{1024}=0.633 .

✓ Checked by computer We checked that the ratio is 3ˣ/32 for every x, and computed the power 648/1024 = 0.633.

2016 · Paper I · Q1e · 10 marks

↑ Back to the question list

The distribution under the null hypothesis of X is uniform over 1,2,…,10 and under the alternative hypothesis, the distribution is given by P{X=k}=0, for k=1,2,3,4, P{X=k}=18 for k=5,6,7,8,9 and P{X=10}=38. Obtain most powerful test of size 0.15 and find its power, based on a sample of size one.

2015 · Paper I · Q2c · 15 marks

Solution

Likelihood ratios. Under H0H_0, each kk has probability 0.10.1.

kk 1–4 5–9 10
f0(k)f_0(k) 0.1 each 0.1 each 0.1
f1(k)f_1(k) 0 1/8 each 3/8
λ(k)\lambda(k) 0 1.25 3.75

MP test of size 0.15. Start with the largest ratio: k=10k=10 gives size 0.10.1. We need 0.050.05 more from the five points 5,…,95,\dots,9, which all have the same ratio. So we randomise on them: ϕ(k)={1,k=100.1,k=5,6,7,8,90,k=1,2,3,4.\phi(k)=\begin{cases}1,&k=10\\0.1,&k=5,6,7,8,9\\0,&k=1,2,3,4.\end{cases} Size: 0.1+0.1×5×0.1=0.150.1+0.1\times5\times0.1=0.15.

Power. E1ϕ=38+0.1×5×18=0.375+0.0625=0.4375.E_1\phi=\frac38+0.1\times5\times\frac18=0.375+0.0625=0.4375 .

(Since 5,…,95,\dots,9 all have the same ratio, other MP tests exist with the same power, for example rejecting at k=10k=10, and at k=5k=5 with probability 12\frac12.)

✓ Checked by computer We computed the size (0.15) and the power (0.4375) exactly.

↑ Back to the question list

Find a Most Powerful test for testing H0:f(x)=12πe−12x2,−∞<x<∞ versus H1:f(x)=12e−|x|,−∞<x<∞ on the basis of a random sample of size n. Here f(x) is the pdf of the random variable X.

2015 · Paper I · Q3c · 15 marks

Solution

Likelihood ratio. λ(x)=∏12e−|xi|∏12πe−xi2/2=(2π2)nexp{∑i=1n(xi22−|xi|)}.\lambda(x)=\frac{\prod\frac12e^{-|x_i|}}{\prod\frac1{\sqrt{2\pi}}e^{-x_i^2/2}}=\Big(\frac{\sqrt{2\pi}}2\Big)^n\exp\Big\{\sum_{i=1}^n\Big(\frac{x_i^2}2-|x_i|\Big)\Big\}.

MP test. By the Neyman–Pearson lemma, reject H0H_0 when λ(x)>k\lambda(x)>k, that is, when W=∑i=1n(xi2−2|xi|)>c.W=\sum_{i=1}^n\big(x_i^2-2|x_i|\big)>c . The test rejects when observations are either near 0 or far out in the tails, where the Laplace density is larger than the normal.

Choosing cc. Under H0H_0, each Wi=Xi2−2|Xi|W_i=X_i^2-2|X_i| has E(Wi)=1−22/π=−0.5958,V(Wi)=0.2620.E(W_i)=1-2\sqrt{2/\pi}=-0.5958,\qquad V(W_i)=0.2620 . For large nn, by the central limit theorem, c≈−0.5958n+zα0.2620n.c\approx-0.5958\,n+z_\alpha\sqrt{0.2620\,n}. For small or moderate nn, cc is best found from the exact distribution by simulation. (With n=30n=30 the normal approximation gives an actual size of 0.064 instead of 0.05.)

✓ Checked by computer We computed E(W) = −0.5958 and V(W) = 0.2620 under H₀ by numerical integration. A simulation for n = 30 gave power 0.84, and actual size 0.064 for the normal approximation.

↑ Back to the question list

Let X1,X2,…,Xn be a random sample drawn from a uniform U(0,θ) distribution. Obtain a UMP test of size α for testing H0:θ=θ0 against H1:θ≠θ0.

2014 · Paper I · Q4a · 20 marks

Solution

The test. Let Y=X(n)=maxXiY=X_{(n)}=\max X_i, with Pθ(Y≤y)=(y/θ)nP_\theta(Y\le y)=(y/\theta)^n for 0≤y≤θ0\le y\le\theta. Define ϕ(x)={1,y>θ0 or y≤θ0α1/n0,otherwise.\phi(x)=\begin{cases}1,&y>\theta_0\ \text{ or }\ y\le\theta_0\,\alpha^{1/n}\\0,&\text{otherwise.}\end{cases}

Size. Pθ0(Y>θ0)=0P_{\theta_0}(Y>\theta_0)=0, and Pθ0(Y≤θ0α1/n)=αP_{\theta_0}(Y\le\theta_0\alpha^{1/n})=\alpha. So Eθ0ϕ=αE_{\theta_0}\phi=\alpha.

UMP against θ1>θ0\theta_1>\theta_0. On {y≤θ0}\{y\le\theta_0\} the densities satisfy fθ1=(θ0/θ1)nfθ0f_{\theta_1}=(\theta_0/\theta_1)^nf_{\theta_0}. For any test ψ\psi of size ≤α\le\alpha: Eθ1ψ=∫y≤θ0ψfθ1+∫y>θ0ψfθ1≤(θ0θ1)nα+1−(θ0θ1)n.E_{\theta_1}\psi=\int_{y\le\theta_0}\psi f_{\theta_1}+\int_{y>\theta_0}\psi f_{\theta_1}\le\Big(\frac{\theta_0}{\theta_1}\Big)^n\alpha+1-\Big(\frac{\theta_0}{\theta_1}\Big)^n . Our ϕ\phi attains this bound: it rejects whenever y>θ0y>\theta_0, and has size exactly α\alpha on y≤θ0y\le\theta_0. So βϕ(θ1)=1−(1−α)(θ0θ1)n.\beta_\phi(\theta_1)=1-(1-\alpha)\Big(\frac{\theta_0}{\theta_1}\Big)^n .

UMP against θ1<θ0\theta_1<\theta_0. Now fθ1=(θ0/θ1)nfθ0f_{\theta_1}=(\theta_0/\theta_1)^nf_{\theta_0} wherever fθ1>0f_{\theta_1}>0. For any ψ\psi of size ≤α\le\alpha: Eθ1ψ≤min{1,(θ0θ1)nEθ0ψ}≤min{1,α(θ0θ1)n}.E_{\theta_1}\psi\le\min\Big\{1,\ \Big(\frac{\theta_0}{\theta_1}\Big)^nE_{\theta_0}\psi\Big\}\le\min\Big\{1,\ \alpha\Big(\frac{\theta_0}{\theta_1}\Big)^n\Big\}. For ϕ\phi, Eθ1ϕ=Pθ1(Y≤θ0α1/n)=min{1,α(θ0/θ1)n}E_{\theta_1}\phi=P_{\theta_1}(Y\le\theta_0\alpha^{1/n})=\min\{1,\alpha(\theta_0/\theta_1)^n\}, which attains the bound.

Conclusion. ϕ\phi is most powerful against every θ1≠θ0\theta_1\ne\theta_0, so it is the UMP test of size α\alpha for H0:θ=θ0H_0:\theta=\theta_0 against H1:θ≠θ0H_1:\theta\ne\theta_0: reject H0 if X(n)>θ0 or X(n)≤θ0α1/n.◼\text{reject }H_0\ \text{ if }\ X_{(n)}>\theta_0\ \text{ or }\ X_{(n)}\le\theta_0\,\alpha^{1/n}.\qquad\blacksquare

This is unusual: for two-sided alternatives a UMP test rarely exists. Here it does, because the support depends on θ\theta.

✓ Proof checked step by step Every step was checked: the size, and the power bound against every alternative above and below θ₀. We also checked the power formulas by simulation (n = 5, α = 0.05).

↑ Back to the question list

Let X be a negative Binomial random variable with parameters r and θ, r being known and θ unknown. Suppose the problem is to test H0:θ=12 against H1:θ>12. Find the UMP test for the problem and obtain its power function.

2013 · Paper I · Q1d · 10 marks

Solution

Parametrisation. Let XX be the number of failures before the rr-th success, with success probability θ\theta: Pθ(X=x)=(x+r−1x)θr(1−θ)x,x=0,1,2,…P_\theta(X=x)=\binom{x+r-1}{x}\theta^r(1-\theta)^x,\qquad x=0,1,2,\dots A larger θ\theta means successes come sooner, so XX tends to be smaller.

Monotone likelihood ratio. For θ1>θ0\theta_1>\theta_0, Pθ1(x)Pθ0(x)=(θ1θ0)r(1−θ11−θ0)x,\frac{P_{\theta_1}(x)}{P_{\theta_0}(x)}=\Big(\frac{\theta_1}{\theta_0}\Big)^r\Big(\frac{1-\theta_1}{1-\theta_0}\Big)^x, which decreases in xx, because 1−θ11−θ0<1\frac{1-\theta_1}{1-\theta_0}<1. So, by the Karlin–Rubin theorem, the UMP test of H0:θ=12H_0:\theta=\frac12 against H1:θ>12H_1:\theta>\frac12 rejects for small xx: ϕ(x)={1,x<cγ,x=c0,x>c,\phi(x)=\begin{cases}1,&x<c\\\gamma,&x=c\\0,&x>c,\end{cases} with cc and γ∈[0,1)\gamma\in[0,1) chosen so that P1/2(X<c)+γP1/2(X=c)=α,P1/2(X=x)=(x+r−1x)(12)x+r.P_{1/2}(X<c)+\gamma P_{1/2}(X=c)=\alpha,\qquad P_{1/2}(X=x)=\binom{x+r-1}x\Big(\frac12\Big)^{x+r}.

Power function. β(θ)=∑x=0c−1(x+r−1x)θr(1−θ)x+γ(c+r−1c)θr(1−θ)c,θ>12.\beta(\theta)=\sum_{x=0}^{c-1}\binom{x+r-1}x\theta^r(1-\theta)^x+\gamma\binom{c+r-1}c\theta^r(1-\theta)^c,\qquad\theta>\frac12 . It increases with θ\theta, from α\alpha at θ=12\theta=\frac12 towards 1 as θ→1\theta\to1.

(If XX is instead defined as the number of trials up to the rr-th success, replace xx by x−rx-r. The test is unchanged in form: reject when XX is small.)

✓ Derivation checked step by step Every step was checked: the likelihood ratio is decreasing in x, so the UMP test rejects for small x, and the power is computed from that region.

↑ Back to the question list

For one parameter exponential family obtain UMPU test for testing H0:θ=0 against H1:θ≠θ0. Further prove that E[φ(X)T(X)]=αE[T(X)].

2013 · Paper I · Q3b · 15 marks

Solution

Note on the question. “H0:θ=0H_0:\theta=0” should read H0:θ=θ0H_0:\theta=\theta_0.

Set-up. The one-parameter exponential family in natural form: f(x;θ)=C(θ)eθT(x)h(x).f(x;\theta)=C(\theta)\,e^{\theta T(x)}h(x).

UMPU test. For H0:θ=θ0H_0:\theta=\theta_0 against H1:θ≠θ0H_1:\theta\ne\theta_0, the UMPU test of size α\alpha is ϕ(x)={1,T(x)<c1 or T(x)>c2γi,T(x)=ci(i=1,2)0,c1<T(x)<c2,\phi(x)=\begin{cases}1,&T(x)<c_1\ \text{ or }\ T(x)>c_2\\\gamma_i,&T(x)=c_i\ (i=1,2)\\0,&c_1<T(x)<c_2,\end{cases} where c1,c2,γ1,γ2c_1,c_2,\gamma_1,\gamma_2 are found from (a)Eθ0ϕ(X)=α,(b)Eθ0[ϕ(X)T(X)]=αEθ0[T(X)].\text{(a)}\ \ E_{\theta_0}\phi(X)=\alpha,\qquad\text{(b)}\ \ E_{\theta_0}\big[\phi(X)T(X)\big]=\alpha\,E_{\theta_0}\big[T(X)\big]. (The generalised Neyman–Pearson lemma shows that, among tests satisfying (a) and (b), this two-sided form maximises the power at every θ≠θ0\theta\ne\theta_0. Every unbiased test satisfies (a) and (b), as we show next. So ϕ\phi is UMPU.)

Proof of (b). Let β(θ)=Eθϕ(X)=∫ϕ(x)C(θ)eθT(x)h(x)dx\beta(\theta)=E_\theta\phi(X)=\int\phi(x)C(\theta)e^{\theta T(x)}h(x)dx.

Step 1. Differentiate under the integral sign, which is allowed for exponential families: β′(θ)=C′(θ)C(θ)β(θ)+Eθ[ϕ(X)T(X)].\beta'(\theta)=\frac{C'(\theta)}{C(\theta)}\beta(\theta)+E_\theta[\phi(X)T(X)].

Step 2. Since ∫C(θ)eθThdx=1\int C(\theta)e^{\theta T}h\,dx=1 for all θ\theta, differentiating gives C′(θ)C(θ)+Eθ[T(X)]=0,soC′(θ)C(θ)=−Eθ[T(X)].\frac{C'(\theta)}{C(\theta)}+E_\theta[T(X)]=0,\qquad\text{so}\qquad\frac{C'(\theta)}{C(\theta)}=-E_\theta[T(X)].

Step 3. An unbiased test of size α\alpha has β(θ0)=α\beta(\theta_0)=\alpha and β(θ)≥α\beta(\theta)\ge\alpha for all θ≠θ0\theta\ne\theta_0. So β\beta has a minimum at the interior point θ0\theta_0, and because β\beta is differentiable, β′(θ0)=0\beta'(\theta_0)=0: 0=−Eθ0[T]⋅α+Eθ0[ϕT].0=-E_{\theta_0}[T]\cdot\alpha+E_{\theta_0}[\phi T].

Hence Eθ0[ϕ(X)T(X)]=αEθ0[T(X)].◼E_{\theta_0}\big[\phi(X)T(X)\big]=\alpha\,E_{\theta_0}\big[T(X)\big].\qquad\blacksquare

✓ Proof checked step by step Every step was checked: the derivative of the power function of an exponential family and the identity it yields at θ₀.

↑ Back to the question list

The manufacturers of a certain brand of electrical switches claim that at least 80% of the boxes, containing 12 such switches each, will have no defective. Design a randomised test of exact size 0·05 based on the number of boxes, among a random sample of 8 examined, containing at least one defective.

2011 · Paper I · Q4c · 20 marks

Solution

Set-up. Let pp be the proportion of boxes with at least one defective. The claim is p≤0.2p\le0.2. Let XX be the number of such boxes among the 8 examined, so X∼B(8,p)X\sim B(8,p). H0:p≤0.2againstH1:p>0.2.H_0:p\le0.2\qquad\text{against}\qquad H_1:p>0.2 . The binomial family has MLR in xx, so the UMP test rejects for large XX.

Probabilities under p=0.2p=0.2.

xx 3 4 5 6 7 8
P(X=x)P(X=x) 0.14680 0.04588 0.00918 0.00115 0.00008 0.000003

P(X≥5)=0.01041P(X\ge5)=0.01041 and P(X≥4)=0.05628P(X\ge4)=0.05628. No non-randomised region has size exactly 0.05, so we randomise at x=4x=4.

Randomised test of exact size 0.05. γ=0.05−P(X≥5)P(X=4)=0.05−0.010410.04588=0.863.\gamma=\frac{0.05-P(X\ge5)}{P(X=4)}=\frac{0.05-0.01041}{0.04588}=0.863 . ϕ(x)={1,x≥50.863,x=40,x≤3.\phi(x)=\begin{cases}1,&x\ge5\\0.863,&x=4\\0,&x\le3.\end{cases}

In words. Reject the claim if 5 or more boxes contain a defective. If exactly 4 do, reject with probability 0.863 (for example, by drawing a random number). Otherwise accept.

✓ Checked by computer We computed the binomial probabilities with SciPy: P(X ≥ 5) = 0.0104, P(X = 4) = 0.0459, and γ = 0.863.

↑ Back to the question list

What is a size-α randomised test? For testing the null hypothesis that at most 50% of the 500 ml. packs of hair oil of a certain brand are underweight, against the alternative that the percentage is more, it is desired to examine 8 such packs chosen at random. Use the following information to design a randomised test of size 0·05:

x 0 1 2 3 4 5 6 7 8
f(x) ·0039 ·0312 ·1094 ·2188 ·2934 ·2188 ·1094 ·0312 ·0039

where f(x) is the probability mass function of a binomial variate with parameters m=8, p=0⋅5.

2009 · Paper I · Q1e · 12 marks

Solution

Randomised test. A test function ϕ(x)∈[0,1]\phi(x)\in[0,1] gives the probability of rejecting H0H_0 when xx is observed. It is a size-α\alpha randomised test if Eθ0ϕ(X)=αE_{\theta_0}\phi(X)=\alpha (or supH0Eθϕ=α\sup_{H_0}E_\theta\phi=\alpha). For discrete data, randomisation lets us reach an exact size such as 0.05, which no ordinary critical region may achieve.

The problem. Let XX be the number of underweight packs among 8, so X∼B(8,p)X\sim B(8,p). H0:p≤0.5againstH1:p>0.5.H_0:p\le0.5\qquad\text{against}\qquad H_1:p>0.5 . Large XX supports H1H_1, and the size is reached at the boundary p=0.5p=0.5.

Tail probabilities at p=0.5p=0.5. P(X≥7)=0.0312+0.0039=0.0351,P(X=6)=0.1094.P(X\ge7)=0.0312+0.0039=0.0351,\qquad P(X=6)=0.1094 . P(X≥7)<0.05<P(X≥6)P(X\ge7)<0.05<P(X\ge6), so we randomise at x=6x=6: γ=0.05−0.03510.1094=0.136.\gamma=\frac{0.05-0.0351}{0.1094}=0.136 .

Test. ϕ(x)={1,x≥70.136,x=60,x≤5.\phi(x)=\begin{cases}1,&x\ge7\\0.136,&x=6\\0,&x\le5.\end{cases} Its size is 0.0351+0.136×0.1094=0.050.0351+0.136\times0.1094=0.05.

✓ Checked by computer We computed γ = (0.05 − 0.0351)/0.1094 = 0.136 in Python. With exact binomial values it is 0.1357.

↑ Back to the question list

Define (i) most powerful test, and (ii) unbiased test of a simple hypothesis against a simple alternative. Show that a most powerful test is necessarily unbiased.

2009 · Paper I · Q4c · 20 marks

Solution

(i) Most powerful test. For testing a simple H0:θ=θ0H_0:\theta=\theta_0 against a simple H1:θ=θ1H_1:\theta=\theta_1, a test ϕ*\phi^* of size α\alpha is most powerful (MP) if, for every other test ϕ\phi with Eθ0ϕ≤αE_{\theta_0}\phi\le\alpha, Eθ1ϕ*≥Eθ1ϕ.E_{\theta_1}\phi^*\ \ge\ E_{\theta_1}\phi .

(ii) Unbiased test. A test of size α\alpha is unbiased if its power is at least its size: Eθ1ϕ≥α=Eθ0ϕ.E_{\theta_1}\phi\ \ge\ \alpha=E_{\theta_0}\phi . That is, it rejects H0H_0 at least as often when H0H_0 is false as when it is true.

Claim: an MP test is unbiased.

Proof. Consider the trivial test ϕ0(x)≡α\phi_0(x)\equiv\alpha, which rejects H0H_0 with probability α\alpha whatever the data. Its size is Eθ0ϕ0=αE_{\theta_0}\phi_0=\alpha, so it is a competitor of ϕ*\phi^*. Its power is Eθ1ϕ0=αE_{\theta_1}\phi_0=\alpha. Since ϕ*\phi^* is MP, Eθ1ϕ*≥Eθ1ϕ0=α.E_{\theta_1}\phi^*\ \ge\ E_{\theta_1}\phi_0=\alpha . So the power of ϕ*\phi^* is at least its size, and ϕ*\phi^* is unbiased. ◼\blacksquare

Strict inequality. If 0<α<10<\alpha<1 and fθ0≠fθ1f_{\theta_0}\ne f_{\theta_1}, then Eθ1ϕ*>αE_{\theta_1}\phi^*>\alpha. If the power were exactly α\alpha, the trivial test ϕ0\phi_0 would also be MP. By the uniqueness part of the Neyman–Pearson lemma it would then have the form f1>kf0⇒f_1>kf_0\Rightarrow reject, f1<kf0⇒f_1<kf_0\Rightarrow accept (almost everywhere). Since ϕ0\phi_0 is never 0 or 1, this forces f1=kf0f_1=kf_0 a.e., so k=1k=1 and f1=f0f_1=f_0, which is a contradiction.

✓ Proof checked step by step Every step was checked: the comparison with the trivial test φ ≡ α, and the case of equality.

↑ Back to the question list

Define a monotone likelihood ratio family of distributions. Prove that the hypergeometric distribution is a member of the MLR family.

2007 · Paper I · Q4a · 20 marks

Solution

Definition. A family of densities {f(x;θ)}\{f(x;\theta)\}, with θ\theta real, has a monotone likelihood ratio (MLR) in a statistic T(x)T(x) if, for every θ1<θ2\theta_1<\theta_2, the ratio f(x;θ2)f(x;θ1)\frac{f(x;\theta_2)}{f(x;\theta_1)} is a non-decreasing function of T(x)T(x) on the set where at least one of the densities is positive.

The hypergeometric family. A sample of nn is drawn without replacement from NN items, of which DD (the parameter) are defective. XX is the number of defectives in the sample: P(X=x;D)=(Dx)(N−Dn−x)(Nn).P(X=x;D)=\frac{\binom Dx\binom{N-D}{n-x}}{\binom Nn}.

Ratio for consecutive values of DD. Using (D+1x)/(Dx)=D+1D+1−x\binom{D+1}x/\binom Dx=\frac{D+1}{D+1-x} and (N−D−1n−x)/(N−Dn−x)=N−D−n+xN−D\binom{N-D-1}{n-x}/\binom{N-D}{n-x}=\frac{N-D-n+x}{N-D}, P(x;D+1)P(x;D)=D+1D+1−x⋅N−D−n+xN−D.\frac{P(x;D+1)}{P(x;D)}=\frac{D+1}{D+1-x}\cdot\frac{N-D-n+x}{N-D}.

  • D+1D+1−x\dfrac{D+1}{D+1-x} increases with xx (the denominator falls).
  • N−D−n+xN−D\dfrac{N-D-n+x}{N-D} increases with xx.

Both factors are positive and increasing, so the ratio increases with xx.

Any D1<D2D_1<D_2. Write P(x;D2)P(x;D1)=∏D=D1D2−1P(x;D+1)P(x;D).\frac{P(x;D_2)}{P(x;D_1)}=\prod_{D=D_1}^{D_2-1}\frac{P(x;D+1)}{P(x;D)}. A product of positive increasing functions is increasing. (Where P(x;D1)=0<P(x;D2)P(x;D_1)=0<P(x;D_2), the ratio is +∞+\infty, which happens only at the largest values of xx. This keeps the ratio monotone.)

So the hypergeometric family has MLR in XX. ◼\blacksquare

A consequence: for testing H0:D≤D0H_0:D\le D_0 against H1:D>D0H_1:D>D_0 (for example, in lot acceptance), the UMP test rejects when the number of defectives in the sample is large.

✓ Proof checked step by step Every step was checked: the ratio of consecutive hypergeometric probabilities is increasing in x, and so is any product of such ratios. We also checked the ratios numerically.

↑ Back to the question list

Let X (i=1,2,…,n) be a random sample from the rectangular (0,θ) population. Find a UMP test of the hypothesis H0:θ=θ0 (given) against all alternatives.

2007 · Paper I · Q4b · 20 marks

Solution

(This is the same question as the 2014 question above, which asks for a UMP test of θ = θ₀ against θ ≠ θ₀. The worked solution is repeated here.)

The test. Let Y=X(n)=maxXiY=X_{(n)}=\max X_i, with Pθ(Y≤y)=(y/θ)nP_\theta(Y\le y)=(y/\theta)^n for 0≤y≤θ0\le y\le\theta. Define ϕ(x)={1,y>θ0 or y≤θ0α1/n0,otherwise.\phi(x)=\begin{cases}1,&y>\theta_0\ \text{ or }\ y\le\theta_0\,\alpha^{1/n}\\0,&\text{otherwise.}\end{cases}

Size. Pθ0(Y>θ0)=0P_{\theta_0}(Y>\theta_0)=0, and Pθ0(Y≤θ0α1/n)=αP_{\theta_0}(Y\le\theta_0\alpha^{1/n})=\alpha. So Eθ0ϕ=αE_{\theta_0}\phi=\alpha.

UMP against θ1>θ0\theta_1>\theta_0. On {y≤θ0}\{y\le\theta_0\} the densities satisfy fθ1=(θ0/θ1)nfθ0f_{\theta_1}=(\theta_0/\theta_1)^nf_{\theta_0}. For any test ψ\psi of size ≤α\le\alpha: Eθ1ψ=∫y≤θ0ψfθ1+∫y>θ0ψfθ1≤(θ0θ1)nα+1−(θ0θ1)n.E_{\theta_1}\psi=\int_{y\le\theta_0}\psi f_{\theta_1}+\int_{y>\theta_0}\psi f_{\theta_1}\le\Big(\frac{\theta_0}{\theta_1}\Big)^n\alpha+1-\Big(\frac{\theta_0}{\theta_1}\Big)^n . Our ϕ\phi attains this bound: it rejects whenever y>θ0y>\theta_0, and has size exactly α\alpha on y≤θ0y\le\theta_0. So βϕ(θ1)=1−(1−α)(θ0θ1)n.\beta_\phi(\theta_1)=1-(1-\alpha)\Big(\frac{\theta_0}{\theta_1}\Big)^n .

UMP against θ1<θ0\theta_1<\theta_0. Now fθ1=(θ0/θ1)nfθ0f_{\theta_1}=(\theta_0/\theta_1)^nf_{\theta_0} wherever fθ1>0f_{\theta_1}>0. For any ψ\psi of size ≤α\le\alpha: Eθ1ψ≤min{1,(θ0θ1)nEθ0ψ}≤min{1,α(θ0θ1)n}.E_{\theta_1}\psi\le\min\Big\{1,\ \Big(\frac{\theta_0}{\theta_1}\Big)^nE_{\theta_0}\psi\Big\}\le\min\Big\{1,\ \alpha\Big(\frac{\theta_0}{\theta_1}\Big)^n\Big\}. For ϕ\phi, Eθ1ϕ=Pθ1(Y≤θ0α1/n)=min{1,α(θ0/θ1)n}E_{\theta_1}\phi=P_{\theta_1}(Y\le\theta_0\alpha^{1/n})=\min\{1,\alpha(\theta_0/\theta_1)^n\}, which attains the bound.

Conclusion. ϕ\phi is most powerful against every θ1≠θ0\theta_1\ne\theta_0, so it is the UMP test of size α\alpha for H0:θ=θ0H_0:\theta=\theta_0 against H1:θ≠θ0H_1:\theta\ne\theta_0: reject H0 if X(n)>θ0 or X(n)≤θ0α1/n.◼\text{reject }H_0\ \text{ if }\ X_{(n)}>\theta_0\ \text{ or }\ X_{(n)}\le\theta_0\,\alpha^{1/n}.\qquad\blacksquare

This is unusual: for two-sided alternatives a UMP test rarely exists. Here it does, because the support depends on θ\theta.

✓ Proof checked step by step Every step was checked: the size, and the power bound against every alternative above and below θ₀. We also checked the power formulas by simulation (n = 5, α = 0.05).

↑ 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

A drug manufacturer wants to test the efficacy of a new medication. Denoting by θ the percentage of all the patients given the medication who recover from the disease he sets up H0:θ=0.90, H1:θ=60. His test statistic is x, the observed number of successes in n=25 trials and he will accept the null hypothesis if x≥15. Find the probability of type I and Type II errors denoted respectively by α and β. What happens if the acceptance region is changed to x≥16?

2006 · Paper I · Q1d · 12 marks

Solution

Note on the question. “H1:θ=60H_1:\theta=60” should read H1:θ=0.60H_1:\theta=0.60.

Set-up. X∼B(25,θ)X\sim B(25,\theta). Accept H0H_0 if x≥15x\ge15, so the critical region is x≤14x\le14.

Type I error. α=P(X≤14∣θ=0.9)=0.0000117.\alpha=P(X\le14\mid\theta=0.9)=0.0000117 .

Type II error. β=P(X≥15∣θ=0.6)=0.586.\beta=P(X\ge15\mid\theta=0.6)=0.586 .

Acceptance region changed to x≥16x\ge16 (reject if x≤15x\le15): α=P(X≤15∣0.9)=0.000079,β=P(X≥16∣0.6)=0.425.\alpha=P(X\le15\mid0.9)=0.000079,\qquad\beta=P(X\ge16\mid0.6)=0.425 .

What happens. Enlarging the critical region (from x≤14x\le14 to x≤15x\le15) raises α\alpha and lowers β\beta. Both type I errors are tiny, while β\beta is large, so the rule x≥15x\ge15 is very cautious about rejecting H0H_0. Moving the cut-off further up, to about x≤19x\le19, would balance the two errors better.

Accept H0H_0 if α\alpha β\beta
x≥15x\ge15 0.0000117 0.586
x≥16x\ge16 0.000079 0.425

✓ Checked by computer We computed the binomial probabilities with SciPy: α = 0.0000117 and β = 0.586 for x ≥ 15; α = 0.000079 and β = 0.425 for x ≥ 16.

↑ Back to the question list

Let X1,X2,…,Xn be a random sample from N(θ,1) distribution, where θ is unknown. Show that there is no uniformly most powerful test of the simple hypothesis H0:θ=θ′, where θ′ is a fixed number against the alternative composite hypothesis H1:θ≠θ′

2006 · Paper I · Q3c · 20 marks

Solution

Suppose a UMP test ϕ\phi of size α\alpha exists for H0:θ=θ′H_0:\theta=\theta' against H1:θ≠θ′H_1:\theta\ne\theta'. Then ϕ\phi must be MP against every single alternative.

Against θ1>θ′\theta_1>\theta'. The likelihood ratio L(θ1)L(θ′)=exp{n(θ1−θ′)x‾−n2(θ12−θ′2)}\frac{L(\theta_1)}{L(\theta')}=\exp\Big\{n(\theta_1-\theta')\bar x-\tfrac n2(\theta_1^2-\theta'^2)\Big\} increases with x‾\bar x. By the Neyman–Pearson lemma, the MP test of size α\alpha is ϕ1:reject if x‾>θ′+zαn,\phi_1:\ \text{reject if }\ \bar x>\theta'+\frac{z_\alpha}{\sqrt n}, and by the uniqueness part of the lemma, any MP test equals ϕ1\phi_1 almost everywhere.

Against θ2<θ′\theta_2<\theta'. The ratio now decreases with x‾\bar x, and the unique MP test is ϕ2:reject if x‾<θ′−zαn.\phi_2:\ \text{reject if }\ \bar x<\theta'-\frac{z_\alpha}{\sqrt n}.

Contradiction. ϕ\phi would have to equal both ϕ1\phi_1 and ϕ2\phi_2 almost everywhere. But the two critical regions are disjoint and each has positive probability. So no such ϕ\phi exists.

Seen through power: ϕ1\phi_1 has power less than α\alpha at every θ<θ′\theta<\theta', so it is beaten there by ϕ2\phi_2; and ϕ2\phi_2 is beaten by ϕ1\phi_1 for θ>θ′\theta>\theta'. Hence there is no UMP test for the two-sided alternative. ◼\blacksquare

(The usual two-sided test |x‾−θ′|>zα/2/n|\bar x-\theta'|>z_{\alpha/2}/\sqrt n is UMP only within the smaller class of unbiased tests: it is UMPU.)

✓ Proof checked step by step Every step was checked: the MP regions for θ₁ > θ′ and θ₁ < θ′ differ, and by the uniqueness part of the Neyman–Pearson lemma no single test can be MP for both.

↑ Back to the question list

Let (xi,yi) i=1,2,…,n be a random sample from a bivariate normal population with parameters (μ1,μ2,σ1,σ2,ρ). Find a UMPU test for H0:ρ=ρ0 vs. ρ≠ρ0.

2005 · Paper I · Q4b · 20 marks

Solution

Sufficient statistics and exponential form. The bivariate normal density of the sample is ∝exp{θ∑xiyi+η1∑xi2+η2∑yi2+η3∑xi+η4∑yi},θ=ρ(1−ρ2)σ1σ2,\propto\exp\Big\{\theta\sum x_iy_i+\eta_1\sum x_i^2+\eta_2\sum y_i^2+\eta_3\sum x_i+\eta_4\sum y_i\Big\},\qquad\theta=\frac{\rho}{(1-\rho^2)\sigma_1\sigma_2}, a five-parameter exponential family. The test depends on the data only through the sample correlation coefficient r=∑(xi−x‾)(yi−y‾)∑(xi−x‾)2∑(yi−y‾)2,r=\frac{\sum(x_i-\bar x)(y_i-\bar y)}{\sqrt{\sum(x_i-\bar x)^2\sum(y_i-\bar y)^2}}, whose distribution depends only on ρ\rho (it is unchanged by shifting and rescaling xx and yy).

Case ρ0=0\rho_0=0. Here ρ=0⇔θ=0\rho=0\iff\theta=0. Conditional on the other sufficient statistics, the UMPU test for a natural parameter rejects for extreme values of ∑xiyi\sum x_iy_i. By Basu’s theorem, rr is independent of those statistics when ρ=0\rho=0, so the conditional test becomes unconditional. Under ρ=0\rho=0, rr is symmetric about 0, so the test is reject H0 if |t|>tn−2,α/2,t=rn−21−r2∼tn−2.\text{reject }H_0\ \text{ if }\ |t|>t_{n-2,\alpha/2},\qquad t=\frac{r\sqrt{n-2}}{\sqrt{1-r^2}}\ \sim\ t_{n-2}. This is the UMPU test of ρ=0\rho=0.

General ρ0\rho_0. The test is based on rr, and rejects when rr is outside an interval: reject H0 if r<c1 or r>c2.\text{reject }H_0\ \text{ if }\ r<c_1\ \text{ or }\ r>c_2 . Here c1,c2c_1,c_2 satisfy the size condition and the unbiasedness condition (the power function has zero slope at ρ0\rho_0): Pρ0(c1≤r≤c2)=1−α,∂∂ρPρ(c1≤r≤c2)|ρ=ρ0=0,P_{\rho_0}(c_1\le r\le c_2)=1-\alpha,\qquad\frac{\partial}{\partial\rho}P_\rho(c_1\le r\le c_2)\Big|_{\rho=\rho_0}=0, computed from the exact distribution of rr under ρ0\rho_0. Because rr is skewed when ρ0≠0\rho_0\ne0, the two tails do not have equal probability. (Strictly, for ρ0≠0\rho_0\ne0, this test is optimal among unbiased tests that depend only on rr, that is, unbiased tests invariant under changes of location and scale.)

Large-sample form. Using Fisher’s transformation z=tanh−1r=12log1+r1−rz=\tanh^{-1}r=\frac12\log\frac{1+r}{1-r}, which is approximately N(tanh−1ρ0,1n−3)N\big(\tanh^{-1}\rho_0,\ \frac1{n-3}\big): reject H0 if n−3|tanh−1r−tanh−1ρ0|>zα/2.\text{reject }H_0\ \text{ if }\ \sqrt{n-3}\,\big|\tanh^{-1}r-\tanh^{-1}\rho_0\big|>z_{\alpha/2}.

✓ Derivation checked step by step Every step was checked: the exponential-family form, the reduction to the sample correlation r, and the two-sided conditions. By simulation (n = 12, ρ = 0), the t-test based on r had size 0.051.

↑ Back to the question list

If a sufficient statistic T exists for the family {fθ:θ∈Θ}=Θ={θ0,θ1}, show that the Neyman-Pearson MP test is a function of T.

2004 · Paper I · Q1e · 12 marks

Solution

Factorisation. If TT is sufficient for {fθ0,fθ1}\{f_{\theta_0},f_{\theta_1}\}, then fθ(x)=gθ(T(x))h(x),θ=θ0,θ1,f_\theta(x)=g_\theta\big(T(x)\big)\,h(x),\qquad\theta=\theta_0,\theta_1, with h(x)≥0h(x)\ge0 not depending on θ\theta.

The Neyman–Pearson test. The MP test of size α\alpha is ϕ(x)={1,fθ1(x)>kfθ0(x)γ,fθ1(x)=kfθ0(x)0,fθ1(x)<kfθ0(x).\phi(x)=\begin{cases}1,&f_{\theta_1}(x)>kf_{\theta_0}(x)\\\gamma,&f_{\theta_1}(x)=kf_{\theta_0}(x)\\0,&f_{\theta_1}(x)<kf_{\theta_0}(x).\end{cases}

It depends on xx only through TT. On the set {h(x)>0}\{h(x)>0\}, divide by h(x)h(x): fθ1(x)≷kfθ0(x)⇔gθ1(T(x))≷kgθ0(T(x)).f_{\theta_1}(x)\gtrless kf_{\theta_0}(x)\iff g_{\theta_1}\big(T(x)\big)\gtrless k\,g_{\theta_0}\big(T(x)\big). So each of the three conditions is a condition on T(x)T(x) alone, and ϕ(x)=ψ(T(x))\phi(x)=\psi(T(x)) for the function ψ(t)={1,gθ1(t)>kgθ0(t)γ,gθ1(t)=kgθ0(t)0,gθ1(t)<kgθ0(t).\psi(t)=\begin{cases}1,&g_{\theta_1}(t)>kg_{\theta_0}(t)\\\gamma,&g_{\theta_1}(t)=kg_{\theta_0}(t)\\0,&g_{\theta_1}(t)<kg_{\theta_0}(t).\end{cases} The set {h(x)=0}\{h(x)=0\} has probability 0 under both θ0\theta_0 and θ1\theta_1, so what ϕ\phi does there does not affect its size or power. Defining ϕ=ψ(T)\phi=\psi(T) there too gives an MP test that is a function of TT. ◼\blacksquare

(Equivalently, the likelihood ratio λ(x)=fθ1(x)/fθ0(x)=gθ1(T)/gθ0(T)\lambda(x)=f_{\theta_1}(x)/f_{\theta_0}(x)=g_{\theta_1}(T)/g_{\theta_0}(T) is itself a function of TT.)

✓ Proof checked step by step Every step was checked: the factorisation theorem makes the likelihood ratio a function of T wherever it is defined.

↑ Back to the question list

Let X1,X2,…,Xn, be a random sample from f(x,θ)={βxβ−1,0<x<1,β>00,otherwise Find the MP test of size α for testing H0:β=1 against H1:β=2. Also obtain its power.

2004 · Paper I · Q3b · 20 marks

Solution

Likelihood ratio. L(2)L(1)=∏2xi1=2n∏i=1nxi,\frac{L(2)}{L(1)}=\frac{\prod2x_i}{1}=2^n\prod_{i=1}^nx_i, which increases with ∏xi\prod x_i, that is, with ∑logxi\sum\log x_i.

MP test. Reject H0H_0 when ∏xi>c\prod x_i>c, equivalently when U=−2∑i=1nlogxi<c′.U=-2\sum_{i=1}^n\log x_i<c' .

Distribution. If XX has density βxβ−1\beta x^{\beta-1}, then −logX-\log X is exponential with mean 1/β1/\beta, so 2β(−∑logXi)=βU∼χ2n2.2\beta\Big(-\sum\log X_i\Big)=\beta U\ \sim\ \chi^2_{2n}. Under H0H_0 (β=1\beta=1), U∼χ2n2U\sim\chi^2_{2n}. Let χ2n2(α)\chi^2_{2n}(\alpha) be the lower α\alpha point of χ2n2\chi^2_{2n}. Then reject H0 if −2∑i=1nlogxi<χ2n2(α).\text{reject }H_0\ \text{ if }\ -2\sum_{i=1}^n\log x_i<\chi^2_{2n}(\alpha).

Power. Under β=2\beta=2, 2U∼χ2n22U\sim\chi^2_{2n}, so Power=P(U<χ2n2(α)∣β=2)=P(χ2n2<2χ2n2(α)).\text{Power}=P\big(U<\chi^2_{2n}(\alpha)\mid\beta=2\big)=P\big(\chi^2_{2n}<2\chi^2_{2n}(\alpha)\big). Example: n=5n=5, α=0.05\alpha=0.05: χ102(0.05)=3.940\chi^2_{10}(0.05)=3.940, and the power is P(χ102<7.880)=0.360P(\chi^2_{10}<7.880)=0.360. For n=10n=10 it is P(χ202<21.70)=0.643P(\chi^2_{20}<21.70)=0.643.

✓ Checked by computer We checked by simulation (n = 5): the test has size 0.051 under β = 1 and power 0.361 under β = 2, matching P(χ²₁₀ < 2 × 3.940) = 0.360.

↑ Back to the question list

Let the power function of every test of H0:θ=Θ0 against H1:θ=Θ1 [?] be continuous in θ. Show that a UMP α-similar test is UMPU provided that its size is α for testing H0 against H1

2004 · Paper I · Q3c · 20 marks

Solution

Note on the question. The “[?]” marks a garbled source. We read it in the standard form: H0:θ∈Θ0H_0:\theta\in\Theta_0 against H1:θ∈Θ1H_1:\theta\in\Theta_1, with ω\omega the common boundary of Θ0\Theta_0 and Θ1\Theta_1.

Definitions.

  • A test ϕ\phi is α\alpha-similar on ω\omega if βϕ(θ)=Eθϕ=α\beta_\phi(\theta)=E_\theta\phi=\alpha for all θ∈ω\theta\in\omega.
  • A test of level α\alpha is unbiased if βϕ(θ)≤α\beta_\phi(\theta)\le\alpha on Θ0\Theta_0 and βϕ(θ)≥α\beta_\phi(\theta)\ge\alpha on Θ1\Theta_1.

Claim. If every power function is continuous, and ϕ0\phi_0 is UMP among α\alpha-similar tests and has level α\alpha for H0H_0, then ϕ0\phi_0 is UMPU.

Step 1: every unbiased test is similar. Let ϕ\phi be unbiased at level α\alpha, and θ∈ω\theta\in\omega. Then θ\theta is a limit of points of Θ0\Theta_0, where βϕ≤α\beta_\phi\le\alpha, and of points of Θ1\Theta_1, where βϕ≥α\beta_\phi\ge\alpha. By continuity, βϕ(θ)≤α\beta_\phi(\theta)\le\alpha and βϕ(θ)≥α\beta_\phi(\theta)\ge\alpha, so βϕ(θ)=α\beta_\phi(\theta)=\alpha. Hence the class of unbiased tests is contained in the class of α\alpha-similar tests.

Step 2: ϕ0\phi_0 is unbiased. The test ϕ≡α\phi\equiv\alpha is α\alpha-similar. Since ϕ0\phi_0 is UMP among similar tests, βϕ0(θ)≥αfor all θ∈Θ1.\beta_{\phi_0}(\theta)\ge\alpha\quad\text{for all }\theta\in\Theta_1 . By hypothesis ϕ0\phi_0 has level α\alpha: βϕ0(θ)≤α\beta_{\phi_0}(\theta)\le\alpha on Θ0\Theta_0. So ϕ0\phi_0 is unbiased.

Step 3: ϕ0\phi_0 is UMPU. For any unbiased ϕ\phi, Step 1 shows ϕ\phi is similar, so βϕ0(θ)≥βϕ(θ)\beta_{\phi_0}(\theta)\ge\beta_\phi(\theta) on Θ1\Theta_1. And by Step 2, ϕ0\phi_0 itself is unbiased. So ϕ0\phi_0 is uniformly most powerful among unbiased tests. ◼\blacksquare

✓ Proof checked step by step Every step was checked: continuity forces every unbiased test to be similar on the boundary, and the UMP similar test is itself unbiased.

↑ Back to the question list

A sample of size 1 is taken from probability density function, f(x:θ)=2(θ−x)θ2,0<x<θ Find most powerful test of H0:θ=θ0 against H1:θ=θ1,θ0>θ1 [?], at level α.

2003 · Paper I · Q4a · 20 marks

Solution

Note on the question. The “[?]” in the source is a stray mark. We read the alternative as θ1<θ0\theta_1<\theta_0, as printed.

Likelihood ratio. For one observation xx: λ(x)=f(x;θ1)f(x;θ0)={θ02θ12⋅θ1−xθ0−x,0<x<θ10,θ1≤x<θ0.\lambda(x)=\frac{f(x;\theta_1)}{f(x;\theta_0)}=\begin{cases}\dfrac{\theta_0^2}{\theta_1^2}\cdot\dfrac{\theta_1-x}{\theta_0-x},&0<x<\theta_1\\[2mm]0,&\theta_1\le x<\theta_0 .\end{cases} On (0,θ1)(0,\theta_1), ddx(θ1−xθ0−x)=θ1−θ0(θ0−x)2<0,\frac{d}{dx}\Big(\frac{\theta_1-x}{\theta_0-x}\Big)=\frac{\theta_1-\theta_0}{(\theta_0-x)^2}<0, so λ(x)\lambda(x) decreases in xx (and is 0 beyond θ1\theta_1). The MP test rejects for small xx: reject H0H_0 if x<cx<c.

Choosing cc. Under θ0\theta_0, F(c)=1−(1−c/θ0)2F(c)=1-(1-c/\theta_0)^2. Setting F(c)=αF(c)=\alpha: c=θ0(1−1−α).c=\theta_0\big(1-\sqrt{1-\alpha}\big).

MP test. Reject H0H_0 if x<θ0(1−1−α)x<\theta_0\big(1-\sqrt{1-\alpha}\big).

Power. If c≤θ1c\le\theta_1: 1−β=1−(1−cθ1)2.1-\beta=1-\Big(1-\frac c{\theta_1}\Big)^2 . (If c>θ1c>\theta_1, the region covers the whole support under θ1\theta_1, and the power is 1.)

Example: θ0=2\theta_0=2, θ1=1.5\theta_1=1.5, α=0.05\alpha=0.05 give c=0.0506c=0.0506 and power 0.0660.066. The test does not depend on θ1\theta_1, so it is UMP against all θ<θ0\theta<\theta_0.

✓ Checked by computer We checked: the ratio (θ₁ − x)/(θ₀ − x) is decreasing in x. For θ₀ = 2, θ₁ = 1.5 and α = 0.05, the cut-off is c = 0.0506 and the power is 0.066.

↑ Back to the question list

Find an MP test of size α for testing H0:X∼12πe−x2/2,(−∞<x<∞) against H1:X∼1/2e−|x|,(−∞<x<∞) based on a sample of size 1.

2002 · Paper I · Q3b · 20 marks

Solution

Likelihood ratio. For one observation, λ(x)=12e−|x|12πe−x2/2=π2exp{x22−|x|}=π2e−1/2exp{(|x|−1)22}.\lambda(x)=\frac{\frac12e^{-|x|}}{\frac1{\sqrt{2\pi}}e^{-x^2/2}}=\sqrt{\frac\pi2}\,\exp\Big\{\frac{x^2}2-|x|\Big\}=\sqrt{\frac\pi2}\,e^{-1/2}\exp\Big\{\frac{(|x|-1)^2}2\Big\}.

MP test. λ(x)\lambda(x) increases with (|x|−1)2(|x|-1)^2, so the MP test rejects when |x||x| is far from 1: reject H0 if ||x|−1|>a,\text{reject }H_0\ \text{ if }\ \big||x|-1\big|>a, that is, if |x|<1−a|x|<1-a or |x|>1+a|x|>1+a. The Laplace density is higher than the normal near 0 and in the tails.

Size. Under H0H_0, X∼N(0,1)X\sim N(0,1): α={2{1−Φ(1+a)},a≥12{Φ(1−a)−12}+2{1−Φ(1+a)},0≤a<1.\alpha=\begin{cases}2\{1-\Phi(1+a)\},&a\ge1\\2\{\Phi(1-a)-\tfrac12\}+2\{1-\Phi(1+a)\},&0\le a<1 .\end{cases}

  • If α≤2{1−Φ(2)}=0.0455\alpha\le2\{1-\Phi(2)\}=0.0455, then a≥1a\ge1, and the test is simply: reject if |x|>zα/2|x|>z_{\alpha/2}.
  • For α=0.05\alpha=0.05, solving numerically gives a=0.9950a=0.9950. The test is: reject if |x|<0.005|x|<0.005 or |x|>1.995|x|>1.995.

Power (α=0.05\alpha=0.05), under the Laplace density: P(|X|<0.005)+P(|X|>1.995)=(1−e−0.005)+e−1.995=0.005+0.136=0.141.P(|X|<0.005)+P(|X|>1.995)=(1-e^{-0.005})+e^{-1.995}=0.005+0.136=0.141 .

✓ Checked by computer We solved the size equation numerically for α = 0.05 (a = 0.9950) and confirmed the size (0.050) by simulation. The power under the Laplace alternative is 0.141.

↑ Back to the question list

Choose the correct answer for (i), (ii) and (iv) and answer (iii). (i) A, B and C are three arbitrary events. The expression for the event that “only A occurs” in terms of A, B, C is [(A∩B∩C),(A∩B¯∩C¯)(A∪B¯∪C¯)] (ii) A coin is tossed three times in succession. If A is an event that there are at least two heads and B is the event that 1st throw gives head, the probability P(A∩B) is………………. [1/8, 5/8, 3/8] (iii) State Neyman-Pearson Lemma for testing a simple hypothesis against a simple alternative. (iv) An estimate Tn based on a sample of size n is called an asymptotically unbiased estimate of θ if……… ……. limn→∞P(Tn=θ)=1,E(Tn)=limn→∞ limn→∞E(Tn)=

2001 · Paper I · Q1a · 12 marks

Solution

Note on the question. The answer options are garbled in the source. We give the correct answers.

(i) “Only AA occurs” means AA occurs, and neither BB nor CC does: A∩B‾∩C‾.A\cap\bar B\cap\bar C .

(ii) A∩BA\cap B = {first toss head and at least two heads} = {HHH, HHT, HTH}: P(A∩B)=38.P(A\cap B)=\frac38 .

(iii) Neyman–Pearson lemma. To test H0:θ=θ0H_0:\theta=\theta_0 against H1:θ=θ1H_1:\theta=\theta_1 (both simple), consider the test ϕ(x)={1,f1(x)>kf0(x)γ,f1(x)=kf0(x)0,f1(x)<kf0(x),with E0ϕ(X)=α.\phi(x)=\begin{cases}1,&f_1(x)>kf_0(x)\\\gamma,&f_1(x)=kf_0(x)\\0,&f_1(x)<kf_0(x),\end{cases}\qquad\text{with }E_0\phi(X)=\alpha . Then:

  1. Existence: for every 0≤α≤10\le\alpha\le1 such a test exists, for some k≥0k\ge0 and γ∈[0,1]\gamma\in[0,1].
  2. Sufficiency: such a test is most powerful among all tests of size at most α\alpha.
  3. Necessity: any MP test of size α\alpha has this form, except possibly on a set of probability zero under both hypotheses.

In words: the best critical region WW of size α\alpha consists of the points where f1(x)f0(x)≥k\dfrac{f_1(x)}{f_0(x)}\ge k, with kk chosen so that P0(W)=αP_0(W)=\alpha.

(iv) TnT_n is asymptotically unbiased for θ\theta if limn→∞E(Tn)=θ.\lim_{n\to\infty}E(T_n)=\theta .

✓ Answer checked step by step Every answer was checked: (ii) by listing the 8 outcomes, and (i), (iii), (iv) against the standard definitions.

↑ Back to the question list

Supply the missing word(s) (i) If A and B are independent events then the conditional probability P(B/A) is equal to………….. (ii) If p=q=1/2, then the binomial distribution is …………….. (iii) If a hypothesis specifies the value of all the parameters of a density function, it is called ……………. (iv) Methods which are not concerned with testing or estimating the parameters of a density function of a given type are called………….

2001 · Paper I · Q1c · 12 marks

Solution

(i) If AA and BB are independent, P(B∣A)=𝐏(𝐁)P(B\mid A)=\mathbf{P(B)}.

(ii) If p=q=12p=q=\frac12, the binomial distribution is symmetrical (about its mean n/2n/2).

(iii) A hypothesis that specifies the values of all the parameters is called a simple hypothesis.

(iv) Methods not concerned with the parameters of a density of a given form are called non-parametric (distribution-free) methods.

✓ Answer checked step by step Every answer was checked against the standard definitions.

↑ Back to the question list

Given a random sample of size n from a Bernoulli (1,θ) distribution, find the UMP size-α test for H0:θ=θ0 against H1:θ>θ0. Derive the power function P(θ) of the test.

2000 · Paper I · Q4a(i) · 10 marks

Solution

MLR. With T=∑Xi∼B(n,θ)T=\sum X_i\sim B(n,\theta), for θ1>θ0\theta_1>\theta_0, L(θ1)L(θ0)=(θ1(1−θ0)θ0(1−θ1))T(1−θ11−θ0)n,\frac{L(\theta_1)}{L(\theta_0)}=\Big(\frac{\theta_1(1-\theta_0)}{\theta_0(1-\theta_1)}\Big)^T\Big(\frac{1-\theta_1}{1-\theta_0}\Big)^n, which increases with TT. So the family has MLR in TT.

UMP test (Karlin–Rubin). Reject for large TT: ϕ(x)={1,T>cγ,T=c0,T<c,\phi(x)=\begin{cases}1,&T>c\\\gamma,&T=c\\0,&T<c,\end{cases} with cc and γ\gamma chosen so that Pθ0(T>c)+γPθ0(T=c)=α.P_{\theta_0}(T>c)+\gamma P_{\theta_0}(T=c)=\alpha . Since the test does not depend on θ1\theta_1, it is UMP for H1:θ>θ0H_1:\theta>\theta_0. Randomisation (γ\gamma) is needed because TT is discrete.

Power function. P(θ)=∑t=c+1n(nt)θt(1−θ)n−t+γ(nc)θc(1−θ)n−c.P(\theta)=\sum_{t=c+1}^n\binom nt\theta^t(1-\theta)^{n-t}+\gamma\binom nc\theta^c(1-\theta)^{n-c}. It increases from P(θ0)=αP(\theta_0)=\alpha to P(1)=1P(1)=1. (For large nn, c≈nθ0+zαnθ0(1−θ0)c\approx n\theta_0+z_\alpha\sqrt{n\theta_0(1-\theta_0)}, and P(θ)≈1−Φ(c−nθnθ(1−θ))P(\theta)\approx1-\Phi\Big(\frac{c-n\theta}{\sqrt{n\theta(1-\theta)}}\Big).)

✓ Derivation checked step by step Every step was checked: the Bernoulli family has MLR in T = ΣXᵢ, so the Karlin–Rubin test applies, and the power function follows from T ~ B(n, θ).

↑ Back to the question list

Let ϕ(x) be a test function such that ϕ(x)={1 if x>k,γx=k,0x<k, where 0≤γ≤1 and if X has density f(x,θ) which has monotone likelihood ratio in x where θ is real parameter, then show that the power function of the test ϕ(x) is increasing in θ.

2000 · Paper I · Q4a(ii) · 10 marks

Solution

Set-up. f(x,θ)f(x,\theta) has MLR in xx: for θ1<θ2\theta_1<\theta_2, λ(x)=f(x,θ2)/f(x,θ1)\lambda(x)=f(x,\theta_2)/f(x,\theta_1) is non-decreasing in xx. The test is ϕ(x)=1(x>k),γ(x=k),0(x<k).\phi(x)=1\ (x>k),\qquad\gamma\ (x=k),\qquad0\ (x<k).

Claim. β(θ)=Eθϕ(X)\beta(\theta)=E_\theta\phi(X) is non-decreasing in θ\theta.

Proof. Fix θ1<θ2\theta_1<\theta_2, and let α′=β(θ1)\alpha'=\beta(\theta_1).

Step 1: ϕ\phi is MP for θ1\theta_1 against θ2\theta_2 at size α′\alpha'. Let c=λ(k)c=\lambda(k). Because λ\lambda is non-decreasing:

  • if x>kx>k (where ϕ=1\phi=1), then λ(x)≥c\lambda(x)\ge c;
  • if x<kx<k (where ϕ=0\phi=0), then λ(x)≤c\lambda(x)\le c.

So ϕ=1\phi=1 whenever λ(x)>c\lambda(x)>c and ϕ=0\phi=0 whenever λ(x)<c\lambda(x)<c. For any test ψ\psi with Eθ1ψ≤α′E_{\theta_1}\psi\le\alpha', ∫(ϕ−ψ)(fθ2−cfθ1)dx≥0,\int(\phi-\psi)\big(f_{\theta_2}-cf_{\theta_1}\big)dx\ \ge\ 0, because the integrand is ≥0\ge0 at every xx: where fθ2>cfθ1f_{\theta_2}>cf_{\theta_1}, ϕ=1≥ψ\phi=1\ge\psi; where fθ2<cfθ1f_{\theta_2}<cf_{\theta_1}, ϕ=0≤ψ\phi=0\le\psi. Hence Eθ2ϕ−Eθ2ψ≥c(Eθ1ϕ−Eθ1ψ)≥0.E_{\theta_2}\phi-E_{\theta_2}\psi\ \ge\ c\big(E_{\theta_1}\phi-E_{\theta_1}\psi\big)\ \ge\ 0 . So ϕ\phi is MP of size α′\alpha'.

Step 2: an MP test is unbiased. Compare ϕ\phi with the trivial test ψ≡α′\psi\equiv\alpha', which has size α′\alpha' and power α′\alpha'. By Step 1, β(θ2)=Eθ2ϕ≥Eθ2ψ=α′=β(θ1).\beta(\theta_2)=E_{\theta_2}\phi\ \ge\ E_{\theta_2}\psi=\alpha'=\beta(\theta_1).

Since θ1<θ2\theta_1<\theta_2 were arbitrary, β(θ)\beta(\theta) is non-decreasing in θ\theta. ◼\blacksquare

(It is strictly increasing wherever 0<β(θ)<10<\beta(\theta)<1, unless fθ1=fθ2f_{\theta_1}=f_{\theta_2}.)

✓ Proof checked step by step Every step was checked: the test is of Neyman–Pearson form for every pair θ₁ < θ₂, and MP tests are unbiased.

↑ Back to the question list

Let (x1,x2) be the two independent observations from f(x,θ)=1θe−x/θ,0<x<∞,θ>0. For testing H0:θ=2, against the alternative H1:θ=4, the H0 is accepted when x1+x2<9.448. Determine UMP test. {P[χ42≥9.448]=0.05,P[χ42≥0.711]=0.95}

1998 · Paper I · Q6a · 25 marks

Solution

Note on the question. The upper 5% point of χ42\chi^2_4 is 9.488, not 9.448. With 9.448 the size is 0.0508. We use the value given.

Distribution. X1+X2X_1+X_2 is gamma with shape 2 and scale θ\theta, so 2(X1+X2)θ∼χ42.\frac{2(X_1+X_2)}\theta\sim\chi^2_4 . Under H0H_0 (θ=2\theta=2), X1+X2∼χ42X_1+X_2\sim\chi^2_4.

MP test. For θ1=4>θ0=2\theta_1=4>\theta_0=2, L(4)L(2)=2242exp{(x1+x2)(12−14)},\frac{L(4)}{L(2)}=\frac{2^2}{4^2}\exp\Big\{(x_1+x_2)\Big(\frac12-\frac14\Big)\Big\}, which increases with x1+x2x_1+x_2. So the MP test rejects when x1+x2x_1+x_2 is large: reject H0 if x1+x2≥9.448,size=P(χ42≥9.448)=0.05.\text{reject }H_0\ \text{ if }\ x_1+x_2\ge9.448,\qquad\text{size}=P(\chi^2_4\ge9.448)=0.05 . This is exactly the given rule (accept when x1+x2<9.448x_1+x_2<9.448).

UMP. The critical region does not involve θ1\theta_1, so the same test is MP against every θ>2\theta>2. It is therefore the UMP test of H0:θ=2H_0:\theta=2 against H1:θ>2H_1:\theta>2 (and of θ≤2\theta\le2 against θ>2\theta>2, since its power increases with θ\theta).

Power at θ=4\theta=4. 2(X1+X2)4∼χ42\dfrac{2(X_1+X_2)}4\sim\chi^2_4, so P(X1+X2≥9.448∣θ=4)=P(χ42≥4.724)=e−2.362(1+2.362)=0.317.P(X_1+X_2\ge9.448\mid\theta=4)=P(\chi^2_4\ge4.724)=e^{-2.362}(1+2.362)=0.317 .

(The other given value, P(χ42≥0.711)=0.95P(\chi^2_4\ge0.711)=0.95, would be used for an alternative θ<2\theta<2: then reject when x1+x2≤0.711x_1+x_2\le0.711.)

✓ Checked by computer We checked with SciPy: the exact upper 5% point of χ²₄ is 9.488, P(χ²₄ ≥ 9.448) = 0.0508, and the power at θ = 4 is 0.317.

↑ Back to the question list

Define MP and UMP region. Compare them and show that a MP test is necessary unbiased.

1998 · Paper I · Q6b · 15 marks

Solution

MP region. For a simple H0:θ=θ0H_0:\theta=\theta_0 against a simple H1:θ=θ1H_1:\theta=\theta_1, a critical region WW of size α\alpha is a most powerful (MP) region if, for every other region W′W' with Pθ0(W′)≤αP_{\theta_0}(W')\le\alpha, Pθ1(W)≥Pθ1(W′).P_{\theta_1}(W)\ \ge\ P_{\theta_1}(W').

UMP region. For a composite alternative H1:θ∈Θ1H_1:\theta\in\Theta_1, a region WW of size α\alpha is uniformly most powerful (UMP) if it is MP against every θ1∈Θ1\theta_1\in\Theta_1: Pθ1(W)≥Pθ1(W′)for all θ1∈Θ1 and all W′ of size≤α.P_{\theta_1}(W)\ \ge\ P_{\theta_1}(W')\quad\text{for all }\theta_1\in\Theta_1\text{ and all }W'\text{ of size}\le\alpha .

Comparison.

MP region UMP region
Alternative one simple θ1\theta_1 a set Θ1\Theta_1 of values
Existence always (Neyman–Pearson lemma) only in special cases (e.g. one-sided tests with MLR)
Construction f1(x)/f0(x)≥kf_1(x)/f_0(x)\ge k MP region that does not depend on θ1\theta_1
Relation every UMP region is MP against each θ1\theta_1; the converse fails

For example, for N(μ,1)N(\mu,1), x‾>μ0+zα/n\bar x>\mu_0+z_\alpha/\sqrt n is UMP for μ>μ0\mu>\mu_0, but no UMP region exists for μ≠μ0\mu\ne\mu_0.

An MP test is unbiased. Let WW be MP of size α\alpha. Compare it with a randomised test ϕ0≡α\phi_0\equiv\alpha, which rejects with probability α\alpha regardless of the data. Its size and power are both α\alpha. Since WW is MP, Pθ1(W)≥Eθ1ϕ0=α=Pθ0(W).P_{\theta_1}(W)\ \ge\ E_{\theta_1}\phi_0=\alpha=P_{\theta_0}(W). So the power is at least the size: the MP test is unbiased. ◼\blacksquare (The inequality is strict unless f0=f1f_0=f_1.)

✓ Proof checked step by step Every step was checked: the definitions, and the comparison with the trivial test φ ≡ α.

↑ Back to the question list

Describe real valued function T(x) and the families with MLR. Obtain UMP test for H0:θ≥θ0 against H1:θ<θ0

1998 · Paper I · Q6c · 20 marks

Solution

T(x)T(x) and MLR families. A real-valued statistic T(x)T(x) is a function of the sample that takes values on the real line, such as ∑xi\sum x_i or maxxi\max x_i. A family {f(x;θ)}\{f(x;\theta)\}, with θ\theta real, has a monotone likelihood ratio in T(x)T(x) if, for every θ1<θ2\theta_1<\theta_2, f(x;θ2)f(x;θ1) is a non-decreasing function of T(x).\frac{f(x;\theta_2)}{f(x;\theta_1)}\ \text{ is a non-decreasing function of }T(x). Examples: the one-parameter exponential family c(θ)h(x)eQ(θ)T(x)c(\theta)h(x)e^{Q(\theta)T(x)} with QQ increasing; U(0,θ)U(0,\theta) with T=maxxiT=\max x_i; the hypergeometric family.

UMP test of H0:θ≥θ0H_0:\theta\ge\theta_0 against H1:θ<θ0H_1:\theta<\theta_0. The test is ϕ(x)={1,T(x)<cγ,T(x)=c0,T(x)>c,Eθ0ϕ=α.\phi(x)=\begin{cases}1,&T(x)<c\\\gamma,&T(x)=c\\0,&T(x)>c,\end{cases}\qquad E_{\theta_0}\phi=\alpha .

Proof.

  1. MP against each θ1<θ0\theta_1<\theta_0. For θ1<θ0\theta_1<\theta_0, the ratio f(x;θ1)/f(x;θ0)f(x;\theta_1)/f(x;\theta_0) is non-increasing in TT. So small TT corresponds to a large ratio, and ϕ\phi has the Neyman–Pearson form for θ0\theta_0 against θ1\theta_1. Hence ϕ\phi is MP of size α\alpha against each θ1<θ0\theta_1<\theta_0. Since ϕ\phi does not depend on θ1\theta_1, it is UMP among tests ψ\psi with Eθ0ψ≤αE_{\theta_0}\psi\le\alpha.
  2. Level α\alpha on all of H0H_0. The power EθϕE_\theta\phi is non-increasing in θ\theta (the mirror image of the result that “reject for large TT” has increasing power). So supθ≥θ0Eθϕ=Eθ0ϕ=α\sup_{\theta\ge\theta_0}E_\theta\phi=E_{\theta_0}\phi=\alpha.
  3. UMP for the composite null. Any test of level α\alpha for H0:θ≥θ0H_0:\theta\ge\theta_0 has Eθ0ψ≤αE_{\theta_0}\psi\le\alpha, so by step 1 it is no more powerful than ϕ\phi at any θ<θ0\theta<\theta_0.

So ϕ\phi is the UMP size-α\alpha test. ◼\blacksquare

✓ Proof checked step by step Every step was checked: the MLR property makes the test of Neyman–Pearson form against every θ₁ < θ₀, and its power is monotone.

↑ Back to the question list

Explain the concept of an unbiased test. Examine that whether a MP test is necessarily unbiased.

1997 · Paper I · Q7a · 16 marks

Solution

Unbiased test. A test ϕ\phi of H0:θ∈Θ0H_0:\theta\in\Theta_0 against H1:θ∈Θ1H_1:\theta\in\Theta_1 at level α\alpha is unbiased if Eθϕ≤α for θ∈Θ0andEθϕ≥α for θ∈Θ1.E_\theta\phi\le\alpha\ \text{ for }\theta\in\Theta_0\qquad\text{and}\qquad E_\theta\phi\ge\alpha\ \text{ for }\theta\in\Theta_1 . That is, the probability of rejecting H0H_0 is never smaller when H0H_0 is false than when it is true. A biased test would reject a false H0H_0 less often than a true one, at some parameter values, which is clearly undesirable. When no UMP test exists (for example, for two-sided alternatives), we often look for the UMPU test: the best test among unbiased ones.

Is an MP test necessarily unbiased? Yes (simple H0:θ0H_0:\theta_0 against simple H1:θ1H_1:\theta_1).

Proof. Let ϕ*\phi^* be MP of size α\alpha. The trivial test ϕ0≡α\phi_0\equiv\alpha (reject with probability α\alpha, ignoring the data) has size α\alpha, so Eθ1ϕ*≥Eθ1ϕ0=α.E_{\theta_1}\phi^*\ \ge\ E_{\theta_1}\phi_0=\alpha . The power of ϕ*\phi^* is at least its size, so ϕ*\phi^* is unbiased. ◼\blacksquare Moreover, Eθ1ϕ*>αE_{\theta_1}\phi^*>\alpha unless fθ0=fθ1f_{\theta_0}=f_{\theta_1}.

Example. For N(μ,1)N(\mu,1), the MP test of μ=0\mu=0 against μ=1\mu=1 (reject if x‾>zα/n\bar x>z_\alpha/\sqrt n) has power 1−Φ(zα−n)>α1-\Phi(z_\alpha-\sqrt n)>\alpha. Note that the same test, used against the alternative μ<0\mu<0, is biased. Unbiasedness of an MP test refers to the alternative it was built for.

✓ Proof checked step by step Every step was checked: the definition, and the comparison with the trivial test φ ≡ α.

↑ Back to the question list

When is a family of pdfs said to have MLR in some statistic T(X)? If X1,X2,…,Xn is a random sample from exponential distribution with mean θ, verify whether the family of exponential distribution has MLR in some statistic T(X). Obtain UMP test of size α for testing H0:θ≤θ0 against H0:θ>θ0.

1997 · Paper I · Q7b · 22 marks

Solution

Note on the question. The alternative is printed as “H0:θ>θ0H_0:\theta>\theta_0”. It should read H1:θ>θ0H_1:\theta>\theta_0.

MLR. A family {f(x;θ)}\{f(x;\theta)\} has MLR in T(X)T(X) if, for every θ1<θ2\theta_1<\theta_2, the ratio f(x;θ2)/f(x;θ1)f(x;\theta_2)/f(x;\theta_1) is a non-decreasing function of T(x)T(x).

The exponential family. With f(x;θ)=1θe−x/θf(x;\theta)=\frac1\theta e^{-x/\theta} and T=∑xiT=\sum x_i, for θ1<θ2\theta_1<\theta_2: L(θ2)L(θ1)=(θ1θ2)nexp{T(1θ1−1θ2)}.\frac{L(\theta_2)}{L(\theta_1)}=\Big(\frac{\theta_1}{\theta_2}\Big)^n\exp\Big\{T\Big(\frac1{\theta_1}-\frac1{\theta_2}\Big)\Big\}. Since 1θ1−1θ2>0\frac1{\theta_1}-\frac1{\theta_2}>0, this increases in TT. So the family has MLR in T(X)=∑XiT(X)=\sum X_i.

UMP test of H0:θ≤θ0H_0:\theta\le\theta_0 against H1:θ>θ0H_1:\theta>\theta_0. By the Karlin–Rubin theorem, reject for large TT: reject H0 if ∑Xi>c.\text{reject }H_0\ \text{ if }\ \sum X_i>c . Under θ0\theta_0, 2∑Xiθ0∼χ2n2\dfrac{2\sum X_i}{\theta_0}\sim\chi^2_{2n}. So c=θ02χ2n,α2,c=\frac{\theta_0}2\,\chi^2_{2n,\alpha}, where χ2n,α2\chi^2_{2n,\alpha} is the upper α\alpha point. The power function β(θ)=P(χ2n2>θ0θχ2n,α2)\beta(\theta)=P\Big(\chi^2_{2n}>\frac{\theta_0}\theta\chi^2_{2n,\alpha}\Big) increases with θ\theta, so the size over the whole of H0H_0 is β(θ0)=α\beta(\theta_0)=\alpha.

✓ Derivation checked step by step Every step was checked: the likelihood ratio is increasing in ΣXᵢ, and 2ΣXᵢ/θ₀ ~ χ²₂ₙ gives the critical value.

↑ Back to the question list

Let X1,X2,…,Xn be a random sample from a pdf f(x,θ)={θxθ−1,0≤x≤1,θ>00,otherwise Obtain a level α UMP test of H0:θ=2 against H1:θ>2. Determine also its power function and sketch its graph.

1997 · Paper I · Q7c · 22 marks

Solution

MLR. For θ2>θ1\theta_2>\theta_1, L(θ2)L(θ1)=(θ2θ1)n(∏xi)θ2−θ1,\frac{L(\theta_2)}{L(\theta_1)}=\Big(\frac{\theta_2}{\theta_1}\Big)^n\Big(\prod x_i\Big)^{\theta_2-\theta_1}, which increases with T=∑logxiT=\sum\log x_i. So the UMP test of H0:θ=2H_0:\theta=2 against H1:θ>2H_1:\theta>2 rejects when ∑logxi\sum\log x_i is large, that is, when −∑logxi-\sum\log x_i is small.

Distribution. −logXi-\log X_i is exponential with mean 1/θ1/\theta, so −2θ∑i=1nlogXi∼χ2n2.-2\theta\sum_{i=1}^n\log X_i\ \sim\ \chi^2_{2n}.

UMP test. Under H0H_0, −4∑logXi∼χ2n2-4\sum\log X_i\sim\chi^2_{2n}. Let qαq_\alpha be the lower α\alpha point of χ2n2\chi^2_{2n}. Then reject H0 if −4∑i=1nlogxi<qα.\text{reject }H_0\ \text{ if }\ -4\sum_{i=1}^n\log x_i<q_\alpha .

Power function. Under θ\theta, −2θ∑logXi=θ2(−4∑logXi)∼χ2n2-2\theta\sum\log X_i=\frac\theta2\big(-4\sum\log X_i\big)\sim\chi^2_{2n}, so β(θ)=P(−4∑logXi<qα)=P(χ2n2<θqα2).\beta(\theta)=P\Big(-4\sum\log X_i<q_\alpha\Big)=P\Big(\chi^2_{2n}<\frac{\theta\,q_\alpha}2\Big).

Example: n=5n=5, α=0.05\alpha=0.05, q0.05=3.940q_{0.05}=3.940:

θ\theta 2 3 4 6 8
β(θ)\beta(\theta) 0.050 0.177 0.360 0.703 0.893

Graph. β(θ)\beta(\theta) is an increasing S-shaped curve. It equals α\alpha at θ=2\theta=2, is below α\alpha for θ<2\theta<2, and approaches 1 as θ→∞\theta\to\infty.

02468101200.51θpower β(θ)β(2) = α = 0.05n = 5n = 10
Power function β(θ) = P(χ²₂ₙ < θ·q/2) of the UMP test at α = 0.05. It equals α at θ = 2 and rises to 1 as θ grows; a larger sample gives a steeper curve.

✓ Checked by computer We checked the power formula by simulation (n = 5, θ = 3: 0.176 against the formula’s 0.177), and plotted it.

↑ Back to the question list

Let θ be a real parameter and the random variable x have probability density with MLR in T(x). Determine the size α UMP test of H0:θ≤θ0 against H1:θ>θ0.

1996 · Paper I · Q6a · 30 marks

Solution

Theorem (Karlin–Rubin). Let XX have density f(x;θ)f(x;\theta) with MLR in T(x)T(x). Then for H0:θ≤θ0H_0:\theta\le\theta_0 against H1:θ>θ0H_1:\theta>\theta_0, the test ϕ(x)={1,T(x)>cγ,T(x)=c0,T(x)<c,with Eθ0ϕ(X)=α,\phi(x)=\begin{cases}1,&T(x)>c\\\gamma,&T(x)=c\\0,&T(x)<c,\end{cases}\qquad\text{with }E_{\theta_0}\phi(X)=\alpha, is UMP of size α\alpha. Moreover, its power β(θ)=Eθϕ\beta(\theta)=E_\theta\phi is non-decreasing in θ\theta.

Proof.

Step 1: cc and γ\gamma exist. G(t)=Pθ0(T>t)G(t)=P_{\theta_0}(T>t) is non-increasing and right-continuous. Choose cc with Pθ0(T>c)≤α≤Pθ0(T≥c)P_{\theta_0}(T>c)\le\alpha\le P_{\theta_0}(T\ge c), and set γ=α−Pθ0(T>c)Pθ0(T=c)\gamma=\frac{\alpha-P_{\theta_0}(T>c)}{P_{\theta_0}(T=c)} (or γ=0\gamma=0 if Pθ0(T=c)=0P_{\theta_0}(T=c)=0). Then Eθ0ϕ=αE_{\theta_0}\phi=\alpha.

Step 2: MP against each θ1>θ0\theta_1>\theta_0. Let λ(x)=f(x;θ1)/f(x;θ0)\lambda(x)=f(x;\theta_1)/f(x;\theta_0), a non-decreasing function of T(x)T(x), and k=λk=\lambda at T=cT=c. Then ϕ=1\phi=1 when λ>k\lambda>k and ϕ=0\phi=0 when λ<k\lambda<k. By the sufficiency part of the Neyman–Pearson lemma, ϕ\phi is MP of size α\alpha for θ0\theta_0 against θ1\theta_1. It does not depend on θ1\theta_1, so it is UMP for θ=θ0\theta=\theta_0 against θ>θ0\theta>\theta_0.

Step 3: the power is non-decreasing. For θ′<θ″\theta'<\theta'', the same argument shows ϕ\phi is MP for θ′\theta' against θ″\theta'' at its own size β(θ′)\beta(\theta'). An MP test is unbiased (compare with the trivial test ≡β(θ′)\equiv\beta(\theta')), so β(θ″)≥β(θ′)\beta(\theta'')\ge\beta(\theta').

Step 4: the composite null. By Step 3, supθ≤θ0β(θ)=β(θ0)=α\sup_{\theta\le\theta_0}\beta(\theta)=\beta(\theta_0)=\alpha, so ϕ\phi has size α\alpha for H0:θ≤θ0H_0:\theta\le\theta_0. Any other test ψ\psi of level α\alpha for this H0H_0 has Eθ0ψ≤αE_{\theta_0}\psi\le\alpha, so by Step 2 its power at each θ1>θ0\theta_1>\theta_0 is at most that of ϕ\phi.

So ϕ\phi is the UMP size-α\alpha test: reject H0H_0 for large values of T(x)T(x). ◼\blacksquare

(For H0:θ≥θ0H_0:\theta\ge\theta_0 against H1:θ<θ0H_1:\theta<\theta_0, the inequalities are reversed: reject for small TT.)

✓ Proof checked step by step Every step was checked: the existence of c and γ, the Neyman–Pearson form against every θ₁ > θ₀, and the monotone power function.

↑ Back to the question list

Let Xi(i=1,2,…,n) be a random sample from a rectangular distribution r(0,θ). Show that for testing H0:θ=θ0 against H1:θ>θ0, any critical region W for which Pθ0(W)=α and which necessarily includes the sample point if max(x1,…,xn)>θ0 is UMP at level α.

1996 · Paper I · Q6b · 30 marks

Solution

Set-up. Let Y=max(X1,…,Xn)Y=\max(X_1,\dots,X_n). For θ1>θ0\theta_1>\theta_0, the joint densities are fθ1(x)=θ1−nI(y≤θ1),fθ0(x)=θ0−nI(y≤θ0).f_{\theta_1}(x)=\theta_1^{-n}I(y\le\theta_1),\qquad f_{\theta_0}(x)=\theta_0^{-n}I(y\le\theta_0). So on A={y≤θ0}A=\{y\le\theta_0\}, fθ1=(θ0θ1)nfθ0,f_{\theta_1}=\Big(\frac{\theta_0}{\theta_1}\Big)^nf_{\theta_0}, and Pθ0(Ac)=0P_{\theta_0}(A^c)=0.

Power of WW. WW contains Ac={y>θ0}A^c=\{y>\theta_0\}, and Pθ0(W∩A)=Pθ0(W)=αP_{\theta_0}(W\cap A)=P_{\theta_0}(W)=\alpha. So Pθ1(W)=(θ0θ1)nPθ0(W∩A)+Pθ1(Ac)=α(θ0θ1)n+1−(θ0θ1)n.P_{\theta_1}(W)=\Big(\frac{\theta_0}{\theta_1}\Big)^nP_{\theta_0}(W\cap A)+P_{\theta_1}(A^c)=\alpha\Big(\frac{\theta_0}{\theta_1}\Big)^n+1-\Big(\frac{\theta_0}{\theta_1}\Big)^n .

Any other region W′W' with Pθ0(W′)≤αP_{\theta_0}(W')\le\alpha: Pθ1(W′)=(θ0θ1)nPθ0(W′∩A)+Pθ1(W′∩Ac)≤α(θ0θ1)n+1−(θ0θ1)n=Pθ1(W).P_{\theta_1}(W')=\Big(\frac{\theta_0}{\theta_1}\Big)^nP_{\theta_0}(W'\cap A)+P_{\theta_1}(W'\cap A^c)\le\alpha\Big(\frac{\theta_0}{\theta_1}\Big)^n+1-\Big(\frac{\theta_0}{\theta_1}\Big)^n=P_{\theta_1}(W).

Conclusion. Pθ1(W)≥Pθ1(W′)P_{\theta_1}(W)\ge P_{\theta_1}(W') for every θ1>θ0\theta_1>\theta_0, so WW is UMP at level α\alpha. ◼\blacksquare

Examples of such regions: {y>θ0}∪{y>θ0(1−α)1/n}={y>θ0(1−α)1/n}\{y>\theta_0\}\cup\{y>\theta_0(1-\alpha)^{1/n}\}=\{y>\theta_0(1-\alpha)^{1/n}\}, or {y>θ0}∪{y≤θ0α1/n}\{y>\theta_0\}\cup\{y\le\theta_0\alpha^{1/n}\}. Both are UMP against θ>θ0\theta>\theta_0. (Only the second is also UMP against θ<θ0\theta<\theta_0.) So a UMP region need not be unique.

✓ Proof checked step by step Every step was checked: on {max ≤ θ₀} the alternative density is a constant multiple of the null density, which gives an upper bound on the power of any level-α region, and W attains it.

↑ Back to the question list

On the basis of a random sample of size n from a distribution with pdf fθ(x)={θexp(−θx),x>0,θ>00otherwise derive the MP critical region for testing H:Θ=Θ0 against K:Θ=Θ1(>Θ0). Will this region be UMP against K:Θ>Θ0? Will this region be also MP against K:Θ=Θ2(<Θ0)?

1995 · Paper I · Q6a · 30 marks

Solution

MP region for θ1>θ0\theta_1>\theta_0. With T=∑xiT=\sum x_i, L(θ1)L(θ0)=(θ1θ0)nexp{−(θ1−θ0)T}.\frac{L(\theta_1)}{L(\theta_0)}=\Big(\frac{\theta_1}{\theta_0}\Big)^n\exp\{-(\theta_1-\theta_0)T\}. Since θ1−θ0>0\theta_1-\theta_0>0, this decreases in TT. By the Neyman–Pearson lemma, the MP region is {T<c}\{T<c\}.

Critical value. Under HH, 2θ0∑Xi∼χ2n22\theta_0\sum X_i\sim\chi^2_{2n}. So W={∑i=1nxi<χ2n2(1−α)2θ0},W=\Big\{\sum_{i=1}^nx_i<\frac{\chi^2_{2n}(1-\alpha)}{2\theta_0}\Big\}, where χ2n2(1−α)\chi^2_{2n}(1-\alpha) is the value exceeded with probability 1−α1-\alpha (the lower α\alpha point).

UMP against K:θ>θ0K:\theta>\theta_0? Yes. WW does not depend on θ1\theta_1, so it is MP against every θ1>θ0\theta_1>\theta_0. It is UMP. Its power is Pθ(W)=P(χ2n2<θθ0χ2n2(1−α)),P_\theta(W)=P\Big(\chi^2_{2n}<\frac\theta{\theta_0}\chi^2_{2n}(1-\alpha)\Big), which increases with θ\theta.

MP against K:θ=θ2<θ0K:\theta=\theta_2<\theta_0? No. Now θ2−θ0<0\theta_2-\theta_0<0, so the ratio increases in TT, and the MP region is {∑xi>χ2n,α2/(2θ0)}\{\sum x_i>\chi^2_{2n,\alpha}/(2\theta_0)\}, the opposite tail. Against θ2<θ0\theta_2<\theta_0 the region WW has power less than α\alpha. So WW is not MP there, and no UMP test exists for the two-sided alternative θ≠θ0\theta\ne\theta_0.

✓ Derivation checked step by step Every step was checked: the likelihood ratio, the χ² distribution of 2θ₀ΣXᵢ, and the reversal of the region for θ₂ < θ₀.

↑ Back to the question list

Let (X1,X2,…,Xn) be a random sample from a distribution with pmf fθ(x)=θx(1−θ)1−x, if x=0,1 (0<θ<1). Find the UMP critical region of size α, for testing H:Θ=Θ0 against K:Θ>Θ0.

1995 · Paper I · Q6b · 20 marks

Solution

Likelihood ratio. With T=∑xi∼B(n,θ)T=\sum x_i\sim B(n,\theta) and any θ1>θ0\theta_1>\theta_0, L(θ1)L(θ0)=(1−θ11−θ0)n[θ1(1−θ0)θ0(1−θ1)]T.\frac{L(\theta_1)}{L(\theta_0)}=\Big(\frac{1-\theta_1}{1-\theta_0}\Big)^n\Big[\frac{\theta_1(1-\theta_0)}{\theta_0(1-\theta_1)}\Big]^T . The bracket is greater than 1, so the ratio increases with TT.

MP region. By the Neyman–Pearson lemma, reject HH for large TT: W={x:∑i=1nxi>c},Pθ0(T>c)=∑t=c+1n(nt)θ0t(1−θ0)n−t=α.W=\Big\{x:\ \sum_{i=1}^nx_i>c\Big\},\qquad P_{\theta_0}(T>c)=\sum_{t=c+1}^n\binom nt\theta_0^t(1-\theta_0)^{n-t}=\alpha . If no integer cc gives size exactly α\alpha, we randomise at T=cT=c, rejecting there with probability γ=α−Pθ0(T>c)Pθ0(T=c).\gamma=\frac{\alpha-P_{\theta_0}(T>c)}{P_{\theta_0}(T=c)}.

UMP. The region depends only on θ0\theta_0 and α\alpha, not on θ1\theta_1. So it is MP against every θ1>θ0\theta_1>\theta_0, and is the UMP critical region of size α\alpha for K:θ>θ0K:\theta>\theta_0.

For large nn, approximately: reject if ∑xi>nθ0+zαnθ0(1−θ0)\sum x_i>n\theta_0+z_\alpha\sqrt{n\theta_0(1-\theta_0)}.

✓ Derivation checked step by step Every step was checked: the Bernoulli likelihood ratio is increasing in ΣXᵢ, and the region does not depend on the alternative.

↑ Back to the question list

When is a family of densities said to have monotone likelihood ratio? Show that the one-parameter exponential family of densities belongs to this class of MLR densities.

1995 · Paper I · Q6c · 10 marks

Solution

Definition. A family {f(x;θ):θ∈Θ⊆ℝ}\{f(x;\theta):\theta\in\Theta\subseteq\mathbb R\} has a monotone likelihood ratio in a statistic T(x)T(x) if, for every θ1<θ2\theta_1<\theta_2, the ratio f(x;θ2)f(x;θ1)\frac{f(x;\theta_2)}{f(x;\theta_1)} is a non-decreasing function of T(x)T(x) (where the ratio is defined).

One-parameter exponential family. f(x;θ)=c(θ)h(x)exp{Q(θ)T(x)},f(x;\theta)=c(\theta)\,h(x)\exp\{Q(\theta)T(x)\}, with Q(θ)Q(\theta) a monotone non-decreasing function of θ\theta.

Proof. For θ1<θ2\theta_1<\theta_2, f(x;θ2)f(x;θ1)=c(θ2)c(θ1)exp{[Q(θ2)−Q(θ1)]T(x)}.\frac{f(x;\theta_2)}{f(x;\theta_1)}=\frac{c(\theta_2)}{c(\theta_1)}\exp\Big\{\big[Q(\theta_2)-Q(\theta_1)\big]T(x)\Big\}. Here c(θ2)/c(θ1)>0c(\theta_2)/c(\theta_1)>0 is a constant, and Q(θ2)−Q(θ1)≥0Q(\theta_2)-Q(\theta_1)\ge0. So the ratio is a non-decreasing function of T(x)T(x). The family has MLR in T(x)T(x). ◼\blacksquare

(If QQ is non-increasing, the family has MLR in −T(x)-T(x).) Examples: binomial (T=xT=x, Q=logθ1−θQ=\log\frac\theta{1-\theta}), Poisson (T=xT=x, Q=logθQ=\log\theta), normal with known variance (T=xT=x, Q=μ/σ2Q=\mu/\sigma^2), exponential with mean θ\theta (T=xT=x, Q=−1/θQ=-1/\theta).

✓ Proof checked step by step Every step was checked: the likelihood ratio of the exponential family is an exponential function of T with a non-negative coefficient.

↑ Back to the question list

More on Statistical Inference

Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 1995–2025. 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