If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains ***.kastatic.org** and ***.kasandbox.org** are unblocked.

Main content

Current time:0:00Total duration:11:26

a neurologist is testing the effect of a drug on response time by injecting a hundred rats with a unit with a unit dose of the drug subjecting each to neurological stimulus and recording its response time the neurologist knows that the mean response time for rats not injected with the drug is 1.2 seconds the mean of the hundred injected rats response times is 1.0 five seconds with the sample standard deviation of 0.5 seconds do you think that the drug has an effect on response time so to do this we're going to set up two hypotheses this is we're going to say 1 the first hypothesis is we're going to call it the null hypothesis and that is that the drug has no effect on response time and your null hypothesis is always going to be you can view it as a status quo you assume that whatever you're researching has no effect so drug has no effect drug has no effect or another way to think about it is that the mean of the rats taking the drug should be the mean mean with the drug with let me write it this way with the mean is still going to be is still going to be 1.2 seconds even with the drug even with the drug so that's essentially saying it has no effect because we know that if you don't give the drug the mean response time is 1.2 seconds now when you want it's an alternative hypothesis the hypothesis is no I think the drug actually does do something so the alternative hypothesis the alter the alternative hypothesis right over here is that the drug the drug has has an effect or another way to think about it is that the mean the mean does not equal 1.2 seconds when the drug drug is given so how do we think about this how do we know whether we should except whether we should accept the alternative hypothesis or whether we should just default to the null hypothesis because the data isn't convincing and the way we're going to do it in this video and this is really the way it's done in pretty much all of science and you say okay let's assume that the null hypothesis is true if the null hypothesis was true what was the what is the probability that we would have gotten these results with the sample and if that probability is really really small then the null hypothesis probably isn't true we could probably reject the null hypothesis and we'll say well we kind of believe in the alternative hypothesis so let's think about that let's assume let's assume let's assume that the null hypothesis is true and so if we if we assume the null hypothesis true let's try to figure out the probability that we would have actually gotten this result that we would have forgot you gotten a a sample mean of 1.0 five seconds with a standard deviation of 0.5 seconds so I want to I want to see if we assume the null hypothesis is true I want to figure out I want to figure out the probability and actually what we're going to do is not just figure out the probability of this the probability of getting something like this or even more extreme than this so how likely of an event is that and to think about that let's just think about the sampling distribution if we assume if we assume the null hypothesis so the sampling distribution is like this it'll be a normally it'll be a normal distribution we have a good number of samples we have a hundred samples here so this is the sampling distribution it will have a mean and now if we assume the null hypothesis that the drug has no effect the mean of our sampling distribution the mean of our sampling distribution will be the same thing as the mean of the population distribution which would be equal to 1.2 seconds now what is the standard deviation of our sampling distribution the standard deviation of our sampling distribution should be equal to the standard deviation of the population distribution divided by the square root of our sample size so divided by the square root of a we do not know what the standard deviation of the entire population is so what we're going to do is estimate it with our sample standard deviation and that's a reasonable thing to do especially because we have a nice sample size a sample size greater than 100 so this is going to be a pretty good approximator this is going to be a pretty good approximator for this over here so we could say that this is going to be approximately equal to our sample standard deviation divided by the square root of 100 which is going to be equal to our sample standard deviation is 0.5 point 0.5 seconds and we want to divide that by square root of 100 is 10 so 0.5 divided by 10 is 0.05 0.05 so our sample the standard deviation of our sampling distribution is going to be I will put a little hat over it to show that we have approximated it with we approximated the population standard deviation with the sample standard deviation so it is going to be equal to 0.5 divided by 10 so 0.05 and so what is the probability so let's think about this this way what is the probability of getting one point zero five seconds or another way to think about it is how many standard deviations away from this mean is 1.05 seconds and what is the probability of getting a result at least that many standard deviations away from the mean so let's figure out how many standard deviations away from the mean that is and essentially we're just figuring out a z-score a z-score for this for this result right over there so let me pick a nice color I haven't used orange yet so our z-score you can even view it as a Z statistic it's being derived from it's being derived from these other sample statistics so our z sam our z statistic how far are we away from the mean well the mean is 1.2 the mean is 1.2 and we are at 1.05 so I'll put that less just so that'll be a positive distance so that's how far away we are and if we want it in terms of standard deviations we want to divide it by our best estimate of the sampling distributions devious sample sample standard we want to divide it by our best estimate of the sampling distributions standard deviation which is this 0.05 so this is 0.05 and what is this going to be equal to z this result right here 1.05 seconds one point two divided by one point two minus one point O five is 0.15 so this is 0.15 in the numerator divided by 0.05 in the denominator and so this is going to be three so this result right here is three standard deviations away from the mean so let me draw this this is the mean if I did one standard deviation two standard deviations three standard deviations that's in the positive direction actually let me draw it a little bit a little bit different than that this wasn't a nicely drawn bell curve but I'll do one standard deviation two standard deviations and then three standard deviations on in the positive direction and then we have one standard deviation two standard deviations and three standard deviations in the negative direction so this result right here one point oh five seconds that we got for our 100 rat sample is right over here three standard deviations below the mean now what is the probability of getting a result this extreme by chance and when I talk about this extreme it could be either a result less than this or a result or result that extreme in the positive direction more than three standard deviations so I'm this is essentially if we think about the probability of getting a result more extreme than this result right over here we're thinking about this area under the bell curve both in the negative direction or in the positive direction what is the probability of that but we know from the empirical rule that ninety-nine point seven percent of the probability is within three standard deviations so this thing right here you could look it up on a Z table as well but three standard deviations is a nice clean is a nice clean number that doesn't hurt to remember so we know that this area right here I'm doing in this reddish orange that area right over there is nine nine 99.7% so what is left for these two magenta or pink areas well if these are 99.7% then both of these combined are going to be 0.3% so both of these combined are 0.0 0.3 I should write it this way exactly our 0.3% 0.3% 0.3% or if we wrote it as a decimal if we were to decimal would be point zero zero three of the total area under the curve so to answer our question if we if we assume that the drug has no effect the probability of getting a sample this extreme were actually more extreme than this is only 0.3% 0.3% one in less than one and 300 so if the null hypothesis was true there's only one in 300 chance that we would have gotten a result this extreme or more so at least from my point of view this result seems to favor the alternative hypothesis I'm going to reject I am going to reject I am going to reject the null the null hypothesis I don't know 100% sure but if the null hypothesis was true there's only one in 300 chance of getting this so I'm going to go with the alternative hypothesis and just to give you a little bit of a little bit of some of the name or the the labels you might see in some statistics or some in some research papers this value the probability of getting this the probability of getting a result more extreme than this given the null hypothesis given the null hypothesis is called a p-value so the p-value here the p-value just really just stands for probability value the p-value right over here is point zero zero three so there's a very very small probability that we could have gotten this result if the null hypothesis was true so we will reject it and in general most people have some type of a threshold here if you have a p-value less than 5% which means less than 1 in 20 shot they'll say you know what I'm going to reject the null hypothesis there's only less than there's less than a 1 in 20 chance of getting that result here we got much less than 1 in 20 so this is a very strong indicator that the null hypothesis is incorrect and the drug definitely has some effect