Question:
A leading optometrist claims that $40\%$ of people wear contact lenses. You decide to test the claim by surveying a sample of 12 students.
How many students in your sample would need to reply that they wear contact lenses for there to be significant evidence at the $5\%$ level that the true percentage is less than $40\%$?
$H_0: p = 0.4$
$f = \frac{X}{n} = \frac{X}{12}$
I need to find an $X$ such that $\hat{p}$ would be in the blue area indicated
From the $z$ test table I have a value of $z = 1.645$ would mean significance at a $5\%$ level
So
$$ 1.645 = \frac{\frac{X}{12} - 0.4}{\frac{\sqrt{0.4 (0.6)}}{\sqrt{12}}} $$
Solving this for $X$ gives
$$ 12\left(\frac{\sqrt{0.4 (0.6)}}{\sqrt{12}}( 1.645) + 0.4 \right) = X $$
Then $X \approx 7.59$, meaning that $8$ people would have to say that they wear contact lenses for there to be a significant difference to $H_0$.
This can't be correct - because $\frac{8}{12} > 0.4$ and we were expected to find how many would mean that the true percentage is lower than $40\%$. Having 8 people wear contacts would imply that the percentage is greater, not less.
I'm not sure how to approach this
Edit
As in the drawing a $z$ value of less than the mean is required, so $-1.645$ is required (rather than $1.645$)
Which gives
$$ 12\left(\frac{\sqrt{0.4 (0.6)}}{\sqrt{12}}( -1.645) + 0.4 \right) = X $$
Which gives a value of $X \approx 2.0083$
Which would mean that if only $2$ students stated they wore contacts, this would be significant evidence at a $5\%$ level that $H_0$ is false.