yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Confidence interval for a mean with paired data | AP Statistics | Khan Academy


6m read
·Nov 11, 2024

A group of friends wondered how much faster they could snap their fingers on one hand versus the other hand. Very important question in life! Each person snapped their fingers with their dominant hand for 10 seconds and their non-dominant hand for 10 seconds. Where, if you're right-handed, right hand would be your dominant hand; if you were left-handed, left hand would be your dominant hand. Each participant flipped a coin to determine which hand they would use first because if you always used your dominant hand first, maybe you're tired by the time you're doing your non-dominant hand or there's something else. So here, it's random which one you use first.

Here are the data for how many snaps they performed with each hand, the difference for each participant, and summary statistics. This is actually real data from the Khan Academy content team. So you see for each of the participants, for Jeff right over here, he was able to do 44 snaps in 10 seconds on his dominant hand, which is impressive—more than I think I could do! He was even able to do 35 on his non-dominant hand. The difference here, the dominant hand minus the non-dominant, was nine. Then they tabulated this data for all five members. Now they also calculated summary statistics for them.

But this is the really interesting thing right over here: this is the difference between the dominant and the non-dominant hand. What they did here, the mean difference, is they took this row right over here and calculated the mean, which they got to be 6.8. Then they calculated the standard deviation of these differences right over here, which they got to be approximately. Now we are asked to create and interpret a 95% confidence interval for mean difference in the number of snaps for these participants. So pause this video, see if you can make some headway here, see if you can think about how to approach this.

What's interesting here is we're not trying to construct a confidence interval for just the mean number of snaps for the dominant hand or the mean number of snaps for the non-dominant hand. We're constructing a 95 percent confidence interval for a mean difference. Now you might say, wait, you know, I have two different samples here, and then this third sample is somehow constructed from these other two. But one way to think about it, this is a matched pairs design.

In a matched pair design, what you do is for each participant, for each member of your sample, you will make them do the control and the treatment. For example, you could do the control as how many they can do in the dominant hand in 10 seconds, and the treatment is how many they can do in the non-dominant hand. In matched pairs design, you're really concerned about the difference. You can really view this as you just have one sample size of five for which you are calculating the difference for each member of that sample and the standard deviation across that entire sample.

Now, before we calculate the confidence interval, let's just remind ourselves of some of our conditions that we like to think about when we are constructing confidence intervals. The first condition we think about is whether our sample is random. Now, if we were trying to make some type of judgment about all human beings in their snapping ability, this would not be a random sample. These people all work at Khan Academy; maybe somehow in our interview process, we select for people who snap particularly well. But whatever inferences we make, we can say, hey, this is roughly true about this group of friends.

Now, the next condition we want to think about is the normal condition. There are a couple of ways to think about it. If we had a sample size of 30 or larger, the central limit theorem says, okay, the distribution, the sampling distribution, would be roughly normal—the sampling distribution of the sample means. But obviously, our sample size is much smaller than that. One way to think about it is we could just plot our data points and see whether they seem to be skewed in any way.

If we just do a little dot plot right over here, we could say let's say make this 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. We have one data point where the difference was nine, one data point where the difference is five, one data point where the difference is eight, one data point where the difference is six, and another data point where the difference is six. This doesn't look massively skewed in any way. Our mean difference was right over here approximately 6.8; it looks roughly symmetric.

So we can feel okay about this normal distribution. This isn't the best study that one could conduct; this is obviously a small sample size, it's not random of the entire population, but maybe we could go with it. Also, when you think about biological processes like how well someone snaps, which is a product of a lot of things happening in a human body, the sum of many processes, those things also tend to have a roughly normal distribution. But I won't go into too much depth there. All of these things, once again, this isn't a super robust study, but this is a fun thing for friends to do if they have nothing else to do.

All right, now the third one is independence. This one actually we can feel pretty good about because Jeff's difference right over here really shouldn't impact David's difference, or David's difference really shouldn't impact Kim's difference, especially if they're not observing each other. Let's just say for the sake of argument that they did it all independently in a closed room with an independent observer, so they weren't trying to get competitive or something like that. But needless to say, this isn't a super robust study, but we can still calculate a 95% confidence interval.

So how do we do that? Well, we've done this so many times. Our confidence interval would be our sample mean; it would be the mean of our difference plus or minus. Now we don't know the population standard deviation, so we're going to use our sample standard deviation. And if you're using a sample standard deviation, this confidence interval is all about the mean, and so our critical value here is going to be based on a t-table on the t statistic.

We're going to multiply that times the sample standard deviation of the differences divided by the square root of our sample size. Now we know most of this data here, and let me just write it down over here. We know the mean, the sample mean right over here is 6.8. So, it's going to be 6.8 plus or minus. What will be our critical value? Well, we want to have a 95% confidence interval, and what's our degrees of freedom? Well, it's one less than our sample size, so our degrees of freedom right over here is equal to four.

So are you ready to use a t-table? This is a truncated t-table that I could fit on my screen here, and there are a couple of ways to think about it. Here they actually give us the confidence level, and the reason why that corresponds to a tail probability of 0.025 is if you take the middle 95 percent of a distribution, you're going to have 2.5 on either end. That's going to be your tail probability. So that's all that's going on over there.

We're going to be in this column right over here, and which degree of freedom do we use or degrees of freedom? Well, it's going to be four degrees of freedom. Our sample size is five; five minus one is four, so this is going to be our critical value: 2.776. So we have 2.776 as our critical value, and then times our sample standard deviation. Well, the sample standard deviation for our difference is right over here, 1.64, and then we're going to divide that by the square root of our sample size, so the square root of our sample size.

Let’s calculate just the margin of error right over here. So this is going to be 2.776 times 1.64 divided by the square root of 5, and we get a margin of error of approximately 2.036. So this is going to be 6.8 plus or minus 2.036, approximately equal to that, where this is our margin of error. If we actually wanted to write out the interval, we could just take 6.8 minus this and 6.8 plus that.

So let's do that again with the calculator. So 6.8 minus 2.036 is equal to 4.764, so our confidence interval starts at approximately 4.764, and it goes to, let’s see, I can actually do this one in my head: if I add 2.036 to 6.8, that is going to be 8.8.

Now, how would we interpret this confidence interval right over here? One way to interpret it is to say that we are 95 percent confident that this interval captures the true mean difference in snaps for these friends. We could also say that there appears to be a difference in the mean number of snaps since zero is not captured in this interval, and since the entire interval is above zero, zero is not captured here. It's above zero; it seems that this group right over here, this group of friends at Khan Academy, can snap faster with their dominant hands.

More Articles

View All
The Science of Awkwardness
Hey, Vsauce. Michael here. Not knowing what to do with your hands or offering a handshake when the other person offers a fist bump. Forgetting someone’s name… Not having anything to say and forgetting your phone at home so you can’t be distracted by it. G…
Printing a human kidney - Anthony Atala
[Music] There’s actually a major health crisis today in terms of the shortage of organs. The fact is that we’re living longer; medicine has done a much better job making us live longer. And the problem is, as we age, our organs tend to fail more. So curre…
The Most Iconic TAG Heuer Watch of All Time | Monaco Split-Seconds Chronograph
Hey, Mr. Wonderful here, and I am in a magic zone! This is TAG. Now, this brand is legendary as a sports brand, obviously through racing, the association with racing, but it’s so much more now. And of late, for those of you that collect, we’ve expanded al…
Warren Buffett: The BEST investment during inflation
So, the best investment by far is inflation. It is at its highest level in decades. As a result, inflation has been the number one concern for nearly everyone recently. But what if I told you there was a way for you to never have to worry about inflation …
Congress Wants To Ban Credit Scores | Major Changes Ahead
What’s up, Grandma’s guys? Here, so no surprise, your credit score is pretty much the single most influential deciding factor when it comes to all things personal finance, building wealth, and saving a ton of money. Those three numbers pretty much become …
Polar curve area with calculator
What we’re going to try to do is use our powers of calculus to find this blue area right over here. What this blue area is, is the area in between successive loops of the graph. The polar graph ( r(\theta) = 3\theta \sin(\theta) ) I’m graphing it in polar…