 Welcome to this review session on using Microsoft Excel for conducting two sample hypothesis tests on the means of two groups. Welcome to the review session. In this session, we are going to review using Microsoft Excel for two sample hypothesis tests about the mean. We are going to see how to use Microsoft Excel to do a t-test for the differences between the means of two groups. And we'll see some examples and learn how to interpret the output. In this problem, we're going to examine critical thinking scores, which range from 0 to 10 to higher the better, and we're comparing two colleges. We'll call them college A and college B. Now, the printout is in front of you. So Microsoft Excel to do the t-test, we're assuming equal variances. And now we're going to ask you some questions about this printout that you get from Excel. First question, what is the difference in means between the two groups? Second question is a difference significant at the alpha of 05, the 05 significance level. Question three is how many degrees of freedom is the researcher working with? What is the calculated t-statistic? Sometimes we call it computed t-statistic, calculated, same thing. And finally, what is that 0.00057651 mean? We'll answer these questions on the next slide, but look at it. Look at the printout. This is a typical MSL Excel printout. If you know how to read this printout, you'll have no problem doing two sample t-tests in the future. Now we're going to answer the questions. First of all, variable one is, of course, the first variable, which is college A. We put it in, but you won't get that on top of college A and college B. Variable one and two, it's understood. Variable two is college B. And look at the mean score. It's a lot of decimal places. You don't need so many in the real world. So the mean for college A was 3.867. That's for critical thinking. College B, the mean was 7.692, et cetera. So what's the difference? Just subtract them. And it's approximately 3.83. Remember, there's a 0 to 10 scale. So we have a 3.83 difference. Question two, is it significant? Yes. Look at that probability. The probability is the capital T is less than or equal to T, two-tail. We're doing this as two-tail tests. So you just have to look down there. It's next to the last row. You see it says two-tail. We're not doing one-tail tests. We're doing all of these two-tail tests. And you see the probabilities 0.0057, et cetera. That's less than 0.05. So it's significant. The first thing you say is, wow, that difference is statistically significant at the 0.05 level. Actually, it'll be significant at the 0.01 level. At the 0.01 level, it's significant. How many degrees of freedom? Well, it says it on the printout. Df is 26. But if you remember your lecture, it was n1 plus n2 minus 2, well, 15 plus 13 minus 2. And that's your degrees of freedom here is 26. You have 26 degrees of freedom. And that's why we're doing it as a t-test. With larger samples, we might have been able to get away with z. What is the calculator? We used the formula that you were taught. You'd have gotten the calculator of computed t-statistic of minus 3.919, we're rounding it to 3.92, negative 3.92. And the most important question, what does that 0.0057651 actually mean? It's always the same. We need to use a computer. The computer always gives you the probability of getting the sample evidence given that HO is true. So in this case, what is HO? That the two groups are one group. There's no difference. The same, mu1 minus mu2 equals 0. But the two groups are exactly the same. There's no difference between the two colleges on critical thinking. Well, that was the case. What about the sample evidence that we got? We had a sample of 28. We took 28 students, 15 and 1, and one college, 13 and the other. Well, the likelihood of getting that kind of difference that we got, remember the difference is 3.83 points, the likelihood of getting that when HO is true, which means there's no difference, is very tiny. In fact, it's 0.000. Let's round it to 6. There's a very slight chance that this is going to happen. And that's why we reject HO. We say the two groups are different on critical thinking. That's how we explain the meaning of that 0.00057651. Basically telling us this is not what's supposed to happen. If the two colleges are really the same or the two groups are the same, you might have found a difference of maybe 0.3, 0.4, 0.5, but not a difference of 3.83 points. Let's look at problem two. We've got two companies, company X, company Z. They produce computer chips. And we're looking to purchase computer chips for the computer that our company is coming out with. The data that you see in front of you is years, the lifetime of these chips, the sample of variable 1 taken from chips of company X, listed on the first column, variable 2, the sample taken from company Z, listed in the second column. And there you have the Excel output for the two sample t-test assuming equal variances. What are some of the things you'd want to be able to answer, some of the questions you'd want to be able to answer, looking at this output? Well, for one thing, you should be able to say what the difference is between the two groups, between the two means. You should be able to answer the question, is the difference significant at whatever alpha level you like to work at? And three, how many degrees of freedom that you should be able to pick up right from the output? Four, what is the calculated t-statistic? If you were going to compute the t-statistic using the formula, that's what you should get. And five, what does particular value pulled out of the output, the printout, 0.379, et cetera, what does that mean? And that actually relates to question number two. And we'll see how that plays out in the next slide. So let's do some answers here. We can answer those questions just by looking at the printout, maybe doing a little calculation or two. Question one, what's the difference in means between the two groups? Well, if you take the mean for a variable one and the mean for a variable two, and you take one and subtract it from the other, you get a difference of 0.25 years. It's not very much of a difference, is it? 0.25 years, and this is the difference in x bars between the two groups. Question two, is the difference significant at alpha 0.05? Well, how are you going to figure that out? You actually have to jump down to question five. Take a look at the printout. You see that the probability of capital T less than or equal to lowercase t, two-tail, is 0.37910519. That's the probability of getting this value or worse if the null hypothesis is true, and that's exactly what you're working with when you look at alpha. Now, a computer printout, a computer software that does statistics for you, will not ask you, what's your alpha level? It will report back to you this probability. But basically, you look at this and you say, oh, wow, that's a very large number. If it were less than 0.05, I'd be OK. But it's not less than 0.05. So is the difference significant? No, I can't reject the null hypothesis. Question three, how many degrees of freedom we could get the degrees of freedom by adding n1 plus n2 minus 2? You end up with 27, or you could just pull it directly from the printout. There's the 27. What's the calculated t statistic? Again, it says t-stat. It's kind of hard to miss. Negative 0.894, that's what you get when you plug the numbers into the formula to get the calculated value of the t-statistic. It's a very small value. That goes back to this not being significant. And then finally, what does that number 0.37910519 off of the printout mean? It's the probability of getting the sample evidence that we got, the difference in the means that you see there, or further apart, or worse. If HO is true, so if you drew the picture of the normal distribution and you're looking at the difference between the means, you're going to draw the region of rejection on the right, the region of rejection on the left. Your null hypothesis is that mu1 is equal to mu2. That's the picture of the distribution under the null hypothesis. That's what we always work with. This probability, though, is quite large. It's not going to fit into the two tails that together add up to an alpha of 0.05. And so going back to question number two, the answer is no, we can't reject the null hypothesis. In problem three, we're comparing the lifespan of a sample of meth users, people who use meth and illegal drug, and they use it regularly, versus people don't use it and don't use any drugs. We're doing this in a particular country. And notice the data. And we're looking at the average. So the average for variable one is 47.28 and change years. And that's for the meth users. The non-meth users, they lived 69.475 years. So first of all, what's the difference in means? About 22.15 years, a difference of 22 years in lifespan. Is it significant? That's number two. Just look at the printout. You can see, again, we'll answer number five at the same time. Look at that probability. And it's about 0.0004. Well, again, that probability, that's a key thing. That's with the probability of capital T less than lower case T two tail, that's the probability you want to see. And that's about 0.0004. That's four chances in 10,000. What does that mean? That's the key thing. If you could know how to read that, you compare that with the alpha you're testing at. It doesn't have to be 0.5. Well, that's a lot less than that, a lot less than 0.5. It's 0.0004, approximately. So we conclude that it's a significant difference. Yes, I'll come back to this in a minute what that 0.004 means. But now you should know what it means. The degrees of freedom, just in case you want to know, it's n1 plus n2 minus 2. And you can read it off the printout directly. It's 28. You have 28 degrees of freedom. You've calculated T statistic. Again, you see it on the printout. T stat is minus 4.06. But the key thing is that probability, which you compare with the alpha you're working with. Well, 0.004 is a lot less than 0.5. And what does that tell you that 0.004? Pretend that the HO, remember that HO is the straw man. HO is that the two groups are the same. One group. No difference in their lifespan. Well, if that's true, what's the likelihood of getting this sample evidence? You're looking at a sample of 30 people. 14 meth users, 16 non-meth users. What's the likelihood of getting the difference that we saw of 22.15 years? Or even worse, because we can go all the way to infinity using the distribution and minus infinity. What's the likelihood of getting a difference of 22.15 years or worse if there's no difference? If meth users and non-meth users have the same lifespan, is this the kind of sample evidence you should be seeing with a difference of 22.15 years? The answer is very unlikely. You'll only see this 0.0004. That's four times in 10,000. Four chances in 10,000 of seeing such a great difference in sample evidence and the sample means when there's no difference between the two groups and the populations. So that's why we reject. And just for the record, if you did this the old way, you can do it the hard way, would you do your own t-stat, which is minus 406, and see if it's in the critical values, because you get those critical values. It's the last, last row, she says t-critical two-tail. That's the table values. This is a better table than we have. But if you just wanted to look up the critical values, those would be the critical values, and the value that you got, the calculated value of minus 4.06, et cetera, is outside the bounds. So you know the probability is gonna be a lot less than 0.05. Those critical values, by the way, for the 0.05 level. So you put 0.25 in one tail, 0.25 in the other tail. Anyway, now you know how to read a printout. Good luck.