Hypothesis testing
In a nutshell
Hypothesis testing is about using probability to confirm or reject a claim based on an experiment or sample. There are two different types of hypothesis tests: one-tailed tests and two-tailed tests.
Definitions
Here are some definitions you need to know:
NAME | DEFINITION |
Test statistic | The test statistic is what is being measured in the experiment or sample. |
Significance level | The significance level is a measure of certainty or strictness when confirming a claim. Significance levels are written as percentages. The smaller the significance level, the more certain the probability that the claim is true. |
Null hypothesis | The null hypothesis is the hypothesis you assume is correct when carrying out the hypothesis test. |
Alternative hypothesis | The alternative hypothesis is the hypothesis that you are actually testing to see is true. The result of the test with the null hypothesis determines whether or not you confirm the alternative hypothesis. |
Notation
The null hypothesis is written as H0, and the alternative hypothesis is written as H1
Note: When performing hypothesis tests with the binomial distribution, the null and alternative hypotheses are written in terms of the probability of success, p.
Example 1
A casino is suspected of using weighted dice. A particular die is tested for whether or not it is biased towards landing on 1. The die is to be rolled 30 times and the number of times it lands on 1 is recorded. What is the test statistic and the null and alternative hypotheses for this test?
First, write down the test statistic. The test statistic is what is being measured.
The test statistic is the number of times the die lands on one.
The null hypothesis is what is assumed to be true. The alternative hypothesis is the claim that is being tested.
H0:p=61,H1:p>61
The null hypothesis is p=61 because while testing, it is assumed that the die is to be unbiased, meaning it will land on each of the six sides will land equally.
The alternative hypothesis is p>61 because it is suspected that the die has a greater probability of landing on 1 - hence the wording "biased towards".
Note: The null hypothesis for a binomial distribution is always in the form H0:p=_ because it is possible to test probabilities only when a value of p is given.
Types of hypothesis tests
There are two types of hypothesis tests: one-tailed tests and two-tailed tests.
Definition
TEST TYPE | DEFINITION |
One-tailed test | A one-tailed test is a test with an alternative hypothesis of the form H1:p>_ or H1:p<_. |
Two-tailed test | A two-tailed test is a test with an alternative hypothesis of the form H1:p=_. |
A two-tailed test has two possibilities for the alternative hypothesis: p<_ and p>_.
Identifying test type
It is possible to identify the type of test (and therefore the alternative hypothesis) from the wording of the claim.
If the claim is that something is more than or less than something else, it is likely to be a one-tailed test.
If the claim is that something is not equal to something else, then it is likely to be a two-tailed test.
The example above was a one-tailed test because the claim was that the die was biased towards rolling on one.
Example 2
The probability of a certain handheld device not working after a year is estimated to be 65%, The company that owns the device releases a new model of the device that they claim to be manufactured differently. What is the null and alternative hypothesis for this test? Is this a one-tailed or two-tailed test?
The null hypothesis is what is assumed to be true.
H0:p=0.65
The alternative hypothesis is the claim to be tested. In this case, this claim is that the manufacturing is different, so it should have a different proportion of devices not working after a year.
H1:p=0.65
This is a two-tailed test as the claim mentions that the proportion is different, but not whether it has specifically increased or decreased.