Question :
A student bought 8 packets of crisps to eat and decided to weigh each packet. They discovered that 5 of them weighed less than the "average contents 25g" stated on the packet.
Is this significant at the 5% level?
Comment on the suitability of the test.
working
Assume that $P(x < \text{average}) = P(x > \text{average})$ for a packet.
This gives $p = 0.5$ , and $\hat{p} = \frac{5}{8} = 0.625$.
$\sigma = \sqrt{0.5 \times 0.5} = 0.5$
Standard error, $SE = \frac{\sigma}{\sqrt{n}} = \frac{0.5}{\sqrt{8}} \approx 0.177$
Using the above I have
$z = \frac{\frac{5}{8} - \frac{1}{2}}{0.177} = \frac{\frac{1}{8}}{0.177} = 0.706 \approx 0.71$.
Looking up this value in the table gives
$z = 0.2389$
Which is not less than $0.05$, so we don't reject $H_0$ in this case (at a $5\%$ significance level)
The suitability of the test is questionable as the sample size is quite low. It's also not very clear what's meant by 'average' here.
binomial model
Using a binomial model instead of a $z$-test
I assume that $p = 0.5$, then I have $X \sim Bin(8, 0.5)$
To find whether the value of $\frac{5}{8}$ packets being underweight is significant (to a $95\%$ level) I use the model as
$$ P(X) = {n \choose x }p^x (1 - p)^{n - x} $$
As
$$ P(5) = {8 \choose 5}(0.5)^{5} (0.5)^{3} $$
Which gives $\frac{7}{32} = 0.21875$.
This is insignificant at a $5\%$ level.
The binomial test was more suitable for this situation as the values were low and easy to compute.
improvements
if the student had recorded the actual weight rather than just whether or not they were less than the given average then they would have been able to make inferences based on that data.