Confidence interval for hypothesis test for difference in proportions

Learn this with friends

MathsStatistics (TX TEKS)5:303 check-ins

About this video

Teachers compare pass rates for in-person (80%) and online (75%) versions of a course and get a 95% confidence interval for the difference of −0.04 to 0.14. The video shows that for a two-sided test where confidence level plus significance level equals 100%, an interval containing the null value 0 means the P-value is at least 0.05, so we fail to reject the null hypothesis of no difference.

You'll be able to

  • write the null hypothesis for a difference in proportions as p1 − p2 = 0.
  • use a confidence interval to decide a two-sided hypothesis test when confidence level + alpha = 100%.
  • conclude whether the P-value is above or below alpha from whether the interval contains 0.

Key words

difference in proportions
One group's proportion minus another's, here in-person pass rate minus online pass rate.
two-sided test
A test whose alternative is that the values are different, in either direction.
confidence interval
A range of plausible values for the true difference, here −0.04 to 0.14.
significance level
The threshold alpha for the P-value; here 5%, matching a 95% confidence level.
Transcript

- [Narrator] A university offers a certain course that students can take in-person or in an online setting. Teachers of the course were curious if there was a difference in the passing rate between the two settings. Data from a recent semester showed that 80% of students passed the in-person setting and 75% of students passed the online setting.

They were willing to treat these as representative samples of all students who may take each setting of the course. The teachers used those results to make a 95% confidence interval to estimate the difference between the proportion of students who pass in each setting of the course.

So this is a 95% confidence interval for the difference between the proportion who passed the in-person course and the online course. The resulting interval was approximately, it went from negative 0.04 to 0.14. Just to make sure we understand what this is saying, this is saying 95% of the time that you go through this, because we're talking about a 95% confidence interval, 95% of the time you take these samples and then you construct a confidence interval for the difference in proportions, that it will actually contain the true proportion.

They want to use this interval to test their null hypothesis that the true proportions are the same versus their alternative hypothesis that the true proportions are different. Assume that all conditions for inference have been met. Based on the interval, what do we know about the corresponding P-value and conclusion to their test?

So pause this video and try to figure out on your own. All right, so what's interesting here is we're going to use a confidence interval to think about a hypothesis test. Remember, in a hypothesis test we assume that our null hypothesis is true. We'll assume this.

There's another way we could write it. We could write it like this, that the difference between the in-person and the online, true proportions, is equal to zero. These are equivalent statements. In a hypothesis test, we will assume that this is true. Then in a traditional hypothesis test, we set some significance level.

So let's say we set that significance level at 5% and that is a very typical significance level. And if the results we get, if the probability of getting the results that we do get for the difference in the sample proportions is less than 5%, we say hey that's pretty unlikely we're gonna reject the null hypothesis which will suggest the alternative.

But here we have something interesting. We have a confidence interval. It turns out that if the sum of your confidence level and your significance level is equal to 100% and you're doing a two-sided hypothesis test, so you're thinking about well, our alternative hypothesis isn't just that the in-person is greater than the online, or that it's less than the online, it's that they are different.

We have a two-sided hypothesis test. In these situations you can actually make some inferences about your P value from your confidence interval. Think about it this way, we are assuming our null hypothesis is true when we do this hypothesis test. And so when we construct a 95% confidence interval, we would expect that 95% of confidence intervals would overlap with zero.

Where did I get zero from? Remember, this is a confidence interval for the difference in proportions. Our null hypothesis is that the true difference in proportions is zero. So 95% of the time that we do this, if we assume that the null hypothesis is true, we will overlap with zero.

Or another way you can think about it. 5% of confidence intervals would not overlap with zero. So if you are in a situation where you go through this process, you try to construct a 95% confidence interval and you don't overlap with your assumed difference of the true proportions from your null hypothesis, well in this situation your P value is going to be less than your 5% significance level.

In this situation you would reject your null hypothesis. In this first situation your P value is going to be greater than or equal to your alpha level and you would fail to reject. So what's the situation here? Well our interval actually does include the assumed difference in true proportions from the null hypothesis.

So that means assuming the null hypothesis we are in this first scenario. This is one of the 95% of confidence intervals where we actually did overlap with the true parameter that we are trying to estimate. In that situation our P value is going to be greater than or equal to our alpha, which in this case is 5%.

So we fail to reject the null hypothesis. So there isn't evidence to suggest that there is a true difference in passing grades between the in-person and the online exam.

Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.