# Null hypothesis for one sample and two proportions

Ten people taste wine A and wine B. Let $X$ denote the number who prefer A. Assume that all the others indicate a preference for B. The people are a random sample.

If $X=10$, and we test the null hypothesis of no difference in preference between the wines (vs. two-sided alternative), the $p$-value is equal to 0.0020.

I don't get how one comes to the conclusion that the p-value is 0.0020. Are you supposed to use the one sample test for proportion?

• Almost certainly, though it could also be done with a chi-square test. Commented Dec 9, 2012 at 8:15

Yes, you use a classical test for proportion. You can use the exact binomial distribution. There are only two values as extreme as $x = 10$, this is $x = 0$ or $10$. Thus
\def\P{\mathbb P} \begin{aligned} p &= \P( X = 0 \text{ or } X = 10)\\ &= \P(X = 0) + \P(X = 10)\\ &= 2\times \P(X = 0)\\ &= 2 \times {10 \choose 0} \times \left(1 \over 2\right)^{10}\\ &= 2 \times 1 \times {1\over 2^{10}}\\ &= {1\over 512}\\ &= 0.0019 \end{aligned}
• I see that this is now tagged as homework. Here are a few first hints: what is the distribution of $X$? Its mean? Its variance? You can approximate the distribution of $X$ by a normal distribution: why (criteria), and which one? Commented Dec 10, 2012 at 9:17