Hypothesis Tests for Differences in Population Means (College Board AP® Statistics)
Study Guide
Written by: Naomi C
Reviewed by: Dan Finlay
Two-sample t-test for difference in population means
What is a two-sample t-test?
A two-sample t-test is used to test whether or not the population means of two different groups, and , are equal
You use a t-test when the population standard deviation, , is unknown
This requires using the t-distribution, which is similar to the normal distribution
To try to prove your case, you take a recent random sample of size from each of the populations and examine the difference between the sample means
e.g. you randomly sample 30 oak trees and 42 beech trees and examine the difference between the mean sample heights
What are the hypotheses for a two-sample t-test?
The null hypothesis, , is the assumption that there is no difference between the means of the two populations
e.g. The mean height of all oak trees is the same as the mean height of all beech trees,
It is assumed to be correct, unless evidence proves otherwise
The alternative hypothesis, , is how you think the population means might be different to each other
e.g. The mean height of all oak trees is greater than the mean height of all beech trees,
Remember that a t-test could be one-tailed or two-tailed, this will affect your alternative hypothesis
Examiner Tips and Tricks
When writing out your hypotheses, always fully define the symbol used for the population parameters in context, e.g. '... where is the mean height of all oak trees and is the mean height of all beech trees'.
What are the conditions for a two-sample t-test?
When performing a two-sample t-test, you must show that it meets the following conditions:
Items in the sample (or experiment) must satisfy the independence condition
by verifying that data is collected by random sampling
or random assignment (in an experiment)
and, if sampling without replacement, showing that the sample size is less than 10% of the population size
The population should be approximately normally distributed
The distribution needs to be approximately symmetric
There should be no outliers
If the population is very skewed, you can only do a t-test if
How do I calculate the standardized test statistic (t-value)?
The t-value, for the difference of means is given by:
where and are the sample means, and are the sample standard deviations, and and are the sample sizes
Examiner Tips and Tricks
The formula for the standardized test statistic is given in the exam, , along with tables of parameters and standard errors.
You will need to apply this correctly to get the t-value. In the numerator, the statistic is the difference between the sample means and the parameter is the difference between the population means, which is 0 for the null hypothesis.
How do I calculate the p-value?
Work out the t-value
Find the appropriate number of degrees of freedom ('dof')
For a two-sample t-test,
If the sample sizes are different, choose the smaller sample size for a more conservative value
Using the t-distribution table given to you:
find the row that corresponds to the dof
identify the t-value in the row that is closest to the calculated value
write down the value in the corresponding column header
this is the p-value
Note that the p-value from the t-table is for one tail
How do I conclude a hypothesis test?
Conclusions to a hypothesis test need to show two things:
a decision about the null hypothesis
an interpretation of this decision in the context of the question
To make the decision, compare the p-value to the significance level,
If then the null hypothesis should be rejected
If then the null hypothesis should not be rejected
In a two-tailed test, double the p-value and compare this to
Examiner Tips and Tricks
Remember that the test should be interpreted within the context of the question.
Use the same language in your conclusion that is used in the problem, e.g. 'The data provides sufficient evidence that the mean height of all oak trees is greater than the mean height of all beech trees'.
What are the steps for performing a two-sample t-test on a calculator?
When using a calculator to conduct a two-sample t-test, you must still write down all steps of the hypothesis testing process:
State the null and alternative hypotheses and clearly define your parameters
Describe the test being used and show that the situation meets the conditions required
Calculate the t-value and the degrees of freedom
Calculate the p-value using your calculator
select a two-sample t-test and enter the relevant summary statistics or data to generate the p-value
select the unpooled option
Compare the p-value to the significance level
Write down the conclusion to the test and interpret it in the context of the problem
Examiner Tips and Tricks
Even if you perform the two-sample t-test on your calculator, it is still important to show all of your working to demonstrate full understanding. Therefore you should still show workings for calculating the t-value and the degrees of freedom.
Worked Example
Juan is a sophomore at SME High, whilst his friend attends APS High. Juan believes that, on average, sophomore students from SME High are faster than those from APS High. He takes a random sample of sophomore students from both schools and records the time they take to run 100 meters. The summary of the results is shown in the table below.
SME High | APS High | |
---|---|---|
Mean | 13.07 | 13.28 |
Standard deviation | 0.46 | 0.32 |
Sample size | 22 | 16 |
Perform an appropriate hypothesis test at the 10% significance level. Assume all conditions for inference are met. Is Juan's belief supported by the test?
Method 1: Using the t-table
State the type of test being used and verify the conditions for the test
The correct inference procedure is a two-sample t-test for the difference in population means with
All conditions for inference are met as stated in the question
Define the population parameters, and
Let be the mean time to run 100 m for all sophomore students at SME High
Let be the mean time to run 100 m for all sophomore students at APS High
Write the null and alternative hypotheses
This will be a one-tailed test as Juan believes that those from SME High will be faster than those from APS High
Note that because it is assumed that SME High will be faster, their mean time should be lower than the mean time for APS High
Calculate the standardized test statistic
Choose the smallest sample and calculate the number of degrees of freedom from it
degrees of freedom = 16 - 1 = 15
Find the p-value from the t-tables
Find the row corresponding to 15 degrees of freedom and identify the t-value that is closest to the absolute calculated t-value (1.659)
closest t-value = 1.753
corresponding p-value is
Compare the probability to the significance level and state the conclusion of the test
is rejected
Interpret the result in the context of the question
We have sufficient evidence to support Juan's belief that sophomore students from SME High are, on average, faster than sophomore students from APS High
Method 2: Using a calculator
State the type of test being used and verify the conditions for the test
The correct inference procedure is a two-sample t-test for the difference in population means with
All conditions for inference are met as stated in the question
Define the population parameters, and
Let be the mean time to run 100 m for all sophomore students at SME High
Let be the mean time to run 100 m for all sophomore students at APS High
Write the null and alternative hypotheses
This will be a one-tailed test as a Juan believes that those from SME High will be faster than those from APS High
Note that because it is assumed that SME High will be faster, their mean time should be lower than the mean time for APS High
Calculate the standardized test statistic
Choose the smallest sample and calculate the number of degrees of freedom from it
degrees of freedom = 16 - 1 = 15
Write down the parameters for the t-test
Enter these into your calculator along with the correct alternative hypothesis and calculate the -value
Compare the probability to the significance level and state the conclusion of the test
is rejected
Interpret the result in the context of the question
We have sufficient evidence to support Juan's belief that sophomore students from SME High are, on average, faster than sophomore students from APS High
Last updated:
You've read 0 of your 5 free study guides this week
Sign up now. It’s free!
Did this page help you?