how does it work so I'm going to kind of get a little more into the calculations a little bit okay so one of one of the first things we need to figure out is the test statistic we're using a t-test statistic I did this is called a t-test because we're using the t-distribution the in general a one population t-test think of it as the sample minus the population divided by the standard error so we're basically using the same formula for standard error that we used for confidence intervals but now what we're seeing is how many standard errors is my sample mean this x bar right here eleven point eight nine eight how far is that from the population mean in the null hypothesis so really it's a comparison of eleven point eight nine eight and eleven how far apart are those I know I get always get stat students that think they can look at it and say I know I know those are close you don't really know you don't want to really go with your gut on that I don't know how close these are that's why I need to calculate the test statistic I know how far apart they are in terms of dollars but I don't know is how many standard errors apart or if they're significantly different okay so again that's where we want to make this calculation so the formula for it I have on the board of yours is the sample mean x-bar minus mu that's the population mean and then we divide by the standard error the standard error is s standard deviation divided by the square root of N and this remember was an standard error estimation formula so it's the trying to estimate what we think the standard deviation of the sampling distribution would look like and again that is actually the same formula we were using for one population mean confidence intervals in our last unit all right so we're just plugging in numbers now so I'm going to do eleven point eight nine eight minus eleven and then I'm going to divide by the standard deviation six point zero four three divided by the square root of three twenty-four and if you do that little halation you get two point six seven five approximately so I rounded it but around two point six seven five okay it is positive now remember the the t-test statistic in some ways works a lot like the Z test statistic that we looked at for proportions it's counting how many standard errors is the sample from the population parameter so in our case here if you look at it the number of standard errors that the sample mean is above or below the population mean against the Z if the T score is positive the T test statistic is positive the sample mean was above the population mean and if the T test statistic was negative the sample mean was below the population mean we can see right here visually this sample mean is above eleven right so we should get a positive T test statistic if this was lower than eleven then we would gotten a negative T test statistic so if I can one of them key things is whenever you calculate something you want to really be in the habit of being able to explain it to people right so what is this T test statistic telling me the sample mean $11 0.898 is two point six seven five not dollars two point six seven five standard errors higher than the population mean eleven dollars okay so remember that the Z and T test statistics measure the number of standard errors they don't measure percentages they don't measure dollars they don't rent measure kilograms they always measure number of standard errors and that's what makes them a standardizing measure of significance okay now I went ahead and go ahead and went with a five percent significance level if you guys remember that's the the significance level we used most of the time now remember this was a two-tailed test okay so with a five percent significance level so that's going to come into play when we try to figure out what the critical values are now like I say a lot of computer programs these numbers would just be given to you like a chart a lot of times in static Kaito or other programs like stat Kaito you get it you get all these numbers in a chart but I liked I'll I really like stat Keith's theoretical distribution calculator because it shows me visually one thing where these numbers are coming from okay and I'm I went ahead and put these numbers into stack key in the theoretical distribution calculator t remember stat key is found on lock 5s comm it's a really great program for sort of introducing some of these ideas and statistics alright so again we had a 5 percent significance level but it's broken up into 2 tails 2 tails so I'm going to need to break up the 5 percent into two tails well that would mean I have hit need 2.5 percent in each tail so the percentage in the tail this would be a T curve with a degrees of freedom of 323 so this again is a T curve this is a T curve T distribution with a degrees of freedom 323 now when I put those numbers in again I put in point zero to five in the tails and think that was the default when I first pulled up and the T distribution with this degrees of freedom and it gave me the two critical values now if you have a right tailed test you'll have one critical value on the right and if you have a left tailed test you'll have one critical value on the left this one has two critical values because there's two tails a lot of times when you get a program and they give you critical values if you see those two different critical values that usually goes with you're dealing with a two-tailed test alright so basically the right tail starts at positive one point nine six seven so any test statistic that's above one point nine six seven is going to be considered significant also the left test critical value was negative one point nine six seven so any test statistic below negative one point nine six seven would be considered significant as well now I always like to kind of think about the numbers right here's zero in the middle right here's one and negative one here's two and negative two here's like negative fours out here and maybe positive four is out here somewhere so where is our test statistic our test statistic was two point 675 positive you don't have to do this but I'm always a big whenever I'm dealing with things that could be negative or positive and that's really important I usually make a little positive sign next to the number just to make remind myself that this was a positive test statistic so where's positive two point six seven five two point six seven five is in the right tail remember in a two-tailed test your test statistic is not going to fall in both tails but it falls in either of the two tails it's significant that falls in the middle then it's not significant okay so this t-test statistic is falling in the tail determined by one of the critical values and we learned that that means that the sample data significantly disagrees with the null hypothesis but it also tells me that the sample mean right because that was the representative statistic of the sample data significantly disagrees with the population mean 11 remember how some of you were thinking these two look close they're not close they're actually significantly different this sample mean eleven point eight nine eight is significantly bigger than eleven especially for this sample size okay now so we got that we know it's a significant disagreement with the null hypothesis now what about the p-value traditionally a p-value would be calculated based on the test statistic so the probability in the tail of the T curve corresponding to the test statistic itself so if we were doing a you know traditional t-test our test statistic was two point six seven five so if I put that number in this bottom again I went to theoretical distributions calculator the same t calculator in stat key and then put in degrees of freedom 3:23 so in same curve and it just instead of having these critical value numbers I just put in the test statistic now I just put it in the right tail because it is a positive T test statistic the left tail automatically adjusted so when I did that when I put the test statistic in the bottom box of stat key the computer gave me this number point zero zero three nine that's the percentage in the tail and also because I'm dealing with a two-tailed test it also calculated the same point zero zero three nine on the left tail now if you're dealing with a right tailed test the p-value would just be the right tail point zero zero three nine but because this is a two-tailed test I have to incorporate both of them so the total p-value would be point zero zero three nine plus point zero zero three nine or point zero zero seven eight that's my p-value point zero zero seven eight remember that's a percentage that we want to compare to the five percent so I'd like to turn it back into a percentage you multiply that point zero zero seven eight by a hundred we get point seven eight percent so the question is is that lower or higher than five percent well it's not even one percent right we're at point seven eight percent so we're lower than one percent also point zero zero seven eight is definitely lower than point zero five right if I wrote the five percent significance level a lot of times you'd see it as alpha equals 0.05 right that's kind of how you'd see it in scientific articles and things and point zero zero seven eight is definitely lower than point zero five so we have a low p-value we have a low p-value all right it's lower than the significance level so since it's lower than the significance level that means that if the null was true this sample data is unlikely to just be the result of sampling variability or random chance so it's not this this sample data isn't disagreeing or is a very unlikely to be disagreeing with the null hypothesis just because all random samples disagree a little bit this is disagreeing because this null hypothesis is probably wrong that's kind of how you want to think about it if a low p-value means it's unlikely to be sampling variability and that allows us to think okay well then this null hypothesis is probably wrong so that's why we say when the p-value is less than the significance level we say reject the null hypothesis all right that was our rule that we learned in previous videos okay so we've got a low p-value and we're rejecting the hypothesis so what would be the final conclusion well in conclusions we have to deal with evidence and claim okay a low p-value from sample data that meets the requirements of assumptions would be considered some evidence so if I am assuming that this met all the assumptions I am going to have some kind of evidence also the claim was actually the null hypothesis that's kind of rare actually it's usually that usually the claim is the alternative but in this problem the claim was the null so when I rejected the null haven't I