The null hypothesis and the alternative hypothesis
The null hypothesis or is the hypothesis that is assumed to be correct. The alternative hypothesis or describes what happens to the parameter if the null hypothesis is incorrect.
The null hypothesis is always a population parameter equal to some value. The alternative hypothesis is dependent on whether the test is one-tailed or two-tailed . If the test is one-tailed, the null hypothesis will include either , whereas if it is two-tailed, it will involve .
We often refer to the test statistic, which is the result of the experiment or sample from the population.
Carrying out a hypothesis test
The general method for carrying out a hypothesis test is to assume the null hypothesis is true. We then find the Probability that the test statistic will occur, given the conditions of the null hypothesis. If this value is less than a given Percentage, known as the significance level ( ), we can reject the null hypothesis. If not, then we have insufficient evidence to reject the null. Note: sometimes people say 'we accept the null', which isn't strictly accurate but is sometimes accepted.
The significance level will always be stated at the start of a test but is normally 5%.
We can also be required to find the critical region and values of a Probability distribution. The critical region is defined as the region (s) of the probability distribution, where the null hypothesis would be rejected if the test statistic were to fall inside it. The critical value is the first value to fall inside this region. In a one-tailed test, we will have one critical region / value, whereas, in a two-tailed test, there will be two of each, as we must consider both ends of the distribution.
We can also visualize this graphically. We need to show that the test statistic lies inside the critical region to reject the null hypothesis. For a one-tailed test, it looks like this:
Visualisation of a one-tailed test
The green region is the critical region and sums to the significance level. It is a similar scenario for a two-tailed test, which looks like this:
Visualisation of a two-tailed test
Each region sums to half the significance level of the test, so the two critical regions sum to the significance level.
Hypothesis testing with binomial distribution
For a binomially distributed random variable X, written , we are testing probabilities, meaning that the population parameter is p. This means that we must use p in stating the hypothesis.
One-tailed test
The steps for a one-tailed test are as follows:
- Define the test statistic and population parameter (we normally use X for the test statistic, and for the Binomial Distribution, we use p for the population parameter).
- Write down the null and alternative hypothesis.
- Calculate the probability of the test statistic occurring at the observed value, given that the null hypothesis occurs.
- Compare this probability to the significance level.
- Conclude contextually with respect to the question.
A standard six-sided die used in a board game is thought to be biased because it does not roll a one as frequently as the other five values. In 40 rolls, one appears only three times.
At a 5% significance level, test whether this die is biased. Let X be the Number of times a six-sided die was rolled, giving a result of one. Let p be the probability of achieving a one in a roll of the die.
Assume null is true so .
. Hence there is insufficient evidence to reject the null - there is not enough evidence to show that the die is biased.
Two-tailed test
The steps for a two-tailed test are nearly identical to those for a one-tailed test; However, now we must half the significance level to test at both ends. Essentially, in order to not reject the null, we need the probability of the test statistic occurring to lie between and .
A teacher believes that 30% of students watch football on a Saturday afternoon. The teacher asks 50 students, and 21 of them watch football on the weekend. State at a 10% level of significance whether or not the Percentage of pupils that watch football on a Saturday afternoon is different from 30%.
As this is a two-tailed test, we have a 5% significance level at each end of the distribution. Let X be the Number of students who watch football on a Saturday afternoon.
Let p be the probability of a student watching football on a Saturday afternoon.
Assuming the null holds, then , and then , we can reject the null hypothesis in favor of the alternative hypothesis. (Note: we checked the far end of the distribution as 21/50> 0.3).
This means that at a 10% level of significance, the teacher is incorrect about 30% of students watching football on a Saturday afternoon.
Hypothesis testing with normal distribution
When we test with the Normal Distribution , we are testing the mean by making our population parameter the mean, and we denote this with . We do this by looking at the mean of a sample taken from the Normal Distribution of size n. If we have a random variable X, and , and a random sample of size n is taken from this, then the sample mean, is normally distributed with . We then use the distribution of the sample mean to determine whether the mean from the sample is statistically significant.
The process of conducting a hypothesis test using normal distribution is the same as if Binomial Distribution were being used - just with a different population parameter.
We can also find the critical region / value for the normal distribution by standardizing the test statistic. If , then is a normally distributed random variable with . It would also be possible to find the critical values / regions using the inverse normal distribution, stored on your calculator.
A company sells bags of potatoes. The mass of the bags of potatoes is normally distributed, with a Standard Deviation of 4kg. The company claims the mean mass of the bags of potatoes is 100kg. An inspector takes a sample of 25 bags of potatoes and finds that the mean weight is 106.4kg. Using a 5% level of significance, is there evidence to show that the mean mass of the bags of potatoes is greater than 100kg?
Let X denote the mass of a bag of potatoes and the mean mass of a bag of potatoes.
Assuming the null hypothesis, so , which means that .
. This means there is insufficient evidence to reject .
This means that there is no significance at the 5% level that the mean mass of the bags of potatoes is greater than 100kg.
Hypothesis testing correlation
When testing correlation , we are looking to see if we can statistically conclude that a correlation exists between two variables. Correlation (specifically the product moment correlation coefficient (PMCC)) is a sliding scale, with 1 meaning a strong positive correlation, 0 meaning no correlation and -1 meaning a strong negative correlation. We denote r as the PMCC for a sample and as the PMCC for a whole population.
In a two-tailed test, we determine if there is sufficient evidence in the sample to conclude the population correlation is non zero, meaning we take and . In a one-tailed test, we determine whether a sample has enough evidence to conclude whether the population has a positive or negative correlation. Thus, we take again , but take .
We can find the critical region for r using statistical tables (these are given to you in an exam) along with a formula booklet.
A teacher believes that there is a correlation between shoe size and height. They take a sample of 50 students and find a correlation in the sample of 0.34. Is there sufficient evidence to conclude that there is a positive correlation in the population at a 1% level of significance?
Via tables, the critical value is r = 0.3281, and 0.34> 0.3281, meaning our r value falls in the critical region. We can reject the null hypothesis in favor of the alternative. Thus there is sufficient evidence to report that the sample suggests a positive correlation between shoe size and height.
Hypothesis Testing - Key takeaways
- A hypothesis test tests a sample or experiment against the population parameter and aims to see if there is a statistically significant difference between the results.
- A Binomial Hypothesis Test tests the probability of events, with population parameter p
- A normal hypothesis test tests the mean of a population, with population parameters
- A Hypothesis Test for Correlation tests whether there is a significant correlation with the population parameter
How we ensure our content is accurate and trustworthy?
At StudySmarter, we have created a learning platform that serves millions of students. Meet
the people who work hard to deliver fact based content as well as making sure it is verified.
Content Creation Process:
Lily Hulatt is a Digital Content Specialist with over three years of experience in content strategy and curriculum design. She gained her PhD in English Literature from Durham University in 2022, taught in Durham University’s English Studies Department, and has contributed to a number of publications. Lily specialises in English Literature, English Language, History, and Philosophy.
Get to know Lily
Content Quality Monitored by:
Gabriel Freitas is an AI Engineer with a solid experience in software development, machine learning algorithms, and generative AI, including large language models’ (LLMs) applications. Graduated in Electrical Engineering at the University of São Paulo, he is currently pursuing an MSc in Computer Engineering at the University of Campinas, specializing in machine learning topics. Gabriel has a strong background in software engineering and has worked on projects involving computer vision, embedded AI, and LLM applications.
Get to know Gabriel