Current time:0:00Total duration:6:34

0 energy points

# One-tailed and two-tailed tests

Sal continues his discussion of the effect of a drug to one-tailed and two-tailed hypothesis tests. Created by Sal Khan.

Video transcript

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 a 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.