Claire Corlett

Fish Food, Fish Tanks, and More
One-tailed and two-tailed tests | Inferential statistics | Probability and Statistics | Khan Academy

One-tailed and two-tailed tests | Inferential statistics | Probability and Statistics | Khan Academy

In the last video, our
null hypothesis was the drug had no effect. And our alternative hypothesis
was that the drug just has an effect. We didn’t say whether the drug
would lower the response time or raise the response time. We just said the drug had an
effect, that the mean when you have the drug will not
be the same thing as the population mean. And then the null hypothesis
says no, your mean with the drug’s going to be the same
thing as the population mean, it has no effect. In this situation where we’re
really just testing to see if it had an effect, whether an
extreme positive effect, or an extreme negative effect,
would have both been considered an effect. We did something called a
two-tailed test. This is called eight two-tailed test.
Because frankly, a super high response time, if you had a
response time that was more than 3 standard deviations,
that would’ve also made us likely to reject the
null hypothesis. So we were dealing with
kind of both tails. You could have done a similar
type of hypothesis test with the same experiment where you
only had a one-tailed test. And the way we could have done
that is we still could have had the null hypothesis be that
the drug has no effect. Or that the mean with the drug–
the mean, and maybe I could say the mean with the
drug– is still going to be 1.2 seconds, our mean
response time. Now if we wanted to do a
one-tailed test, but for some reason we already had maybe a
view that this drug would lower response times, then our
alternative hypothesis– and just so you get familiar with
different types of notation, some books or teachers will
write the alternative hypothesis as H1, sometimes
they write it as H alternative, either
one is fine. If you want to do one-tailed
test, you could say that the drug lowers response time. Or that the mean with the drug
is less than 1.2 seconds. Now if you do a one-tailed test
like this, what we’re thinking about is, what we want
to look at is, all right, we have our sampling
distribution. Actually, I can just use the
drawing that I had up here. You had your sampling
distribution of the sample mean. We know what the mean of that
was, it’s 1.2 seconds, same as the population mean. We were able to estimate its
standard deviation using our sample standard deviation, and
that was reasonable because it had a sample size of greater
than 30, so we can still kind of deal with a normal
distribution for the sampling distribution. And using that we saw that the
result, the sample mean that we got, the 1.05 seconds,
is 3 standard deviations below the mean. So if we look at it– let me
just re-draw it with our new hypothesis test. So this is
the sampling distribution. It has a mean right over
here at 1.2 seconds. And the result we got
was 3 standard deviations below the mean. 1, 2, 3 standard deviations
below the mean. That was what our 1.05
seconds were. So when you set it up like this
where you’re not just saying that the drug has an
effect– in that case, and that was the last view, you’d
look at both tails. But here we’re saying we only
care is does the drug lower our response time? And just like we did before, you
say OK, let’s say the drug doesn’t lower our
response time. If the drug doesn’t lower our
response time, what was the probability or what is the
probability of getting a lowering this extreme
or more extreme? So here it will only be one
of the tails that we could consider when we set our
alternative hypothesis like that, that we think it lowers. So if our null hypothesis is
true, the probability of getting a result more extreme
than 1.05 seconds, now we are only considering this tail
right over here. Let me just put it this way. More extreme than 1.05 seconds,
or let me say, lower. Because in the last video we
cared about more extreme because even a really high
result would have said, OK, the mean’s definitely
not 1.2 seconds. But in this case we care about
means that are lower. So now we care about the
probability of a result lower than 1.05 seconds. That’s the same thing as
sampling– of getting a sample from the sampling distribution
that’s more than 3 standard deviations below the mean. And in this case, we’re only
going to consider the area in this one tail. So this right here would be a
one-tailed test where we only care about one direction
below the mean. If you look at the one-tailed
test– this area over here– we saw last time that both of
these areas combined are 0.3%. But if you’re only considering
one of these areas, if you’re only considering this one over
here it’s going to be half of that, because the normal
distribution is symmetric. So it’s going to the 0.13%. So this one right here is going
to be 0.15%, or if you express it as a decimal, this
is going to be 0.0015. So once again, if you set up
your hypotheses like this, you would have said, if your null
hypothesis is correct, there would have only been a 0.15%
chance of getting a result lower than the result we got. So that would be very unlikely,
so we will reject the null hypothesis and go
with the alternative. And in this situation
your P-value is going to be the 0.0015.

48 comments on “One-tailed and two-tailed tests | Inferential statistics | Probability and Statistics | Khan Academy

  1. Love it. Love you.

    You are passing me in Differential Equations, Stats, AND helping me for my actuarial exam. I can not thank you enough. What a great thing you are doing.

  2. Really nice, one of the best videos I found so far, however if the drug is going to lower the response it means that the response will take longer. In your example you say that the response will be lower and will be less than 1.2 seconds which should be more than 1.2 seconds!

  3. @ jessica, actually, lowering response time means that the response time will be shorter, not longer. So, lowering the response time means that the drug will cause the response time to be shorter.

  4. I thought in a one tailed test you would look at the 3% percentile of the lower tail, not 1.5% AND disregard the other extreme. Were as in the two tailed test you are looking at both ends equally, that is 1.5% percentile on both extremes.

  5. thanks for helping me with my homework! You really help me understand what's going on rather than just memorizing equations. And it's awesome that i can pause you and make you repeat things over and over! ha ha

  6. i have to ask, for test of independency (chi-square test) with df=1 do we have to mention wether it is one tailed or two tailed? what is the logic of having one tailed chi square or two tailed chi square test when the chi square pdf of df=1 is asymmetrical??. i am doing an assignment where i have to mention wether im doing one-tailed or two tailed test statistic

  7. Holy crap. You don't realize how over-complicated my textbook made this whole concept. And yet in 15 minutes, I now completely understand. This is easy. 🙂

  8. is two-tailed, and one-tailed just another way of saying "one sided confidence interval" and "two sided confidence interval" or are those completely separate things?

  9. two tailed test is appropriate because we are checking if the means are different, i.e., higher or lower does not matter

    Null must go because p is low, therefore, the means are significantly different
    t statistic is above t-critical, therefore reject null which means that the means are significantly different

  10. Hey i have a simple question:

    So if the question says "what are the chances it will be lower than the population mean" you would do a 1-tailed test?

    While if the question said "what are the chances it will stray from the population mean" you would do a 2-tailed test?

  11. mr khan, what settings do you have your pen on? is it a tablet? if so, what kind? i just got one and i like how your lines

  12. Is 1.2 the sample mean? it looks like the population mean from the question, and formula used seems to be (pop mean – sample mean)/sd?

  13. dear sir,I think for the two tailed test significant level should be alpha/2 for each tail which is .003/2 for each tail….plz right me if im wrong.
    for one tailed test significant level is alpha which is .003
    other than I think your explaination couldnt be better than that.

  14. Thank You Khan Academy for these helpful videos. 

    Age: 34
    Major: MBA
    Class: QNT 561 (Statistics and Research) 

    I understood your teaching style, and taking this one step at a time.

  15. Lost me. Why doesn't H1 state < 1.05? You have it as <1.2 and then spend you time talking about <1.05. So confusing!

  16. I wish you lessons were numbered so someone 1st that lands on a video like this could easily find the prior video. Also you all blue thumb nails are also unhelpful.

  17. I have a test-stat of 2.303164609, df 8, alpha .05. Doing a two tailed test (in excel) I got p-values of .05022 (>.05000), and for a one tailed test I got .02511 (<.05000). Am I interpreting my results correctly that in the 2-tailed test we keep the null but in the one tailed we reject it? Does the critical point change when you go from a 2 to a 1 tailed test?

  18. But then you could also have made the H1 hypothesis as it was greater than the mu+0.15=1.35 (since mu-1.05=0.15) and then get the same p-value right? As the normal distribution is symmetric and the right tail has the same probabilty as the left tail you just calculated. Which would be clearly a bad result and you would accept the H1 hypothesis then as well and conclude that it lowers the response rate. Am I right?

  19. I know this video is from 5 years ago, but I am desperate to know how to compute the p-value without a TI-84. I have excel, two calculator apps.. where did 0.15%, or 0.0015 come from??? Perhaps I should try to find the first might explain it there.

  20. this example is very relevant because I'd guess that a lot of us are currently addy'd out. Or I should say I am 95% confident that a lot of us are addy'd out

  21. just looked at the statistics of this video being watched and saw that how lazy people pile up over and over just before their exams lol.

  22. sir I have a problem of stats but I am not getting how to solve problem is

    two batches of animals each are given test of inoculation , one batch was inoculated and the other was not the numbers of dead and surviving animals are given in the following table for both cases can the inoculation be regarded as effective against the decease at 5℅ level of significance

    dead. survival. total
    inoculated. 2. 10. 12
    non inoculated. 8. 4. 12
    total. 10. 14. 24

    can please anyone solve this for me

  23. This is the first Khan video I've ever struggled with. If the null hypothesis is that the drug has no effect on the mean response time of 1.2 seconds, why are we focused on the probability of getting a response time of 1.05 seconds or lower? I don't understand how we can reject the null hypothesis based on the knowledge that there's a .15% chance of getting < 1.05 seconds. It still doesn't tell us if the drug has any effect at all.

  24. There's some crucial part of reasoning missing in this video. What would happen if I set my alternative hypothesis H1 as Drug raises response time : mu>1.2 s. Why the very same reasoning would fail?

Leave a Reply

Your email address will not be published. Required fields are marked *