(pleasant music)
- Hello, I am professor Rick Jerz,
and I welcome you back to my week seven
reinforcement session of business analytics.
What I would like to do in this session
is solve a variety of test of hypothesis problems,
some for one-sample tests,
and some for two-sample tests.
Some of these will be a little bit more difficult.
Practicing these test of hypothesis problem scenarios
will help you appreciate the technique,
and make you more comfortable applying
these techniques in your own workplace.
Let's get started.
My objectives for this session are to review
a few administrative items,
to review test of hypothesis theory,
to do some one-sample tests of hypothesis problems
this is chapter 10, and to do some two-sample tests
of hypothesis problems chapters 11 and 12.
I would also like to say a few words
about our next session.
I just have a few administrative notes.
We are now past the mid-point of the semester.
We have finished taking exam one,
and your current course grade is showing in Moodle.
I really don't have any other administrative items for you.
Relative to our topics we are finishing up
our analyses for sample data.
Our current topic is test of hypothesis.
We have seen how somebody makes a claim
about a situation without data.
We collect data, analyze it,
and find a confidence interval,
and we judge whether the claim is
within our confidence interval.
We can quickly do this by comparing
the p-value to our level of significance.
Let's take a moment and go back
to a problem that we saw last week.
Warren County Telephone Company
claims in its annual report
that the typical customer spends
$60 per month on local and long-distance service.
A sample of 12 subscribers revealed
the following amounts spent last month
and we're shown the data.
Develop a 90% confidence interval
for the population mean, we did this last week,
but now this question C becomes a little bit
more relevant to us because this is test of hypothesis.
Is the claim that a typical customer
spends $60 a month reasonable?
Justify your answer.
For this problem we will use the t-distribution
because we do not know anything about
the population standard deviation or variance.
I put the data into my descriptive statistics model
and then reference the sample size,
mean, and the standard deviation of the
sample in the t-distribution model.
I enter the 90% confidence interval,
and the model tells us to reject the null hypothesis
that this claim is not reasonable.
We can see this in several ways.
One way is by comparing the p-value
to the level of significance.
Since the p-value is less than our
level of significance we reject the null.
We can also scroll down to the figure
to see our confidence interval shown in red
and the claim point as a black line.
The claim point is clearly outside our confidence interval
and that's why we reject the null.
The way that I would interpret our result
is to say that we are willing to be wrong
10% of the time by challenging the null.
The p-value shows that we would
only be wrong 4.4% of the time.
So this 4.4% is well within our tolerance of being wrong.
Now, you have to recognize that my approach
is not the same as what the author prescribes.
On my Reinforcement Activities webpage
I have included a graphic
that shows you the author's steps
of how to do this test.
It involves calculating the intermediate
z-statistic or t-statistic and we don't have
any need to do it this way.
I do want to mention to you that in the
16th edition of the Lind book
shows a six step process.
I think our author has gone from
five steps to six steps to make
test of hypothesis more understandable
for students who have to use
the tables in the back of the book.
These steps are Lind's approach.
I am giving you a graphic from another author
who also tries to compare the t
z-statistic approach to the p-value approach.
Somehow this graphic doesn't seem
to make it seem any easier to me.
From these authors they have convinced me
that test of hypothesis is difficult.
I think that you will see that using
my Excel models, with a little practice,
test of hypothesis will be relatively simple.
I mentioned in my lecture video
that this p-value approach is tougher to calculate,
but once again, the author provides
a couple paragraphs that say if you have
sophisticated software the p-value approach
provides more insight.
In the example that we just did
the level of significance is at 10
and the p-value is 4.4.
The 4.4 is far from the 10.
So we can confidently reject the null.
Had the p-value been, oh let's say,
9.8 we would still reject the null,
but not as confidently.
Authors and statisticians do struggle
describing what a p-value is.
On this link I show you a variety
of these p-value descriptions.
You can read some of these on your own.
I hope you can appreciate my definition
which is the last one on this list.
The p-value is how often you would be wrong
when you challenge the claim,
meaning challenge the null hypothesis.
The smaller the p-value the less often you will be wrong.
Now, let's do a couple problems.
Kellogg's has a process for filling boxes
of Frosted Flakes cereal with 18 ounces
of product when it is operating properly.
Too much product in the box is wasteful to Kellogg's,
whereas too little product can lead to customer complaints.
To determine if the filling process
is performing as it should,
a random sample of 40 boxes was examined,
and the average weight of a box
was found to be 18.06 ounces.
Historically, the filling process has
a standard deviation of .25 ounces.
Follow the six steps for conducting
a two-tail hypothesis test
to determine if the filling process
is working properly using a
level of significance of 5%.
I encourage you to pause this video
and try to solve this problem on your own,
before seeing how I solve this problem.
In this problem the claim is being made
by the filling process which is 18 ounces.
This is the null hypothesis.
We are provided the historical standard deviation
so this is the long term standard deviation.
And this then tells us that we
should use the z-distribution.
Although we are told that this is a two-tail test
we could conclude this by reading the question.
Is the process still equal to 18 or not equal to 18 ounces?
I go to the normal distribution model
and enter the sample size of 40,
the sample mean of 18.06,
the standard deviation of .25,
and the confidence interval of .95
which makes the level of significance be .05.
For the null hypothesis I enter 18
and this is an equal to test,
and the model says that we should not reject the null.
This means that we are not confident
that the process is not working as it should be.
I can see this graphically by changing
the plot which condition to F and scrolling down.
If I were to reject the null
I would be wrong 12.9% of the time,
and I only want to be wrong 5% of the time,
so this is why I do not reject the null.
Let's do another problem.
The Institute for College Access and Success
reported that the average student debt
incurred by 2008 graduates of
four-year colleges was $23,200.
Suppose a sample of 45 students
who graduated from college in 2010 was selected,
and it was found that their debt averaged $24,500.
Using alpha of 10% and a population
standard deviation of $7,500,
perform a hypothesis test to determine
if the average student debt changed from 2008 to 2010.
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
In this problem it's the
Institute for College Access and Success
that is making the claim that the
average student debt is $23,200,
so this is the null hypothesis.
And it seems to me to be a equal to test
because we're trying to determine if it has changed.
This means not equal to.
We are provided the population standard deviation,
so this tells us to use the normal distribution model.
I go back to my normal probability distribution model.
I enter the sample size of 45 students,
the mean from the sample of $24,500,
the standard deviation of $7,500,
the confidence interval is 90%,
this makes the level of significance be 10%.
Down below this is an equal to test,
and the null hypothesis is equal to $23,200.
When I enter this into the model,
the model tells me that we do not reject the null.
This means that we do not have enough evidence
from the sample to not believe the statement
from the College Access and Success Institute.
I can scroll down and see the graphic.
The p-value of 24.5 tells me that
if I did reject the claim I would be
wrong about 25% of the time,
and I only want to be wrong 10% of the time.
This is why I do not reject the claim.
Let's do another problem.
An unnamed statistics textbook author
was overheard by his wife saying
that he spends one hour each weekend
doing household chores.
The author's wife having her doubts about this
and knowledgeable in hypothesis testing
as a result of her proofreading his chapters,
secretly recorded the number of minutes
he spent doing his chores over
11 randomly selected weekends.
The results are as follows
Does the author's wife have enough evidence
to challenge his claim using an alpha of 5%?
In this problem the claim being made
by the author is that he spends
60 minutes doing household chores.
Does this sample suggest that we should reject his claim?
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
I like this problem because it more realistically
shows how sometimes you have to collect sample data
and people will not be giving you
the mean and standard deviation.
We are not being told anything about the
population standard deviation so in this problem
we are going to use the t-distribution model.
To do this problem I first enter the data
into my descriptive statistics model,
and then in my t-distribution model
I will reference the sample size, mean,
and standard deviation from the sample.
I enter a confidence interval of 95%
which makes the level of significance be 5%.
This is an equal to test because
this is what the author is stating.
I do not detect anything about a less than
or greater than claim being made.
The claim point is 60 minutes.
The model does all the calculations,
and in this case we do reject the null.
Meaning that the sample suggests that
the author is not spending 60 minutes
each weekend doing household chores.
Again, we could scroll down, look at the graphic,
and see where this claim point falls.
Since the claim point is in the white region
of the graph we reject the null.
The calculated p-value is 2.85
and this suggests that we would only
be wrong 2.85% of the time,
and we're willing to be wrong 5% of the time.
This is why we can reject the null.
Let's do another problem.
In 2010, the average driving distance
of PGA golfers was 284 yards.
Suppose I designed a new golf ball
that I claim will increase the distance
more than 290 yards.
To test my new invention,
I randomly selected 15 pro golfers
to hit a drive with the ball.
The distances in yards for each drive are as follows.
Test my claim using a alpha of 10%.
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
Like our last problem there is no indication
that we have the standard deviation for the population.
So this suggests that we use our t-distribution model.
And, once again, we are being provided the sample data.
It is kind of nice that this problem
follows our previous problem.
Because I have already referenced the sample size,
the sample mean, and the sample standard deviation
in our t-distribution model all that I need
to do is enter the sample data
into our descriptive statistics model.
I can enter a 90% confidence interval,
making the level of significance be 10%,
and the claim is 290 yards.
The only challenge for us is deciding
what kind of test is this.
Is it an equal to, less than or greater than kind of claim?
The person who designed the ball seems to be
making a claim based upon the sample
that the sample will indicate that
the ball travels more than 290 yards.
But the sample is always taking a perspective
of the alternative hypothesis.
So in this case the person making the claim
is the alternative hypothesis,
which is a greater than 290.
Therefore, the null hypothesis is that it is
less than or equal to.
Remember the equal to part of the claim
always goes to the null hypothesis.
Yes, this is a little bit challenging
in this problem to figure out the null hypothesis.
When I put this claim into the model,
we see that the model says that we cannot
reject the null hypothesis.
This means that the data from the sample
does not confidently show that the
ball travels more than 290 yards.
One interesting thing about this problem
is that if the claim was that it was just
better than average, meaning better than
the 284 yards, we would reject the null
that it is less than or equal 284.
Meaning that this new ball does improve
the driving distance.
You can scroll down and notice on the chart
that this green region is in the white area,
and the p-value is about 1.34.
The data suggests that we would only be wrong
by rejecting the null, 1.34% of the time,
and we are willing to be wrong 10%.
This is why we can confidently reject the null.
Let's do another problem.
A national grocer's magazine reports
the typical shopper spends eight minutes
in line waiting to check out.
A sample of 24 shoppers at the local Farmer Jack's
showed a mean of 7.5 minutes
with a standard deviation of 3.2 minutes.
Is the waiting time at the local Farmer Jack's
less than that reported in the national magazine?
Use the 5% level of significance.
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
Again, we will use the t-distribution model
because we are not being told anything
about the population standard deviation.
Since we are wondering whether the sample data
shows that the waiting time is less than
that reported by the national magazine,
we are going to make the null hypothesis
be a greater than or equal to condition,
with the claim point being eight minutes.
I enter the sample size, sample mean,
sample standard deviation,
and a 95% confidence interval into the model,
which makes the level of significance be 5%.
I change the null hypothesis to a G
and I enter the claim point of eight minutes.
The model shows that we do not reject the claim.
What this means is that the sample
has not sufficiently convinced us
that the mean waiting time is less than eight minutes.
Okay, let's now do some two-sample
test of hypothesis problems from chapters 11 and 12.
Let's do this problem.
Major League Baseball officials, and many fans,
have been concerned about the lengths
of games recently, particularly playoff games.
Suppose the officials would like to test
a hypothesis that the mean length
of a playoff game is longer than
the mean length of a regular season game.
A random sample of 30 playoff games
over the past 10 years had an
average length of 189.3 minutes.
A random sample of 32 regular season games
over the past 10 years had an
average length of 175.8 minutes.
Assume the standard deviations of the playoff
and regular season games are
25 and 21 minutes respectively.
Using the 2% level of significance
can we conclude that playoff games are longer,
on average, than regular season games?
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
For this problem we will use my two-sample model.
Since for this problem we are not provided
the raw data we will move over to this part
of my model where we enter the summary statistics.
I go ahead and enter the data as provided
making sure to enter the population
standard deviation for each.
Down below I answer these questions.
Are we using raw data?
No.
Do we know the population standard deviation?
In this case we do so I enter a yes.
We then have to decide what to enter
as the null hypothesis test condition.
This doesn't seem to be an equal to kind of question,
but we still have to decide whether we enter a G or an L.
I think the officials are the ones
exploring this problem wondering if
the time for playoffs is greater than
that of regular season.
If this is the case then the null hypothesis
is that the playoffs are less than
or equal to the regular season games.
When I put an L in here I can verify
this null hypothesis by looking over here to the left.
This looks pretty good.
The other thing that you might want to look at
is the graph of these two conditions.
The graphic shows that the playoffs
are greater than regular season games.
But we want to know whether or not
this is just the result of this particular sample
or can we confidently say that they are?
I move down to the next step of the model
and I can apply this test.
I enter the 2% level of significance
and I see that we reject the null.
By rejecting the null that the playoffs
are less than or equal to the regular season games.
We are saying that the playoff games seem to be greater.
This is what the sample data is suggesting.
Okay, let's do another problem.
My wife and I have an ongoing discussion
about the quickest route to take
traveling the 80 miles from our home
in Wilmington, Delaware to Avalon, New Jersey,
where we like to visit for weekends during the summer.
Deb prefers a more scenic, back-road route,
with lots of annoying turns.
My favorite course is on a major road
where I get to drive 75 miles per hour.
The traveling time has been recorded
for a random sample of trips for each route
and is shown below.
Deb has gone as far as accusing me of foul play
by driving slower when we take her route.
I'm counting on you to help me win this argument.
Assume the population variances
for travel time on each route are equal.
Perform a hypothesis test to prove
my claim that my route takes less travel time
than Deb's using a level of significance of 5%.
I encourage you to pause this video
and try to solve this problem on your own
before seeing how I solve this problem.
I like this problem because we are provided raw data.
I believe that this is the more
common scenario that you will run into.
I have entered Deb's and Bob's data
into my raw data area of my two-sample model.
It doesn't matter which data set you enter
to the left or right but we will be able
to explore this later on when we examine
the null and alternative hypotheses.
One important point about these two-sample tests
is that you do not need the same sample sizes
for these two data sets.
They could be different as they are in this case.
I move to this area of the model
where I have to start answering questions.
Are we using raw data?
Yes, we are.
Do we know the population variances?
In this case we do not.
We are going to calculate variances
from the data sets, so I set this to no.
Now comes the hardest part,
we have to decide who is the null hypothesis
and what are they claiming?
The way that I see this is that Bob
is the one making the fuss about all of this
and wanting to use this data to prove his point.
Since he is the one wanting to use the data
he takes the position of the alternative hypothesis,
and his claim is that his route
takes less time than Deb's.
So the alternative hypothesis is that
Bob is less than Deb.
The null hypothesis is always the opposite
of this and the null hypothesis
also includes the equal to part of the claim.
So the null hypothesis is that Deb's route
is less than or equal to Bob's.
The model currently has an L
entered for the null hypothesis.
When I look at this alternative hypothesis
it looks correct.
It does say that Deb is greater than Bob,
but that also implies that Bob is less than Deb.
So I don't need to change the L to a G.
Had I entered Bob's data on the left
in the raw data area, and Deb's to the right,
I might have had to use a G to get this
null hypothesis properly stated.
At this point I always find it
interesting to look at the graph
showing the comparison of these two data sets.
It does appear that Bob's route does take less time,
but might this just be the result of this particular sample?
Can we statistically say that we are confident
that Bob's route really does take less than Deb's?
This is what we are exploring.
In step four of the model we see
that we cannot perform this test,
because we do not know the population variances.
We move on to step five.
Step five allows us to test the variances.
This is important to know before
we move on to step six.
We can use the same level of significance,
5%, and we see that the variances are equal.
Therefore, we can move down to 6a.
Recall that in the problem the author stated
that we should treat the variances as equal.
This is because like most authors,
they don't want to teach you how to
test the variances until the next chapter.
My Excel model does this in proper order.
We test the variances first before we can test the means.
6a performs our two-sample test
assuming equal variances.
I enter the 5% level of significance
and the model says do not reject the null.
What this means is that Bob's alternative hypothesis
that his route takes less time is not
substantiated by the data.
You might also notice that the p-value
is large.
Had we rejected the null we would have
been wrong 14.8% of the time,
but we only wanted to be wrong 5% of the time.
This is why we do not reject the null.
You have to be careful interpreting
the null hypothesis in this case.
You might want to conclude that
Deb's route takes more time than Bob's,
but this is not the case.
Remember the null hypothesis includes
the equal to, so it could be that Deb's route
takes the same amount of time as Bob's.
I think with a little bit of practice,
you will see how my model for these two-sample tests
really simplifies the logic and the mathematics.
I'm about out of time so I will let you
do this last problem on your own.
If you have any difficulties with it
make sure to let me know.
I want to also mention that I have provided
the answers to all of these problems
on this reinforcement web page.
Next week we switch our focus
to a different data scenario,
where we still have two sets of data
but we are wondering if one set,
it might be driven by the other set,
this is called correlation and linear regression analysis.
Thanks for spending some of your time with me.
I hope you have enjoyed what I have shared with you.
If you ever have any questions,
or need my help, please let me know.
(pleasant music)