Hypothesis Tests for Differences in Population Means (College Board AP® Statistics): Study Guide
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 deviations, and , are unknown
This requires using the t-distribution, which is similar to the normal distribution
To test the claim, you take independent random samples of sizes and from the two 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 there is convincing evidence against it
The alternative hypothesis, , is how you think the population means might be different from 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, check that
the data come from two independent random samples (or from random assignment of two treatments in an experiment)
if sampling without replacement, each sample size is at most 10% of its population size, and
This is not needed when treatments are randomly assigned in an experiment
the sampling distribution of each sample mean is approximately normal
For each sample, this is true if any one of these holds:
the population is approximately normal
the sample size is large,
the sample data show no strong skewness and no outliers
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, is the hypothesized difference in population means, 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 degrees of freedom
For a two-sample t-test, the degrees of freedom are found by technology, using a calculator
The calculator gives a df that is usually not a whole number
It is between and the smaller of and
If you are using the t-table instead, a conservative choice is the smaller of and
This gives a slightly larger p-value than the calculator does
Using the t-distribution table given to you:
find the row for the df
find the two values in that row that the calculated t-value lies between
the p-value lies between the tail probabilities at the top of those two columns
Note that the p-value from the t-table is for one tail
For a two-tail test, remember to work out the total probability across both tails
You can double the p-value from a one-tail test
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 we reject the null hypothesis
If then we fail to reject the null hypothesis
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 provide convincing statistical 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, while his friend attends APS High. Juan believes that, on average, sophomore students from SME High are faster than those from APS High. He takes independent random samples 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 |
(a) 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?
(b) Suppose, on reading these results, Juan's coach claims that attending SME High causes sophomore students to run 100 m faster than they would at APS High. Based on the design of the study, is this causal conclusion valid? Justify your answer.
Answer:
(a)
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
Method 1: Using the t-table
For the t-table, use the conservative degrees of freedom from the smaller sample
degrees of freedom = 16 - 1 = 15
Find the p-value from the t-tables
1.659 lies between 1.341 (tail probability 0.10) and 1.753 (0.05) at df = 15:
, so reject
Method 2: Using a calculator
Write down the parameters for the t-test
Enter these into your calculator along with the correct alternative hypothesis and calculate the -value
The calculator uses , which is why its p-value is slightly smaller
Compare the probability to the significance level and state the conclusion of the test
We reject
Interpret the result in the context of the question
We have convincing statistical evidence to support Juan's belief that sophomore students from SME High are, on average, faster than sophomore students from APS High
(b)
Identify the study type
This is an observational study, because Juan did not randomly assign students to attend SME High or APS High
Apply the random-assignment rule for causation
For a causal conclusion to be valid, the treatments (in this case, attending SME High vs APS High) must be randomly assigned to the students
Because the schools were not randomly assigned, confounding variables (e.g. each school's physical-education program, training facilities, or how athletically inclined students self-select into each school) could explain the observed difference in mean times
State the conclusion
The coach's causal conclusion is not valid
The study provides convincing statistical evidence of an association between attending SME High and faster mean 100 m times, but because the study is observational and treatments were not randomly assigned, it cannot establish that attending SME High causes the faster running times
The results can, however, be generalized to all sophomore students at the two schools, because the samples were randomly selected from each school's sophomore population
Unlock more, it's free!
Was this revision note helpful?
Build on this topic