Here’s the difference between the two:
- A hypothesis test is a formal statistical test that is used to determine if some hypothesis about a population parameter is true.
- A confidence interval is a range of values that is likely to contain a population parameter with a certain level of confidence.
This tutorial shares a brief overview of each method along with their similarities and differences.
The Basics of Hypothesis Tests
A hypothesis test is used to test whether or not some hypothesis about a population parameter is true.
To perform a hypothesis test in the real world, researchers will obtain a random sample from the population and perform a hypothesis test on the sample data, using a null and alternative hypothesis:
- Null Hypothesis (H0): The sample data occurs purely from chance.
- Alternative Hypothesis (HA): The sample data is influenced by some non-random cause.
If the p-value of the hypothesis test is less than some significance level (e.g. α = .05), then we can reject the null hypothesis and conclude that we have sufficient evidence to say that the alternative hypothesis is true.
Hypothesis Test Example
Suppose a manufacturing facility wants to test whether or not some new method changes the number of defective widgets produced per month, which is currently 250.
To test this, they may measure the mean number of defective widgets produced before and after using the new method for one month.
They can perform a hypothesis test using the following hypotheses:
- H0: μafter = μbefore (the mean number of defective widgets is the same before and after using the new method)
- HA: μafter ≠ μbefore (the mean number of defective widgets produced is different before and after using the new method)
Suppose they perform a one sample t-test and end up with a p-value of .0032.
Since this p-value is less than α = .05, the facility can reject the null hypothesis and conclude that the new method leads to a change in the number of defective widgets produced per month.
The Basics of Confidence Intervals
A confidence interval is a range of values that is likely to contain a population parameter with a certain level of confidence.
To calculate a confidence interval in the real world, researchers will obtain a random sample from the population and use the following formula to calculate a confidence interval for the population mean:
Confidence Interval = x +/- z*(s/√n)
- x: sample mean
- z: the chosen z-value
- s: sample standard deviation
- n: sample size
The z-value that you will use is dependent on the confidence level that you choose. The following table shows the z-value that corresponds to popular confidence level choices:
Confidence Interval Example
Suppose a biologist wants to estimate the mean weight of turtles in a certain population so she collects a random sample of turtles with the following information:
- Sample size n = 25
- Sample mean weight x = 300
- Sample standard deviation s = 18.5
Here is how to find calculate the 90% confidence interval for the true population mean weight:
90% Confidence Interval: 300 +/- 1.645*(18.5/√25) = [293.91, 306.09]
The biologist can be 90% confident that the true mean weight of a turtle in this population is between 293.1 pounds and 306.09 pounds.
Hypothesis Test vs. Confidence Interval: When to Use Each
The decision to use a hypothesis test or a confidence interval depends on the question you’re attempting to answer.
You should use a confidence interval when you want to estimate the value of a population parameter.
You should use a hypothesis test when you want to determine if some hypothesis about a population parameter is likely true or not.
To test your knowledge of when to use each procedure, consider the following scenarios.
Scenario 1: Hours Spent Studying
Suppose an academic researcher wants to measure the mean number of hours that college students spend studying per week.
Which procedure should she use to answer this question?
She should use a confidence interval because she’s interested in estimating the value of a population parameter.
Scenario 2: New Medication
Suppose a doctor wants to test whether or not a new medication is able to reduce blood pressure more than the current standard medication.
Which procedure should he use to answer this question?
He should use a hypothesis test because he’s interested in understanding whether or not a specific assumption about a population parameter is true.
The following tutorials provide additional information about hypothesis tests:
The following tutorials provide additional information about confidence intervals: