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

Calculating t statistic for slope of regression line | AP Statistics | Khan Academy


5m read
·Nov 11, 2024

  • [Instructor] Jian obtained a random sample of data on how long it took each of 24 students to complete a timed reaction game and a timed memory game. He noticed a positive linear relationship between the times on each task. Here is a computer output on the sample data.

So, we have some statistics calculated on the reaction time, on the memory time. And then he had his computer do a regression for the data that he collected. And then we're told to assume that all conditions for inference have been met.

Calculate the test statistic that should be used for testing a null hypothesis that the population slope is actually zero. So pause this video and have a go at it.

All right, so let's just make sure we understand what is going on. So let's first think about the population. So I'll do that right over here. So in the population, there might be some true linear relationships. So in theory, on our x-axis, we would have our reaction time and on our y-axis, you have your memory time.

If you were able to plot every single possible data point, it might even be an infinite, or near infinite, (laughs) so it would be very hard to do it. But if you were, if there was just some truth in the universe, it says yes, there actually is a positive linear relationship. And it looks like this.

And you could describe that regression line as y hat. It's a regression line. Is equal to some true population parameter which would be this y intercept. So we could call that alpha plus some true population parameter that would be the slope of this regression line we could call that beta. Times x.

Now we don't know what this truth of the universe is of the linear relationship between reaction time and memory time. But we can try to estimate it. And that's what Jian is trying to do. So he's taking a sample of 24, so samples samples 24 data. Data points.

And that's much easier to then, you can even visualize it on a scatter plot like this. So you'd have one, two, three, four, five, six, seven, eight, nine, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24. You input those data points into a computer and it does a regression line.

And it's trying to minimize the squared distance to all of these points. And so let's say it gets a regression line that looks something like this. Where this regression line can be described as some estimate of the true y intercept.

So this would actually be a statistic right over here. That's estimating this parameter. Plus some estimate of the true slope of the regression line. So this is just a statistic, this b, is just a statistic that is trying to estimate the true parameter, beta.

Now when we went and inputted these data points into a computer, we got values for a and b right over here. A is equal to this, the constant coefficient. And then the reaction coefficient, this is just telling us, hey, for every incremental change in the reaction, how much would we expect the memory time to change.

Or for every change in x, how much would we expect for a change in y. So this is actually our estimate of the slope of the regression line. Now you could imagine, every time you take a different sample, you might get a different estimate of these things.

And when we're doing inferential statistics, we set up hypotheses. You set up a null and an alternative hypothesis. And then null hypothesis is always the no news here. And no news, when you're dealing with regressions is that even though you might suspect there's a positive linear relationship, even though you might see it in the data you got, it's for your null hypothesis, you wanna assume that there is no positive linear relationship.

So our null hypothesis here would be that the true slope of the true regression line, this, the parameter right over here, is equal to zero. So beta is equal to zero. So our null hypothesis actually might be that our true regression line might look something like this.

That what y is, is somewhat independent of what x is. And that if you suspect that there is a positive linear relationship, you could say something like, well, my alternative hypothesis is that my beta is greater than zero. Or if you suspect that there's just some linear relationship, you don't know if it's positive or negative, then you might say that the beta is not equal to zero.

But here it says he noticed or he suspects a positive linear relationship. So this would be his alternative hypothesis. But what you then want to do to test your null hypothesis, which we've done multiple, multiple times, is find a test statistic that is associated with the statistic for b that you actually got.

Now ideally, you would take your b, you would take your b, and from that, subtract the slope assumed in the null hypothesis, so the slope of the regression line you get minus the slope that's assumed from the null hypothesis. And then divide by the standard deviation of the sampling distribution of the slope of the regression line.

And if you did this, you would get a, it would be appropriate to use a z statistic over here. Now, the problem is, is that we don't know exactly what the standard deviation of the sampling distribution is. But we can estimate it.

We can calculate the slope that we got for our sample regression line minus the slope we're assuming in our null hypothesis, which is going to be equal to zero, so we know what we're assuming. And we can calculate the standard error of the sampling distribution. And in fact, our computer has already done it for us.

And this is an estimate of this. And we know what number that is. So we know what all of these numbers are, but if you're using an estimate of the standard deviation of the sampling distribution, we've seen this before. When we've done inferential statistics using, for means, it is appropriate to use a t statistic.

But with that said, pause the video. What is this going to be equal to? Well, this is going to be equal to the slope for our sample regression line, we know it's 14.686 minus our assumed true population parameter, the slope of the true regression line, well, we're assuming that it's zero.

So minus zero. And then we divide that by the standard error which is going to be, we can use this as a standard error for b. And so this is divided by 13.329. So it's just going to be 14.686 divided by 13.329.

And if we assume, if we're doing a one sided test here, what we would then do is take this t statistic and think about the degrees of freedom. And then say, and then calculate a p value. What is the probability of getting a result at least this far above t is equal to zero, or what is the probability of getting a t statistic this high or higher and that would be our p value.

And if that's below some threshold, that's hey, that's pretty unlikely. Then we would reject the null and that would suggest the alternative. But they're not asking us to do all of that. They're just asking us to calculate an appropriate test statistic, which we have just done.

More Articles

View All
15 Things That Seem Important But Aren't
You know, from the moment we wake up in the morning, we can feel society’s pressures looming over us like a dark cloud, can’t we? But what if some of the things they tell us we need to have aren’t really that important at all? What if we could kick these …
How do Cashews Grow?? - Smarter Every Day 44
Hey, it’s me Destin, welcome to Smarter Every Day. Have you ever just sat down and taken a really close look at nuts? I’ve been doing that for the last few minutes, and I’ve come up with some pretty interesting observations. I mean, cashews and peanuts ha…
Fishing in Thorne Bay | Life Below Zero
COLE: You ready to reel a fish in, Willow? WILLOW: Yeah. COLE: It’s been a while, huh? WILLOW: Yeah. COLE: We’ll see. Well, today, Timber and Willow, Willow mostly, they both been asking to go fishing. So, see if we can just pull one winter king in. K…
Does money make you happy?
Does money bring happiness? Listen, I’ll tell you one thing: it gets rid of a lot of problems that can cause unhappiness. If there is any popular opinion that says you don’t need money to be happy, of course, you don’t need money to be happy. There’s a l…
Subtracting with integer chips | Integers: Addition and subtraction | 7th grade | Khan Academy
Let’s say that we want to figure out what negative 8 minus negative 2 is. Now, there’s a lot of ways to approach this, but what we’re going to focus on in this video is to really build the intuition, and we’re going to do that with something called number…
Space Elevator – Science Fiction or the Future of Mankind?
It’s hard to get to space. As much as we all wish there were an easy and affordable way to see our planet floating in the dark, right now, the only way is to become an astronaut or a billionaire. But there is a concept that might make it possible - while …