 Hi there, this is a video covering the match pairs method for comparing the means for two populations using information from two dependent samples. So in this case, the method we're about to use, the following requirements hold. The sample data are dependent, remember that means they are not independent. So dependent means they have some sort of interaction with each other. The samples are simple random samples as always and either or both of the following are satisfied. The number of pairs of sample data is large, meaning greater than 30, or the pairs of values have differences that are from a population that is normally distributed. So there's kind of some alignment with the requirements we've seen for previous methods that we've used. So the notation for dependent samples is as follows, D represents the individual difference between the two values of a single matched pair. So what we'll do is we'll take data from one sample and from another sample and we'll pair up a data value from sample one with a data value from sample two and we'll subtract to find the difference. Mu sub X bar is the mean value of the differences for the sample of all matched pairs of data. Mu sub D is the mean value of the differences for the population of all matched pairs of data. So mu sub X bar is from our sample data and then mu sub D is the mean value of the differences for the population and that's what we'll actually be running our hypothesis test about is mu sub D. That's what you'll see in our hypothesis and then N is the number of pairs of sample data. So number of pairs is N. So when designing an experiment or planning an observational study using dependent samples of paired data is generally better than using two independent samples just because of the creative tactics that are used here in this method or process. Using matched pairs reduces extraneous variation which could occur if experimental units were treated independently so that's the power of this matched pairs method. So basically we'll write out our hypotheses for our test and then we'll get a p-value compared to the significance level and go from there. To get our p-value we will use in the Google Sheet Spreadsheet the two variable stats tab and then we'll type our data or our values into column A and then column B and then O10 will give us our test statistic and then our p-value will be given an O11, O12 or O13 depending on what type of hypothesis test we are using. So use the sample data below with the significance level of 0.05 to test the claim that for the population of heights of presidents and remain opponents the differences have a mean less than zero centimeters. So our claim is that the mean difference is less than zero centimeters. So we're going to define u sub d as being group 2 minus group 1. So let's think about this. Alright so mean difference is less than zero. So mu sub d is less than zero. Would that go with the null or the alternative? Since it does not contain equal to it has to go with the alternative. The null is always going to be equal to zero. The mean difference among the population is equal to zero. Our claim what was discussed in the question is the alternative hypothesis. The first group listed will always be group 1, the second group listed we will always use that as group 2. So all we have to do is go to Google Sheets, go to the two variable stats tab, zoom in a little bit here and column A starting in cell A2 you will type your first row of data values 189, 173, 183, 180, 179, delete anything else that's left. Honestly it's probably a best practice to delete out any data currently there before you start typing. Alright then type in your group 2's, 170, 185, 175, 180, and 178, give your spreadsheet some time to calculate. If you see the gray bar in the top right repeatedly occurring it's not done calculating yet. Once it's gone for a while chances are it's ready to go. So you look down and say it sells OGE 11, OGE 12, and OGE 13. It was this a right-tailed test, a left-tailed test, or a two-tailed test? Well it used to sign the less than. Less than means you use a left-tailed test. Less than indicates a left-tailed test, so you have 0.2819 and just because it's cool the test statistic is negative 0.63. Sometimes questions will ask you for the test statistic. T value negative 0.63 that is the test statistic. Remember say test statistic 10 times fast see how it works out for you. Alright so my test was left-tailed, I probably should have indicated that here. Our test statistic was equal to negative 0.63 and our p-value was actually equal to 0.2819. 0.2819 and remember the p-value has to be compared to the significance level, has to be compared to 0.05. So is the p-value less than or greater than alpha? It's definitely greater than 0.05. Since we're not under the limbo bar we fail to reject the null hypothesis. We fail to reject H0. So we fail to reject the null hypothesis, meaning we can't even look at the claim and consider it. We're stuck with the null hypothesis so there's not evidence to support our claim here. We say there's not sufficient evidence to support the claim that the differences have a mean less than 0, which seems to be silly anyway to say presidents tend to be taller than their opponents. I don't think there's any sort of relationship there, never. So let's talk about a kind of interesting example. Data was collected from the number of hospital admissions for motor vehicle crashes on Friday the 13th of a month and Friday the 6th. At a 0.05 significance level, test the claim, there's our hypothesis keyword, claim that when the 13th day of a month falls on a Friday, the number of hospital admissions for motor vehicle crashes are not affected. And we're defining the mean differences, group 2 minus group 1. So group 1 will be my Friday the 6th and group 2 will be my Friday the 13th. And then I have this list of all the different hospital admissions for motor vehicle crashes, 9, 6, 11, 11, 3, and 5. So your hypotheses will be what? Well the claim is that number of hospital admissions are not affected. If that's the case, if the number of hospital admissions are not affected, that means the difference is going to be 0. Difference of 0 means no effect. That's actually the null hypothesis. Alright and then the alternative will be the exact opposite, not equal to 0. So what we have to do now is use Google Sheets. So let's go to Google Sheets and let's clear out our data that's in column A and B. Remember we're on the two variable stats tab. So starting in cell A2, type in group 1's data values. Make sure you click enter after each entry, not the down button. Give the Google Sheets spreadsheets some time to calculate. While it's calculating it's a good time to discuss what type of test is this, what type of hypothesis is it left-tailed, right-tailed, or two-tailed. Because the alternative hypothesis uses not equal to, we're focused on the fact that it's a two-tailed test, so 0.0422 and the test statistic is 2.71. If you are not getting these values in your spreadsheet you may want to consider saving a new copy of your spreadsheet. Just to refresh it. All right, so what do we have? We have a test statistic as we discussed of 2.71 and then we had a p-value of 0.0422 or 0.0422. Remember we're comparing that to alpha, we're comparing that to 0.05. Our p-value is definitely less than alpha in this case. With the p-values lost in alpha, we do have the ability to reject the null hypothesis. So null hypothesis, rejected. Take that rejected stamp you have and just put it right over the null. So basically we rejected our claim, there is evidence to reject our claim here. So once again we've literally just typed in our data values into the Google Sheets spreadsheet and then we noted that this is a two-tailed test because they used not equal to in the alternative hypothesis. So that gave us our test statistic, gave us our p-value. We noted that we had to reject the null hypothesis. Which means that there is sufficient evidence to warrant rejection of the claim that when the 13th day of a month falls on a Friday, the number of hospital emissions from motor vehicle crashes are not effective. So does that mean they are? I don't know, maybe we should do some additional data collection. Maybe some of our folks that work in the hospitals could give us some more information on that. Just some food for thought. Anyway, that's all I have for now. Thanks for watching.