A2 June 2025 Q7
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.
The altered program is actually found to glitch 5 times on average when run.
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.
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.
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,
| Scheme | Marks | AO |
|---|---|---|
| (i) \(\mathrm{H}_0: \lambda = 7 \qquad \mathrm{H}_1: \lambda \lt 7\) | B1 | 2.5 |
| (ii) \(X \sim \mathrm{Po}(7)\) [\(\mathrm{P}(X \leqslant 2) = 0.0296\ldots,\ \mathrm{P}(X \leqslant 3) = 0.0817\ldots,\ \mathrm{P}(X \leqslant 4) = 0.172\ldots\)] | M1 | 3.4 |
| Critical region: \(X \leqslant 3\) | A1ft | 1.1b |
| (iii) awrt 0.0818 | B1ft | 1.2 |
| (4) |
Notes
(i) B1: Both hypotheses correct in terms of \(\lambda\) (do not accept \(\mu\) or \(\bar{x}\)). May be seen in (a)(ii)/(iii)
(ii) M1: Sight or use of \(X \sim \mathrm{Po}(7)\) [may be implied by a correct probability to 2 s.f. in (a)]
A1ft: Correct CR clearly stated (A0 if given only as a probability)
[ft their hypotheses from (a)(i), 2-tailed CR is \(X \leqslant 2, X \geqslant 13\)]
(iii) B1ft: awrt 0.0818, ft the probability associated with their CR
| Scheme | Marks | AO |
|---|---|---|
| \(Y \sim \mathrm{Po}(5)\) | M1 | 3.3 |
| \(\mathrm{P}(Y \geqslant \text{‘}4\text{’} \mid \lambda = 5)\) | M1 | 3.4 |
| \(\mathrm{P}(Y \geqslant 4 \mid \lambda = 5) = 0.735\) awrt 0.735 | A1 | 1.1b |
| (3) |
Notes
M1: Sight or use of \(Y \sim \mathrm{Po}(5)\), condone lambda = 5 as a probability statement
[implied by a correct probability e.g. 0.124…, 0.265…, 0.0404…, 0.0734…]
M1: Attempt to find \(\mathrm{P}(Y \geqslant 4)\) with \(Y \sim \mathrm{Po}(5)\) (ft from their CR)
A1: awrt 0.735 (correct answer implies full marks)
| Scheme | Marks | AO |
|---|---|---|
| Geometric | B1 | 3.3 |
| (1) |
Notes
B1: Stating Geometric or Geo (parameter not required, ignore parameter if given)
| Scheme | Marks | AO |
|---|---|---|
| \(T \sim \mathrm{Geo}(\mathrm{e}^{-\lambda})\) | M1 | 2.1 |
| \(\mathrm{P}(T \leqslant n) = 1 - (1 - \mathrm{e}^{-\lambda})^n\) | A1cso* | 1.1b |
| (2) |
Notes
M1: Sight of \(T \sim \mathrm{Geo}(\mathrm{e}^{-\lambda})\) or P(zero glitches) = \(\mathrm{e}^{-\lambda}\) [condone \(\mathrm{P}(T = 0) = \mathrm{e}^{-\lambda}\)]
A1cso*: \(\mathrm{P}(T \leqslant n)\) o.e. or stating that Power = 1 – P(Type II error)
leading to \(1 - (1 - \mathrm{e}^{-\lambda})^n\) [working must be fully correct with no errors]
| Scheme | Marks | AO |
|---|---|---|
| \((1 - \mathrm{e}^{-2.75})^n \lt 0.2\) | B1 | 3.4 |
| \(n\log(1 - \mathrm{e}^{-2.75}) \lt \log 0.2\) | M1 | 2.1 |
| \(n \gt \dfrac{\log 0.2}{\log(1 - \mathrm{e}^{-2.75})} \approx\) awrt 24.4 | A1 | 1.1b |
| \(n = 25\) | A1 | 1.1b |
| (4) | ||
| (14 marks) |
Notes
B1: \((1 - \mathrm{e}^{-2.75})^n \lt 0.2\) (condone use of = or \(\leqslant\) instead of \(\lt\))
M1: Correct process to reach a linear equation involving logs. May be implied by awrt 24.4 or awrt 3.38
A1: Solves equation to obtain awrt 24.4
A1: (\(n =\)) 25 (\(n \geqslant 25\) is A0)
Award full marks for 25 if not from clearly incorrect working