- Let's go through an example.
We set up a hypothesis test where the null hypothesis is
the mean is three.
The alternate hypothesis, the mean is less than three.
So it's a lower-tailed test.
From a long history of ride times,
you know that the variance is 0.05 minutes.
If the mean ride time really is 2.8 minutes,
but you don't know this.
A lot of these Type II error problems
are set up to be sort of hypothetical.
What's the probability of a Type II error,
also known as beta,
if a sample consists of n equals five rides?
Well, let's take a look at this graphically.
Remember, our null hypothesis is the mean equals three
and our alternate hypothesis is
that the mean is less than three.
Now we're just supposing, we're making the assumption,
that the true mean really is 2.8
and what we're trying to find is beta
if n, the sample size, is equal to five.
The first thing we need to do is
we need to find this critical average on the X axis.
This is x-bar.
We need to calculate a critical x-bar
below which we would accept the alternate hypothesis
and above which we would reject the alternate hypothesis.
The critical value is where we put alpha
and we're going to use 0.05 here.
And we want to calculate the critical sample average
below which we would accept the alternate hypothesis,
above which we would reject the alternate hypothesis.
So we're going to take 0.05 and put it
into that tail to calculate x-bar-c.
So let's go ahead and solve this in Excel.
We can either use the NORM.INV function
or we can use this formula here where we standardize.
We use the percentage points z-alpha
of the standard normal distribution.
I'm going to go ahead and use the NORM.INV function.
We're going to put alpha into the left tail.
This would be different if you were doing a right-tail test.
The mean, we're basing this off of our null hypothesis
which has a mean of three.
The standard deviation is sigma divided
by the square root of n.
And therefore our critical x-bar here is about 2.836.
What this means is
if we got a sample average of less than 2.836,
we would accept the alternate hypothesis.
If we got an x-bar greater than 2.836
we would reject the alternate hypothesis.
Now, if the alternate hypothesis really is true,
H1 is true, is the true distribution,
and if we get a sample average to the right,
or greater than, x-bar-c, we have made an error.
H1, the alternate hypothesis, really is true,
but we're on the right side of x-bar-c.
We have rejected the alternate hypothesis
and we have failed to reject the null hypothesis.
And this region here is known as beta.
Beta is the probability that x-bar is greater
than our critical value based upon the null hypothesis.
But we're going to be basing that
on our alternate hypothesis distribution,
and the mean of that is 2.8.
So this is how we can calculate beta.
Beta is this dashed green region here.
So let's go ahead and do this in Excel.
Since this is an upper-tailed probability,
x-bar greater than x-bar-c,
I have to do 1 minus.
Now I'm going to use the NORM.DIST function in Excel.
We're going to use our x-bar-critical.
Our mean, we're basing this on the alternate hypothesis,
that's mu_1,
The mean shifts but the standard deviation stays the same.
So sigma divided by square root of n.
And this is cumulative
because we want the area underneath the curve.
And when I press enter, we get about 0.36.
That means, graphically,
this green hashed area is about 0.36
which means that the probability
of making this Type II error is about 36%.
Now, you can imagine you want to minimize
the probability that you'll make this Type II error.
So you want to minimize beta.
In order to make beta smaller
we can increase the shift in mean,
the assumed shift in mean.
But we can also make these distributions narrower.
And that's related to the power of the test
which you'll be exploring in the next screencast.