A2 June 2025 Q7

EdexcelCurrent spec14 marksIncludes hypothesis testingGeometric & Negative BinomialQuality of Tests

7. A software company develops computer programs.
Its Lovelace program is found to glitch 7 times on average when it is run.

The company makes some alterations to improve the program.
It then tests to see if it has been successful in reducing the average number of glitches per run.
The glitches can be assumed to occur independently.

(a)
(i) State suitable hypotheses for the test.
(ii) Find the critical region for the test at a 10% level of significance.
(iii) State the size of the test. (4)

The altered program is actually found to glitch 5 times on average when run.

(b) Find the probability of a Type II error for the company’s test. (3)

Due to the high value of the probability of a Type II error in part (b), the company makes an entirely new version of the program.
The new version of the program is designed to have an average of fewer than \(k\) glitches per run.

The random variable \(T\) represents the number of runs of the program until a run with no glitches occurs.

(c) Write down the name of a suitable distribution for \(T\) (1)

If the new version has an average of \(\lambda\) glitches per run, this new version of the program will be tested using the hypotheses

\[\mathrm{H}_0: \lambda = k \qquad\qquad \mathrm{H}_1: \lambda \lt k\]

The company will reject \(\mathrm{H}_0\) if the first run without any glitches of the new version occurs within \(n\) runs.

(d) Show that the power function of the test is given by\[1 - (1 - \mathrm{e}^{-\lambda})^n\] (2)

The company requires \(\mathrm{P}(\text{Type II error}) \lt 0.2\)
Assuming that the new version of the program has an average of 2.75 glitches per run,

(e) find the minimum value of \(n\) (4)