welcome to part three of our four-part miniseries on hypothesis testing in our last video we talked about establishing a standard of evidence which was all about our alpha level determining what we would need to find in our study in order to be convinced that there's a real effect I'll make one additional note that you'll never have to calculate an alpha level it's not something computational it's typically set by standards in your field which in psychology and in most fields your alpha will be 0.05 in this video we're gonna go to our third step here in hypothesis testing which is actually doing the statistics collecting some data calculating your test statistic and so on and I'm gonna go through actually some sample data today as we learn how to do this so starting with a definition a test statistic is a numerical summary of the degree to which a sample is unlike the samples predicted by the null hypothesis so again a jargony definition unfortunately there are a lot of those but let's break it down the null hypothesis states that there's no effect so in this case what is unlike the samples predicted by the null hypothesis let's go back to the neuro iq example the null hypothesis states that neuro iq is totally useless and it won't change your IQ scores at all if that's the case and you do this study where you give people neural IQ for 30 days and you measure their IQ scores what are the samples that are predicted by the null hypothesis well you would expect if knurl IQ is useless to find sample mean IQ scores of maybe a hundred and 593 a hundred a hundred and 199 things close to the population average IQ score of a hundred so a test statistic says okay you got a result how unlike these samples that are predicted by the null hypothesis is that result well if you found an average IQ score of 150 that is very unlike the samples predicted by the null hypothesis so your test statistic is sort of a measure of extremeness it's a measure of your evidence of how extreme your evidence is compared to the sort of assumption that there's no effect so this is your first test statistic this is your first inferential statistic that we're learning about here in this series of videos this is for a one sample z-test a z-test is a test statistic that we're going to calculate that basically assesses whether an observed sample mean is significantly different from a population mean under the null hypothesis so x-bar here is your sample mean that you collected so in our neural IQ example this would be our average IQ score of our 15 people who we gave neuro IQ to for 30 days and the population mean assuming the null is true is basically gonna be 100 it's the average IQ score assuming that neuro IQ is totally useless so it's just gonna be the normal average IQ in the population in our denominator is something a little bit unique its standard error it looks a lot like standard deviation but we have this extra subscript which changes this then into standard error and standard error is the standard deviation of the distribution of means we would get from collecting many many samples of data very wordy kind of complex we're not really worrying about sample distributions or anything like that sampling distributions excuse me in this series of videos lucky for us though standard error is actually very easy to calculate you simply take your standard deviation Sigma of the population and you divide by the square root of your sample size and that's going to be your standard error that you're gonna plug into your denominator so in reality this is a very easy problem to solve and to illustrate let's go back to our neural IQ example I've been talking generally about this but let's actually do a one sample Z test to see if this observed mean of a hundred and 5.9 is significantly different from this population mean IQ score of 100 so here's our formula for the one sample z-test and you'll see we actually already have everything we need for this formula listed here on this page first of all we have x-bar our sample mean that's gonna be 105 point 9 minus mu our population mean that's gonna be 100 and then in the denominator we're gonna need Sigma and our sample size well here they are there's Sigma it's equal to 15 and our sample size is all also equal to 15 so let's start by getting that standard error done with so again this is going to be 15 over 15 we have our Sigma our standard deviation of the population that goes in the numerator and in the denominator goes the square root of our sample size 15 so 15 over the square excuse-me square root of 15 comes out to 3.8 seven and this is our standard error so this is what's gonna go in the denominator of the overall Z test statistic formula and look we have everything we need again x-bar it's gonna go up here 105 point 9 minus mu it's gonna be over here 100 divided by the standard error three point eight seven now do not make the mistake of accidentally putting standard deviation in the denominator if you do that you're actually calculating what we call an effect size something totally different that we're going to learn about soon so just be sure take your standard deviation divided by the square root of n that's what you put in the denominator of the test statistic so let me show you the work for that this is what we just talked about 105 point 9 minus 100 divided by three point eight seven and that's going to come out to one point five three and that is your Z test statistic and that's all there is to it you collect your data and you calculate whatever test statistic is appropriate for your study which in this case is a Z test statistic in our next video we're going to talk about making the final decision evaluating our hypotheses in light of the evidence we have over here on the right in light of how extreme our test statistic says our observed values are