Conducting Hypothesis Tests

Now you know what a Hypothesis Test is, this page has some examples of conducting hypothesis tests. There are generally two approaches to conducting hypothesis tests. One approach is to calculate the probability of the experiment and compare this with the significance level. The other is to calculate the critical region and see where the test statistic falls. Here is a list of steps that you should follow in each case when conducting a hypothesis test:

Approach 1:

  1. State your null and alternate hypotheses including an introduction to the test statistic.
  2. Conduct the experiment.
  3. Identify the distribution of the test statistic and calculate the probability of at least the outcome of the experiment happening by chance if the null hypothesis were true. Note that thisย usuallyย requires the calculation of multiple probabilities.
  4. Compare this probability with the chosen significance level.
  5. Make your conclusion – should you reject or accept the null hypothesis? Interpret the conclusion in terms of the original context.

Approach 2:

  1. State your null and alternate hypotheses including an introduction to the test statistic.
  2. Choose your significance level.
  3. Identify the distribution of the test statistic and calculate the critical region as determined by the chosen significance level.
  4. Conduct the experiment and see if the outcome falls in the critical region.
  5. Make your conclusion – should you reject or accept the null hypothesis?ย Interpret the conclusion in terms of the original context.

Examples

You have a coin that you suspect is biased in favour of heads. You flip it 20 times of which heads comes up 14 times. Conduct a hypothesis test at the 5% significance level to conclude whether the coin is biased or not following the steps given above.

  1. The null and alternate hypotheses are given byย H_0: p=0.5,\hspace{3pt} H_1: p > 0.5, ย where p is the probability of tossing heads in a single coin toss. Note that the test is one-tailed as we are testing to see if the coin is biased in favour of heads.
  2. The experiment involved tossing the coin 20 times and the outcome was 14 heads.
  3. Let X be the random variable that represents the number of heads in 20 coin tosses in general. X has a binomial distribution with 20 trials and the probability of success at 0.5 under the null hypothesis, i.e. X\sim B(20,0.5). The probability of tossing 14 or more heads out of 20 is: P(X\geq 14)=1-P(X\leq 13)=1-0.09423=0.0577. See Binomial Distribution. Note that we calculate the probability of tossing 14 heads or more and not just 14 heads. This is because the bias in the coin exists if we obtain unlikely outcomes such as 14, 15, 16 and so on heads. We are not just testing the inability to get exactly 14 heads in 20 tosses.
  4. The significance level, as stated in the question, is 5%. The probability of tossing at least 14 heads out of 20 is slightly greater than 5% if the coin is fair.
  5. Since the probability is greater than the 5% significance level, the result suggests that there is insufficient evidence to reject the null hypothesis. In conclusion, we accept the null hypothesis. This means that there is no evidence from this experiment to suggest that the coin is biased.

A genetic scientist has a theory that approximately 20% of the world’ s population has blue eyes. A random sample of 30 people is taken and 2 have blue eyes. Conduct a hypothesis test at the 10% significance level to conclude whether the scientist is correct following the steps given above.

  1. The null and alternate hypotheses are given byย H_0: p=0.2,\hspace{3pt} H_1: p \ne 0.2, ย where p is the probability of a randomly chosen person in the world having blue eyes. Note that the test is two-tailed as we are testing to see if the scientist is incorrect.
  2. The question states that the significance level should be 10%.
  3. Let X be the random variable that represents the number of people out of 30 that have blue eyes. X has a binomial distribution with 30 trials and the probability of success at 0.2 under the null hypothesis, i.e. X\sim B(30,0.2). To find the critical region we split the 10% up: 5% for the bottom tail and 5% for the top tail. The critical region is X\leq 2 OR X\geq 10. Note that P(X\leq2)=0.0442 and P(X\geq10)=0.0611 – this was the closest we could get to 5% at each end. The actual significance level is thus 0.0442+0.0611=0.1053 or 10.53%. See Binomial Distribution. Similarly to the bias in the coin in Example 1, both ends of the critical region have multiple values.
  4. The outcome of the experiment was, out of the sample of 30 people, 2 people had blue eyes. 2 is in the critical region.
  5. Since 2 is in the critical region, the experiment suggests that there is evidence to reject the null hypothesis. The scientist is wrong – 20% is not the proportion of people that have blue eyes.

Videos

https://youtu.be/Jagl7aEjVNo

Hypothesis Testing

AS Statistics Hypothesis Testing

A2 Statistics Hypothesis Testing