# Building intuition of hypothesis testing

I'm studying AS level mathematics ("college") as a mature student and trying to wrap my head around binomial probability and hypothesis testing.

I understand that $X\sim B(n,p)$ describes a binomial probability distribution where $n$ is the total number of trials and $p$ is the success probability.

When using this to test hypothesis with a significance level, I am trying to correctly articulate what we're doing when we evaluate the binomial distribution.

Let's say we're testing whether a coin is biased towards heads. We've tossed the coin 20 times and found head comes up 16 times. We then produce the following two hypothesis for the distribution $X\sim B(20,\frac{1}{2})$:

$$H_{0} : p=0.5$$ $$H_{1} : p>0.5, P(X\geq 16)$$

Where $H_0$ is our null hypothesis where the coin is not biased, $H_1$ is the alternative hypothesis, the claim that the coin is biased towards heads.

I then evaluate the binomial distribution: $P(X\geq16)=\frac{15}{10000}$. Which tells me that the "probability of getting 16 or more heads" is very unlikely. Comparing this to the significance level (e.g. 5%) helps me determine that there's enough evidence to support the alternative hypothesis because were the coin unbiased/fair getting 16 or more heads is statistically unlikely to occur.

So, my questions:

1. Is my understanding correct according to my language above?

2. When we evaluate the binomial probability ($P(X\geq 16)$ above) what are we actually asking? "If less than our significance, the less likely something would happen according to the null hypothesis, thus the bias is more feasible" or what? Can you put it in better words?

• Your understanding, or at least the wording of it, is not correct. We evaluate $\Pr(X\ge 16)$ given that the null hypothesis is true. We get that if null hypothesis is true, then something very unlikely has happened. So we reject the null hypothesis. – André Nicolas Feb 12 '14 at 21:28
• You've hit the nail in the head! Thanks! Can you add this as an answer in some form? I can then accept. – Alex Feb 13 '14 at 6:54
• You know the answer, so there is no need for more. The wording "the alternative hypothesis is very unlikely" is very much not correct. However, it should not be replaced by "very likely." The correct interpretation is as follows. You are in the business of hypothesis testing, and whenever $X\ge 16$ you reject the null hypothesis. If the null hypothesis is true, then with probability $15/10000$ you will wrongly reject it. – André Nicolas Feb 13 '14 at 7:08
• I have added an answer crediting you as an exercise in explaining it in my own words. Thanks again :) – Alex Feb 13 '14 at 9:22

We evaluate $Pr(X\geq 16)$ given that the null hypothesis is true. We get that if null hypothesis is true, then something very unlikely has happened. So we reject the null hypothesis.