Lemma
← All topics
Statistics

Hypothesis testing

Deciding whether evidence is strong enough.

Work on paper. Use the hints one at a time if you are stuck, then compare with the full solution, line by line.

Very easy

Q1Very easy2 marks#

A die is suspected of showing a six more often than it should. Define a suitable parameter and write down the null and alternative hypotheses for a test of this suspicion.

Q2Very easy2 marks#

Explain what is meant by saying a test is carried out at the 5% significance level. For the test H0:p=0.3H_0: p = 0.3, H1:p>0.3H_1: p > 0.3 with X∼B(20,0.3)X \sim B(20, 0.3) and critical region X≥10X \ge 10, is the probability of wrongly rejecting H0H_0 above or below 5%5\%? (Use P(X≥10)=0.0480P(X \ge 10) = 0.0480.)

Q3Very easy2 marks#

H0:p=0.5H_0: p = 0.5, H1:p<0.5H_1: p < 0.5, X∼B(10,0.5)X \sim B(10, 0.5). The observed value is x=1x = 1. Find the pp-value, to 4 decimal places.

Q4Very easy2 marks#

X∼N(80,102)X \sim N(80, 10^2). Find the standard deviation of the mean of a random sample of size 2525.

Q5Very easy2 marks#

H0:p=0.5H_0: p = 0.5, H1:p>0.5H_1: p > 0.5, with X∼B(8,0.5)X \sim B(8, 0.5). The observed value is x=7x = 7. Find the pp-value, to 4 decimal places.

Q6Very easy1 mark#

A two-tailed test is carried out at the 10% significance level. What probability should each tail of the critical region be compared with? Give your answer as a decimal.

Q7Very easy2 marks#

X∼N(50,82)X \sim N(50, 8^2). Find the variance of the mean Xˉ\bar X of a random sample of size 1616.

Q8Very easy2 marks#

A coin is tossed 55 times to test H0:p=0.5H_0: p = 0.5 against H1:p>0.5H_1: p > 0.5, where pp is the probability of a head. The critical region is X=5X = 5. Find the actual significance level as an exact fraction.

Q9Very easy2 marks#

For 88 pairs of data, r=0.71r = 0.71. Test H0:ρ=0H_0: \rho = 0 against H1:ρ≠0H_1: \rho \ne 0 at the 5% level, given that the critical value for a two-tailed test with n=8n = 8 is 0.70670.7067.

Q10Very easy2 marks#

X∼N(μ,52)X \sim N(\mu, 5^2). A random sample of size 2525 has mean 21.421.4. Find the value of the test statistic zz for a test of H0:μ=20H_0: \mu = 20.

Easy

Q11Easy4 marks#

It is claimed that 60% of customers prefer brand A. In a random sample of 15 customers, only 5 prefer brand A. Find the pp-value, to 4 decimal places, for a test at the 5% level of whether the proportion is lower than claimed, and state your conclusion.

Q12Easy4 marks#

A test of H0:p=0.25H_0: p = 0.25 against H1:p>0.25H_1: p > 0.25 uses X∼B(12,0.25)X \sim B(12, 0.25) and gives x=6x = 6. Find the pp-value to 4 decimal places, and state the conclusion at the 5% level.

Q13Easy3 marks#

X∼B(20,0.3)X \sim B(20, 0.3). A test of H0:p=0.3H_0: p = 0.3 against H1:p>0.3H_1: p > 0.3 is carried out at the 5% level. Find the critical value cc, so that the critical region is X≥cX \ge c.

Q14Easy2 marks#

For the test in the previous question (critical region X≥10X \ge 10 with X∼B(20,0.3)X \sim B(20, 0.3)), find the actual significance level, to 4 d.p.

Q15Easy4 marks#

Past records show that 20%20\% of a shop's customers pay in cash. After a card machine fault, 66 of the next 1515 customers pay in cash. Find the pp-value, to 4 decimal places, for a test at the 5% level of whether the proportion paying in cash has increased, and state your conclusion.

Q16Easy3 marks#

X∼B(12,0.5)X \sim B(12, 0.5). A test of H0:p=0.5H_0: p = 0.5 against H1:p<0.5H_1: p < 0.5 is carried out at the 5% level. Find the critical value cc, so that the critical region is X≤cX \le c.

Q17Easy4 marks#

The times for a task are N(μ,32)N(\mu, 3^2) minutes, with μ\mu believed to be 1212. After training, a random sample of 99 workers has mean time 10.610.6 minutes. Find the pp-value, to 4 decimal places, for a test at the 5% level of whether the mean time has decreased, and state your conclusion.

Q18Easy3 marks#

A random sample of 1515 towns gives r=−0.48r = -0.48 between average income and the percentage of people who smoke. Test, at the 5% level, whether there is negative correlation in the population. (Critical value for n=15n = 15, one-tailed 5%: 0.44090.4409.)

Q19Easy2 marks#

A test of H0:p=0.4H_0: p = 0.4 against H1:p>0.4H_1: p > 0.4 uses X∼B(10,p)X \sim B(10, p) and has critical region X≥8X \ge 8. Find the probability of a Type I error, to 4 decimal places.

Q20Easy3 marks#

A coin is tossed 2020 times to test whether it is fair, and lands heads 1515 times. Find the pp-value of this two-tailed test, to 4 decimal places. (Use P(X≥15)=0.0207P(X \ge 15) = 0.0207 for X∼B(20,0.5)X \sim B(20, 0.5), but work from the unrounded value if you can.)

Normal

Q21Normal5 marks#

IQ scores are N(100,152)N(100, 15^2). A random sample of 25 students has mean 94.594.5. Test at the 5% level whether their mean differs from 100: give the tail probability P(Xˉ≤94.5)P(\bar X \le 94.5) to 4 decimal places, and your conclusion.

Q22Normal4 marks#

A coin is tossed 30 times. Find the critical region for a two-tailed test of fairness at the 5% level. Enter the two critical values aa and bb (region X≤aX \le a or X≥bX \ge b).

Q23Normal3 marks#

For a random sample of 10 pairs, r=−0.58r = -0.58. The critical value for a two-tailed test at 5% with n=10n = 10 is 0.63190.6319. Carry out the test and state your conclusion carefully.

Q24Normal4 marks#

A machine fills jars with mass N(μ,102)N(\mu, 10^2) g. To test H0:μ=200H_0: \mu = 200 against H1:μ<200H_1: \mu < 200 at the 1% level, a sample of 25 jars is taken. Find the critical value for Xˉ\bar X, to 1 d.p.

Q25Normal3 marks#

A test of H0:p=0.3H_0: p = 0.3 against H1:p>0.3H_1: p > 0.3 uses 2020 trials and the critical region X≥10X \ge 10. In fact p=0.5p = 0.5. Find the probability of a Type II error, to 4 decimal places.

Q26Normal5 marks#

A website claims 35%35\% of its visitors are from abroad. In a random sample of 2020 visitors, 22 are from abroad. Test the claim at the 5% level (two-tailed): give the relevant tail probability to 4 decimal places, and your conclusion.

Q27Normal5 marks#

X∼B(20,p)X \sim B(20, p). Find the critical region for a test of H0:p=0.3H_0: p = 0.3 against H1:p≠0.3H_1: p \ne 0.3 at the 10% level. Enter the two critical values aa and bb (region X≤aX \le a or X≥bX \ge b), and find the actual significance level.

Q28Normal4 marks#

The lengths of rods are N(μ,122)N(\mu, 12^2) mm. A test of H0:μ=150H_0: \mu = 150 against H1:μ≠150H_1: \mu \ne 150 at the 5% level uses a sample of 3636 rods. Find the critical region for Xˉ\bar X: enter the two critical values to 2 decimal places.

Q29Normal4 marks#

For a random sample of 2020 students, the correlation between hours of revision and exam mark is r=0.45r = 0.45. Test for positive correlation at (a) the 5% level and (b) the 1% level. (Critical values for n=20n = 20, one-tailed: 0.37830.3783 at 5%, 0.51550.5155 at 1%.)

Q30Normal5 marks#

The masses (kg) of a breed of lamb are N(μ,22)N(\mu, 2^2). A farmer hopes a new feed has increased μ\mu from 1010. A random sample of 88 lambs gives

11.2,9.8,12.1,10.9,11.5,10.4,12.3,11.0.11.2,\quad 9.8,\quad 12.1,\quad 10.9,\quad 11.5,\quad 10.4,\quad 12.3,\quad 11.0.

Find the pp-value, to 4 decimal places, for a test at the 5% level, and state your conclusion.

Medium

Q31Medium6 marks#

Historically 15% of a crop is diseased. After a new treatment, 1 plant out of a random sample of 25 is diseased. Find the pp-value, to 4 decimal places, for a test at the 10% level of whether the treatment has reduced the proportion, and state your conclusion.

Q32Medium4 marks#

X∼B(20,0.15)X \sim B(20, 0.15). Find the critical region for H1:p>0.15H_1: p > 0.15 at the 10% level, and state the actual significance level to 4 d.p.

Q33Medium5 marks#

X∼B(40,p)X \sim B(40, p). Find the critical region for a test of H0:p=0.25H_0: p = 0.25 against H1:p≠0.25H_1: p \ne 0.25 at the 5% level. Enter the two critical values aa and bb (region X≤aX \le a or X≥bX \ge b).

Q34Medium4 marks#

A test of H0:p=0.3H_0: p = 0.3 against H1:p>0.3H_1: p > 0.3 uses X∼B(20,p)X \sim B(20, p) with critical region X≥10X \ge 10. Find the power of the test when p=0.6p = 0.6, to 4 decimal places, and explain what it means.

Q35Medium4 marks#

X∼N(μ,52)X \sim N(\mu, 5^2). A test of H0:μ=60H_0: \mu = 60 against H1:μ>60H_1: \mu > 60 at the 5% level uses a random sample of size nn. The critical region is Xˉ≥61.645\bar X \ge 61.645 (to 3 d.p.). Find nn.

Q36Medium4 marks#

X∼B(50,p)X \sim B(50, p) and H0:p=0.2H_0: p = 0.2 is tested against H1:p<0.2H_1: p < 0.2. Find all the values of xx that would lead to rejecting H0H_0 at the 5% level but not at the 1% level.

Q37Medium5 marks#

For 1010 pairs of data, Sxx=40S_{xx} = 40, Syy=90S_{yy} = 90 and Sxy=−41S_{xy} = -41. Calculate rr, to 4 decimal places, and test at the 5% level whether there is correlation. (Critical value for n=10n = 10, two-tailed 5%: 0.63190.6319.)

Q38Medium5 marks#

X∼N(μ,152)X \sim N(\mu, 15^2). A test of H0:μ=100H_0: \mu = 100 against H1:μ>100H_1: \mu > 100 at the 5% level uses a sample of size 2525. Find the critical value of Xˉ\bar X, and hence the probability of a Type II error when in fact μ=106\mu = 106, to 4 decimal places.

Q39Medium4 marks#

A coin is tossed nn times and lands heads every time. Find the smallest nn for which this result is significant in a two-tailed test of fairness at the 1% level.

Q40Medium3 marks#

A quality inspector carries out independent tests at the 5% level on 1010 batches, all of which are in fact fine (so H0H_0 is true every time). Assuming each test has actual significance level exactly 5%5\%, find the probability that at least one batch is wrongly rejected, to 4 decimal places.

Hard

Q41Hard6 marks#

X∼N(μ,42)X \sim N(\mu, 4^2). A test of H0:μ=30H_0: \mu = 30 against H1:μ>30H_1: \mu > 30 at the 5% level uses a sample of size nn. Find the smallest nn for which a sample mean of 3131 would lead to rejecting H0H_0.

Q42Hard3 marks#

A coin is tossed 10 times and shows 9 heads. A student finds P(X≥9)=0.0107P(X \ge 9) = 0.0107 for X∼B(10,0.5)X \sim B(10, 0.5) and writes: "So there is only about a 1% chance that the coin is fair." Explain what is wrong, and write a correct interpretation of 0.01070.0107.

Q43Hard6 marks#

A buyer tests a batch of components. She tests 1010; if none is faulty she accepts the batch, and if 22 or more are faulty she rejects it. If exactly 11 is faulty she tests a further 1010 and rejects the batch if any of these is faulty. Find the probability that a batch with 5%5\% faulty components is rejected, to 4 decimal places.

Q44Hard5 marks#

H0:p=0.4H_0: p = 0.4 is tested against H1:p<0.4H_1: p < 0.4 at the 5% level using X∼B(n,p)X \sim B(n, p). Find the smallest nn for which the critical region contains both X=0X = 0 and X=1X = 1.

Q45Hard4 marks#

X∼N(μ,62)X \sim N(\mu, 6^2). A two-tailed test of H0:μ=50H_0: \mu = 50 uses a random sample of size 3636 and does not reject H0H_0 exactly when 48.2<Xˉ<51.848.2 < \bar X < 51.8. Find the significance level of the test, to 4 decimal places.

Q46Hard6 marks#

X∼N(μ,22)X \sim N(\mu, 2^2). A test of H0:μ=20H_0: \mu = 20 against H1:μ<20H_1: \mu < 20 is to have significance level 5%5\%, and probability of a Type II error at most 0.10.1 when μ=19\mu = 19. Find the smallest sample size nn.

Q47Hard4 marks#

A researcher with 1212 pairs finds r=0.55r = 0.55. She had planned a two-tailed test at 5% (critical value 0.57600.5760), but on seeing a positive rr she switches to a one-tailed test for positive correlation (critical value 0.49730.4973) and reports a significant result. Explain, with numbers, why this is wrong, and find the real significance level of her procedure.

Q48Hard6 marks#

X∼B(20,p)X \sim B(20, p). Find the critical region for a test of H0:p=0.2H_0: p = 0.2 against H1:p≠0.2H_1: p \ne 0.2 at the 5% level. Enter the two critical values aa and bb (region X≤aX \le a or X≥bX \ge b), and find the actual significance level.

Q49Hard6 marks#

A process has output N(μ,32)N(\mu, 3^2), and H0:μ=50H_0: \mu = 50 is tested against H1:μ>50H_1: \mu > 50 at the 1% level. One random sample of 1010 has mean 52.152.1; a second, independent, random sample of 1515 has mean 50.950.9. The two samples are combined. Find the pp-value for the combined sample, to 4 decimal places, and state the conclusion.

Q50Hard5 marks#

A journal publishes only results significant at the 5% level. Suppose that of 10001000 hypotheses tested, 900900 have H0H_0 true and 100100 have H0H_0 false, and that each test has power 0.80.8. What proportion of the significant results are false positives?

Extreme

Q51Extreme6 marks#

A test statistic TT has a continuous, strictly increasing distribution function FF under H0H_0, and large values are extreme, so the pp-value is P=1−F(T)P = 1 - F(T). Prove that under H0H_0, PP is uniformly distributed on [0,1][0, 1]. Deduce that rejecting when P≤αP \le \alpha gives a test of size exactly α\alpha, and verify this for the one-tailed zz-test at α=0.05\alpha = 0.05.

Q52Extreme6 marks#

XX is a discrete test statistic with large values extreme, and the pp-value of an observation xx is p(x)=P(X≥x∣H0)p(x) = P(X \ge x \mid H_0). Prove that for every α\alpha, P(p(X)≤α∣H0)≤αP\big(p(X) \le \alpha \mid H_0\big) \le \alpha. Illustrate with X∼B(10,0.5)X \sim B(10, 0.5) and α=0.05\alpha = 0.05, finding the actual size.

Q53Extreme7 marks#

X1,…,XnX_1, \ldots, X_n is a random sample from N(μ,σ2)N(\mu, \sigma^2) with σ\sigma known. For the simple hypotheses H0:μ=μ0H_0: \mu = \mu_0 and H1:μ=μ1H_1: \mu = \mu_1 with μ1>μ0\mu_1 > \mu_0, the Neyman–Pearson lemma says the most powerful test of a given size rejects when the likelihood ratio Λ=L(μ1)L(μ0)\Lambda = \dfrac{L(\mu_1)}{L(\mu_0)} is large. Show that Λ\Lambda is an increasing function of xˉ\bar x, and deduce that the most powerful test is the usual one, rejecting for large Xˉ\bar X, whatever the value of μ1>μ0\mu_1 > \mu_0. Check numerically with μ0=0\mu_0 = 0, μ1=1\mu_1 = 1, σ=1\sigma = 1, n=4n = 4 that Λ\Lambda at xˉ=0.8\bar x = 0.8 exceeds Λ\Lambda at xˉ=0.5\bar x = 0.5.

Q54Extreme6 marks#

X∼N(μ,1)X \sim N(\mu, 1) and H0:μ=0H_0: \mu = 0 is tested against H1:μ>0H_1: \mu > 0 at the 5% level using a sample of size nn. Show that the power function is β(μ)=Φ(μn−1.6449)\beta(\mu) = \Phi(\mu\sqrt n - 1.6449), explain why it is increasing in μ\mu and in nn, and find the power when μ=0.5\mu = 0.5 and n=16n = 16, to 4 decimal places.

Q55Extreme6 marks#

For a one-tailed zz-test of H0:μ=μ0H_0: \mu = \mu_0 against H1:μ>μ0H_1: \mu > \mu_0 with known σ\sigma, size α\alpha and power 1−β1 - \beta at μ=μ0+δ\mu = \mu_0 + \delta (δ>0\delta > 0), show that the sample size must satisfy

n≥((zα+zβ) σδ)2,n \ge \left(\frac{(z_\alpha + z_\beta)\,\sigma}{\delta}\right)^2,

where P(Z>zα)=αP(Z > z_\alpha) = \alpha. Hence find the smallest nn when σ=10\sigma = 10, δ=2\delta = 2, α=0.05\alpha = 0.05 and the power must be at least 0.90.9.

Q56Extreme6 marks#

The test with critical region X≥10X \ge 10, where X∼B(20,p)X \sim B(20, p), has power function β(p)=P(X≥10)\beta(p) = P(X \ge 10). Prove, using a coupling argument, that β(p)\beta(p) is increasing in pp. Hence show that this test has size at most 0.04800.0480 for the composite null hypothesis H0:p≤0.3H_0: p \le 0.3.

Q57Extreme6 marks#

Under H0:ρ=0H_0: \rho = 0 (bivariate normal data), T=rn−21−r2T = \dfrac{r\sqrt{n - 2}}{\sqrt{1 - r^2}} has a tt-distribution with n−2n - 2 degrees of freedom. Show that the critical value of rr is r∗=t∗n−2+t∗2r^* = \dfrac{t^*}{\sqrt{n - 2 + t^{*2}}}, where t∗t^* is the critical value of TT. Hence, given t∗=2.2281t^* = 2.2281 for 1010 degrees of freedom (two-tailed 5%), find r∗r^* for n=12n = 12, to 4 decimal places.

Q58Extreme6 marks#

For X∼B(10,0.5)X \sim B(10, 0.5), no critical region of the form X≥cX \ge c has size exactly 5%5\%. A randomised test rejects H0H_0 if X≥9X \ge 9, and if X=8X = 8 rejects with probability γ\gamma (decided by an independent random number). Find γ\gamma, to 4 decimal places, so that the size is exactly 0.050.05. Explain why such tests matter in theory even though they are rarely used in practice.

Q59Extreme6 marks#

mm hypotheses H0,1,…,H0,mH_{0,1}, \ldots, H_{0,m} are each tested at level αm\frac{\alpha}{m} (the Bonferroni correction). Prove that if all of them are true, the probability of rejecting at least one is at most α\alpha, whether or not the tests are independent. For m=10m = 10 independent tests with α=0.05\alpha = 0.05, find this probability exactly, to 4 decimal places, and compare with Q40.

Q60Extreme7 marks#

To test whether a coin is fair, Jo tosses it 1010 times and carries out a two-tailed test at the 5% level. If that is not significant, she tosses it 1010 more times and tests all 2020 tosses at the 5% level, rejecting if this second test is significant. Given the critical regions X10≤1X_{10} \le 1 or X10≥9X_{10} \ge 9 for 1010 tosses, and X20≤5X_{20} \le 5 or X20≥15X_{20} \ge 15 for 2020 tosses, find the probability that Jo rejects H0H_0 when the coin is fair, to 4 decimal places.