# statistical hypotheses

A company that packages peanuts states that at a maximum 6% of the peanut shells contain no nuts. At random, 300 peanuts were selected and 21 of them were empty.With a significance level of 1%, can the statement made by the company be accepted?

• Sounds like a homework question. Are those allowed? – JenSCDC Oct 11 '14 at 21:32
• @AndyBlankertz See this information about the self-study tag. – javlacalle Oct 12 '14 at 8:35

You are dealing with a binomial distribution of size $n=300$ and with parameter $p$ being the probability of an empty peanuts package.
One approach is to get the $99\%$ confidence interval for the parameter $p$ and see if the value $0.06\; (6\%)$ lies within it; if so, the statement of the company will be supported by the sample at the $99\%$ confidence level.
$$\frac{\sum_{i=1}^{n=300} X_i}{n} \;\hbox{converges in distribution to}\; N(p, pq/n) \,,$$ where $X_i$ takes on the value $1$ if the package is empty and $0$ otherwise.
$$\frac{\sum_{i=1}^{n=300} X_i}{n} \pm z_{\frac{\alpha}{2}} \sqrt{pq/n} \,,$$ where $z_{\frac{\alpha}{2}}$ is the $100\times(1-0.01/2)$-th percentile in the standard Gaussian distribution.