# Math Help - Hypothesis Testing - Binomial Distribution

1. ## Hypothesis Testing - Binomial Distribution

Hi, been looking over my Hypothesis Testing notes, and can't seen to find anything about testing the Binomial. For example a recent question read something like this.

A coin was tossed 20 times, with 16 tails and 4 heads. Let $Y$ be the number of heads thrown. How would I test this?

Guessing you'd start off with something like:

$Y - Bi(20,p)$

$H_0: p=0.5$

$H_A: p \neq0.5$

Not sure how to procede from here, if I was testing a Normal Distribution I'd calculate a p-vaule, just not sure how to do it for the Binomial.

2. Just found something online that's similar to what I'm looking for.

What they did was to calculate $P(Y \leq 4) = 0.00591$.

How ever because a value of 16 heads would count against $H_0$ just as much, then we must also take into account $P(Y \geq 4)$.

$P(Y \geq 4) = P(Y \leq 4)$ because of symmetry, so the p-value is $2(P(Y \geq 4)) = 0.0118$.

This indicates good evidence against $H_0$, ie. evidence against the coin being fair.

Does this look ok?

3. I was going to suggest finding $\text{C.I}_{0.95}$ if $p=0.5$ is not in this interval reject $H_0$ . This could be done by using the normal approximation to the binomial. But I think $n$ is too small in your case.

4. Originally Posted by pickslides
I was going to suggest finding $\text{C.I}_{0.95}$ if $p=0.5$ is not in this interval reject $H_0$ . This could be done by using the normal approximation to the binomial. But I think $n$ is too small in your case.
Yeh I'd done that before with a different question, but as you said $n$ was too small this time.

Was what I did correct?

5. Originally Posted by craig
Yeh I'd done that before with a different question, but as you said $n$ was too small this time.
To have a normal approximation to the binomial then $np>10$ and $(1-p)n>0$

In your case $np = 4$

Originally Posted by craig

What what I did correct?
Not sure what you are saying here.

Interval I had in mind was,

$\text{C.I}_{0.95} = p\pm Z_{\frac{\alpha}{2}}\times \sqrt{\frac{p(1-p)}{n}}$

6. Originally Posted by pickslides
Not sure what you are saying here.
Oops sorry typo, fixed that.

Originally Posted by pickslides
Interval I had in mind was,

$\text{C.I}_{0.95} = p\pm Z_{\frac{\alpha}{2}}\times \sqrt{\frac{p(1-p)}{n}}$
Ahh right thankyou!