How to Do Hypothesis Testing with Binomial Distribution

A hypothesis test has the objective of testing different results against each other. You use them to check a result against something you already believe is true. In a hypothesis test, you’re checking if the new alternative hypothesis HA would challenge and replace the already existing null hypothesis H0.

Hypothesis tests are either one-sided or two-sided. In a one-sided test, the alternative hypothesis is left-sided with p < p0 or right-sided with p > p0. In a two-sided test, the alternative hypothesis is pp0. In all three cases, p0 is the pre-existing probability of what you’re comparing, and p is the probability you are going to find.

Note! In hypothesis testing, you calculate the alternative hypothesis to say something about the null hypothesis.

Rule

Hypothesis Testing Binomial Distribution

1.
You formulate a null hypothesis and an alternative hypothesis. H0: p = p0 against Ha: p > p0 (possibly Ha: p < p0 or Ha: pp0).

For example, you would have a reason to believe that a high observed value of p, makes the alternative hypothesis Ha: p > p0 seem reasonable.

2.
Then you do an experiment and find that the event occurs k times.
3.
You calculate the probability that X k (possibly X k) provided that p = p0.
4.
If this probability is less than 1 %, 5 % or 10 %, then you reject H0, depending on the level of significance you have selected.

Example 1

There is a drug on the market that you know cures 85% of all patients. A company has come up with a new drug they believe is better than what is already on the market. This new drug has cured 92 of 103 patients in tests. Determine if the new drug is really better than the old one.

This is a classic case of hypothesis testing by binomial distribution. You now follow the recipe above to answer the task and select 5 % level of significance since it is not a question of medication for a serious illness.

1.
The null hypothesis is that the new drug is worse or as good as the old one:
p = 0.85

The alternative hypothesis in this case is that the new drug is better. The reason for this is that you only need to know if you are going to approve for sale and thus the new drug must be better:

p > 0.85
2.
You see that the event occurs 92 times, since the new drug cured 92 of 103 patients.
3.
You then calculate the probability of seeing at least one equally high observation in a digital probability distribution tool:
P (X 92) = 1 P (X 91) = 0.136

P (X 92) = 1 P (X 91) = 0.136

This result indicates that there is a 13.6 % chance that more than 92 patients would be cured with the old medicine.

4.
You have decided that if the old medicine is to be replaced, then your p value must be less than 5 %. Therefore, there must be less than a 5 % chance of rejecting H0 when the new drug is not better than the old drug. Your p value is
p = 13.6% > 5%

so H0 cannot be rejected. The new drug does not enter the market.

If the p value had been less than the level of significance, that would mean that the new drug represented by the alternative hypothesis is better, and that you are sure of this with statistical significance.

Want to know more?Sign UpIt's free!