(uplifting music)
- Hello, I am Professor Rick Jerz,
and I welcome you to this session titled,
Test of Hypothesis.
Maybe this session should have been called
Test Your Will To Finish The Course,
because this topic is often
one of the most challenging to understand.
Sometimes, some students think
that it's completely different
and brand new topic.
However, I hope to show you that this topic
actually builds upon some of what we have learned
in our previous sessions on sampling.
It illustrates yet another way
of looking at data and making decisions.
My approach to teaching this topic
is a little different than many instructors.
Additionally, I believe that my Excel model
will illustrate this topic more clearly,
and of course, make doing the calculations easier.
So I encourage you to stick with me
as I try to explain the concepts,
the language, and how to solve problems.
Let's get started.
Our goals for this session are to understand
what is meant by a hypothesis and hypothesis testing,
to describe the test and the hypothesis testing procedure,
to distinguish between a one-tailed
and two-tailed test of hypothesis,
to conduct a test of hypothesis about a population mean,
to describe type I and type II errors,
to define p-values,
and to understand why we do this.
One of the major problems with this particular topic
is the language that statisticians use.
Hypothesis, test of hypothesis,
null hypothesis, alternative hypothesis,
level of significance, p-values,
reject or not reject,
type I and type II errors.
I believe that it is this new language
that makes this topic seem scary.
It makes it seem like we're in
a whole new world of statistics.
I think one of the best ways to learn about this topic
is to look at a textbook example.
The mean length of a small counterbalance bar
is 43 millimeters,
and the production supervisor's concerned
that the adjustments of the machine
producing the bars has changed.
He asks the engineering department to investigate.
Although this seems like a relatively simple question,
it is important to dissect these questions
to see what is really happening
and what is really being asked.
A company has been asked to produce
these 43 millimeter counterbalance bars.
It could be your own company or it could be a supplier.
There was probably an engineering drawing
that specified this 43 millimeter length
for these counterbalance bars.
The company sets up a process,
oh, maybe in this case, a saw,
to produce these bars.
And it successfully does so.
We might think of the process
or the company making a statement
that I am supplying bars at 43 millimeters.
In other words, the entire population of bars
that this company is supplying is at 43 millimeters.
But sometimes, we wonder if this is still happening.
And in this case, there have been some adjustments
to the equipment that raise some doubt or a flag.
Are these bars still being produced at 43 millimeters?
How should engineering investigate this?
This is a good time for me to say a few words
about this new language.
A hypothesis is a statement
about the value of a population parameter
developed for the purpose of testing.
Examples of hypotheses
made about a population parameter
are the mean monthly income
for systems analysts is $3,625.
20% of all customers at Bovine's Chop House
return for another meal within a month.
In our problem, they hypothesis or statement is,
the process or company thinks
the bar length is 43 millimeters.
So what might we do?
We can believe this claim
and go on with life,
or spend our time and energy elsewhere.
Alternatively, we might want to verify the claim
by taking a sample
and seeing what the sample data suggests.
One important thing to recognize here
is that certainty is only known
if we have the entire population of data.
But neither the claim nor the sample
have the entire population.
Therefore, we have some uncertainty.
Here is how we can say this in statistical language.
The claim is called the hypothesis.
Recognize that the claim
does not have supporting evidence,
meaning none or null of data,
and is therefore called the null hypothesis.
The alternative, based upon sample data,
is referred to as the alternative hypothesis.
We could use some symbology to represent this,
H sub zero represents the null hypothesis.
Note that maybe the zero corresponds to none.
H one represents the alternative hypothesis.
Maybe this one might represent some data.
H sub zero and H sub one are mutually exclusive,
meaning only one or the other can be true,
and collectively exhausted.
Meaning that there are no other alternatives to consider.
The null hypothesis, H sub zero,
is always presumed to be true.
The alternative hypothesis, H one,
meaning you, the statistician,
has the burden of proof
that the data suggests something different.
I can represent the null
and alternative hypotheses graphically.
Here is the null hypothesis.
A claim that the population mean is at some point.
Here is the alternative hypothesis.
We have collected data,
calculated the mean and standard deviation,
and maybe in this case,
represent the 95% confidence interval.
This confidence interval,
we learned about in our previous session.
What we can say, from this confidence interval,
is that we are 95% confident
that the population mean
is between the beginning point and ending point
of this area in red.
However, there is a 5% probability
that maybe this population mean
is outside of this region.
This, we've learned, is sample error.
We still have to decide what are we going to do?
The answer is, let's perform a test.
Let's compare the sample data with the claim point.
If the claim point is similar
to the claim of the sample data,
you do nothing.
If the claim point is way off
from what the sample data suggests,
you speak up and say,
hey, I think your claim might not be true.
However, the better way to say this is that,
the data does not support the claim that you are making.
I can illustrate this graphically.
Here is chart showing our collected sample data,
and let's say, a 95% confidence interval.
As long as the claim point
is somewhere in this confidence interval.
For example, it might be here, or here, or here.
We cannot reject the claim.
However, if the claim point is not in this red region,
like maybe over here, or over here,
we would say your claim is not supported by the data.
Therefore, I reject your claim.
This is another good point
to review some more statistical language.
The test that we are performing
is called the test of hypothesis.
We have already named the red region.
We call this the confidence interval.
But what should we call this white region?
Statisticians call this the level of significance,
and they represent it with the symbol, alpha.
Recognize that alpha is equal to
one minus the confidence interval.
In other words, it is the not red region.
For example, a 90% confidence interval
produces a 10% level of significance.
This level of significance also represents
the risk that the sample data might be wrong.
Do you want to be wrong 10%, 5%, or 1% of the time?
There is no single alpha for all tests.
In general, the more risk associated
with the business decision,
a smaller alpha is used, and vice versa.
In many business situations,
an alpha of 5%, meaning a 95% confidence interval,
is typically used.
When we say we are going to reject the claim,
we mean that we are rejecting the null hypothesis.
When we do not reject the claim,
this means that we do not reject the null.
We never accept the claim
because accepting implies certainty.
We are only certain when we have the entire population.
Statisticians also like to describe
the errors that might be made
in this test of hypothesis process.
The errors are identified as type I and type II errors.
And here's a chart how these errors are typically portrayed.
I will explain this to you.
Let's pretend that the null hypothesis,
meaning the claim, is actually true.
That we really do have population data
and the claim is true.
If the data, from our sample,
also does not reject this claim,
we are making a correct decision.
Then, let's assume that the null hypothesis is really false.
If our sample also rejects this null hypothesis,
we again, are making a correct decision.
But there are two situations that can occur
where our sample data leads us to an incorrect decision,
meaning an error.
The first is when the null hypothesis is really true
but the sample suggests that the null is false,
so we incorrectly reject the null.
The other situation, a type II error,
occurs when the null hypothesis is really false,
but the sample suggests that it's true,
so we do not reject the null.
I know that this gets confusing,
but let me see if I can explain this
with an interesting example,
our legal system.
Some of you might remember a court case
involving a very famous football player, O.J. Simpson.
One day, his ex-wife, Nicole Brown Simpson,
was found dead.
And O.J. was accused of killing her.
So, our legal system kicked in and O.J. went to court.
O.J. had hired some of the best attorneys to defend him
and this court case took over eight months.
In the end, O.J. was found not guilty.
It is interesting to view our legal process
as a test of hypothesis.
The null hypothesis, in terms of our legal system,
is that the defendant is not guilty.
The jury's role is to collect data
to see whether or not the data
suggests that this claim is true
or that the claim is false.
These juries typically do not think statistically,
so they do not have a level of significance
of 5% or 10%.
But the court system says, beyond reasonable doubt.
And in this case, if O.J. was found to have killed Nicole,
maybe he would've been sentenced to death.
So the consequence is pretty severe,
so I bet the jury was working
on a level of significance of,
oh, something small, like 1%.
Meaning they would only want to be wrong 1% of the time.
Let's see how this situation would map out
to our type I, type II error graphic depiction.
You have to appreciate that neither the legal system
nor the jury have all the data.
There are only two possible people
who had the absolute facts,
meaning population data.
One was Nicole, and well,
her problem is that she couldn't say anything.
She was dead.
The other person was O.J.
O.J. really knew
whether or not he did absolutely kill Nicole, or he didn't.
But he was not going to say.
But let's assume that he really, really didn't kill Nicole.
And after the jury looks at all of their data,
they conclude that they do not reject the claim
that O.J. is not guilty.
A correct decision has been made.
But now, let's assume that O.J. really is guilty
and the jury does reject the claim
that O.J. is innocent,
a correct decision is also being made.
The two errors that can occur, in the legal system,
is when O.J. is absolutely not guilty
but the jury's data suggests that he is.
We are sending an innocent person to jail.
The other error is when O.J. really is guilty
but the jury's data suggests that he is not.
The court system has just let a guilty person go free.
You have to appreciate that the court system
found O.J. not guilty.
They didn't find him innocent.
Only O.J. would ever know if he really was innocent.
Well, many people who are watching this case,
felt that O.J. was guilty.
Well, O.J.'s high-powered attorneys
did a pretty good job confusing the sample data,
which caused the jury to have some doubt
and find O.J. not guilty.
Well, let's get back to test of hypothesis.
So far, in my example,
I have been using a equal to hypothesis,
that counter bar length is equal to 43 millimeters.
And the alternative hypothesis
is that it is not equal to 43.
I do want to mention to you
that there are two other hypothesis statements
that could be claimed.
One is that the mean
is greater than or equal to some value
and the other is that it is less than
or equal to some other value.
When the null hypothesis is an equal to claim,
the area of rejection,
meaning the level of significance,
or in our case, the white area,
is distributed to both sides of the normal curve.
This is described as a two-tailed test.
When the null hypothesis is a less than or equal to
or greater than or equal to kinda claim,
the area of rejection gets pushed
to either the left or right side of the normal curve,
and this is referred to as a one-tailed test.
One-tailed tests are typically harder to solve,
but don't worry, my Excel model will help us along.
I need to explain one more concept to you,
that of a p-value.
The p-value is the calculated probability of you,
meaning the data, being wrong.
I think you will better understand this p-value concept
if I show it to you graphically.
Here again, is my example of our sample data,
with, let's say, a 95% confidence interval.
Given a 95% confidence interval,
the level of significance is 5%,
and this is represented by the white area under our curve.
The claim point is represented by this black line,
and if the black line is anywhere outside of the red area,
we would reject the null hypothesis.
We only do not reject the null
when this claim point is in the red area.
You might notice that as this black line
moves further and further away
from the mean of the sample,
in this white, or rejection area,
we get more and more confident
about rejecting the null.
The p-value is calculated from the data
and it represents the area
to the right of this black line.
The further the claim point is from the sample mean,
the smaller the p-value.
I hope that you can see that small p-values,
such as .01, or .005 are good.
There is a slight change that you,
meaning the data, can be wrong.
Here is the p-value interpretation.
I am willing to be wrong
by rejecting the null hypothesis only 5% of the time,
meaning a 5% level of significance.
Assume that the p-value calculates to be 1%,
meaning that I would be wrong
by rejecting the null hypothesis only 1% of the time.
Since the p-value is less than our level of significance,
we reject the null hypothesis.
If, for example, the p-value calculates
to be greater than our level of significance,
such as 22%,
we would be wrong by rejecting the null 22% of the time.
But we only want to be wrong 5% of the time,
so we do not reject the null.
Here is another way of interpreting the p-value.
A 10% p-value suggests that we have some evidence
that the null hypothesis is not true.
A 5% p-value suggests that we have strong evidence
that the null hypothesis is not true.
A 1% p-value says that we have very strong evidence
that the null hypothesis is not true,
and a p-value if .001 says we have extremely strong evidence
that the null hypothesis is not true.
Remember that a small p-value only suggests
that you won't be wrong.
Randomness of samples can still make you wrong.
Well, I have to tell you that this p-value approach
is not the most common way
of approaching this test of hypothesis topic.
This is because it is very difficult
to calculate a p-value.
But our author makes this following statement
in our textbook.
"In recent years,
"spurred by the availability of computer software,
"additional information is often reported
"on the strength of the rejection or acceptance.
"This approach reports the probability of getting a value
"of a test statistic at least as extreme
"as the value actually obtained.
"This process compares the probability,
"called the p-value,
"with the significance level.
"If the p-value is smaller than the significance level,
"the null hypothesis is rejected.
"If it is larger than the significance level,
"the null hypothesis is not rejected."
Well, it seems like in order to use this p-value approach,
we have to have some sophisticated computer software.
Do we have this kinda software?
Well, yep, we do.
We have Microsoft Excel.
And therefore, we will be able
to take this p-value approach,
which is a better approach.
The author suggests this five-step approach
to hypothesis testing.
In the 16th edition of our textbook,
this has been expanded to six steps.
This traditional approach calculates a Z or t-statistic,
and then compares this to the table statistics
to make a decision.
As you might guess, we are not going to use
this approach or any tables.
We are going to use Microsoft Excel.
Our approach is to understand what is being claimed,
to decide how much risk you want to take
to challenge the claim,
meaning the level of significance, or alpha.
We then collect a sample of data.
Using our Excel model,
either the normal or t-distribution,
we calculate the p-value.
If the p-value is less than your level of risk,
you can challenge the claim,
meaning, reject the null.
Okay, let's see if we could apply this approach
to the example that we have been using.
Remember that the null hypothesis is 43 millimeters.
Engineering selects a random sample of 12 bars
and measures each.
The results are reported in millimeters, shown below.
Is it reasonable to conclude
that there has been a change in the mean length of bars?
Use the 2% significance level.
One thing that we must always be careful of
is interpreting the question being asked.
In this case, we're being asked if there has been a change,
meaning that it is no longer equal to the 43 millimeters.
So this is a two-tailed test.
We also have to decide which distribution to use.
It's the same as before.
Do you know the population standard deviation?
Use the normal distribution.
If you do not know the population standard deviation,
meaning you have only sample data,
use the t-distribution.
This is our situation.
We are not being given any information
about the population variance.
All we have is our sample data.
So we will use the t-distribution.
In my next session,
I will show you how to use my Excel model
for this test of hypothesis.
So for now, I will just show you some of its results.
I am in my t-distribution model,
and I've entered the sample size,
sample mean, and sample standard deviation.
In order to get a 2% level of significance,
I enter a 98% confidence interval.
This is a equal to test,
and the claim point is 43.
The p-value calculates to be 1.412.
And since this is less than our level of significance,
we reject the null.
My model also provides a graph
showing the confidence interval
and you might detect a little black line,
all the way to the right, in the white region.
This black line is the null hypothesis claim
of 43 millimeters.
Since this black line is in the white region,
we reject the null.
So, what I would say,
is that the changes to this process
have caused the mean to not be equal to 43 millimeters.
I am willing to make this statement
and be wrong 2% of the time.
I would only be wrong 1.4% of the time,
which is why I make this statement
and reject the null.
I think that you can see that with my Excel models,
we can do these tests of hypotheses tests very quickly.
(uplifting music)
Thanks for taking time to spend some moments with me.
I hope that you have enjoyed what I have shared with you.
If you ever have any questions or need my help,
please let me know.
(uplifting music)