Business Statistics II STAT202: Single Sample Hypothesis Testing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

Business Statistics II

STAT202
SINGLE SAMPLE HYPOTHESIS TESTING
Hypothesis Testing
Why do we use hypothesis testing?
How do we generate a hypothesis?
What is the process for hypothesis testing?
 Some terminology

What happens if we make an error?


 Some terminology

What values can be used in statistical hypothesis testing?


Are we testing for general difference or directional difference?
Why do we use hypothesis testing?
In business, we oftentimes need to update processes, change procedures, introduce
new products, evaluate a past decision’s performance, etc.
Changes cost money, take up time, increase disruption, can change public
perception, etc.
In these cases we need to justify making changes or decide whether or not to
continue with recently made changes
 Did it increase profit?
 Did it decrease cost?
 Did it decrease time needed?
 Did it increase number of purchases?
 Did it lead to higher quality?
Why do we use hypothesis testing?
Consider for example:
 A company that produces aluminum cans has a current supplier. A new supplier has entered
the market. Their quality control team wants to know if they should switch to the new
supplier.
 What are the potential implications here? When would I choose to do this?
 A customer service call center wants to change their procedure for handling complaints that
decreases the time needed to resolve complaints. They have been testing a new procedure in
a small group of calls. Should the adopt the new procedure?
 What are the potential implications here? When would I choose to do this?
 A company that produces cell phone cases recently implemented a new manufacturing
process in an attempt to decrease the number of defective items. Is it working?
 Why would I want to know if it is working? What should I do if it isn’t?
How do we generate a hypothesis?
In order to answer these kinds of questions, we need a formal process that is
objective and can be tested
To do this, we generate something called a hypothesis: a formal statement of a
specific assumption

To do this, we need to know:


 Something we can objectively measure that is relevant
 A benchmark to compare a new instance of this measure to
 How we want the “new measure” to compare to the benchmark (simply be different? Be
larger? Be smaller?)
How do we generate a hypothesis?
A company that produces aluminum cans has a current supplier. A new supplier
has entered the market. Their quality control team wants to know if they should
switch to the new supplier.
What can I objectively measure here that is relevant?
What will I use as a benchmark?
How do we generate a hypothesis?
A customer service call center wants to change their procedure for handling
complaints that decreases the time needed to resolve complaints. They have
been testing a new procedure in a small group of calls. Should the adopt the
new procedure?
What can I objectively measure here that is relevant?
What can I use as a benchmark?
How do we generate a hypothesis?
A company that produces cell phone cases recently implemented a new
manufacturing process in an attempt to decrease the number of defective items.
Is it working?
What can I objectively measure here that is relevant?
What will I use as a benchmark?
What is the process for hypothesis
testing?
State the hypothesis to be tested
Specify a decision rule (the level of inconsistency in the data that will lead to a
rejection of the hypothesis)
Collect data and calculate necessary statistics to test the hypothesis
Make a decision (reject or not reject)
Take action based on this decision
Stating the hypothesis
What we did with the examples lays out our thought process
We still need to formalize the hypothesis in very precise terms
We will generate 2 statements:
 Null hypothesis (H0)
 Alternative hypothesis (H1)

Null Hypothesis: known as the maintained hypothesis or status quo, is a


statement of the case in which we take no action
Alternative Hypothesis: known as the action alternative – if we find evidence of
this to be true, we may take action to change our situation
Stating the Hypothesis
Why do we state in this way?
The null hypothesis is what is currently believed or the status quo.
What we are asking is, do I have evidence that justifies changing this?
 We phrase this as: do I reject or not reject the null hypothesis?

The alternative hypothesis is what we believe could be the case or could be the
result of a change in process/procedure
What we are asking is, does the evidence collected make the alternative
hypothesis more likely than the null hypothesis?
 Rejecting the null hypothesis means that I have found evidence of this
 Not rejecting the null hypothesis means that we haven’t found sufficient evidence of the
alternative hypothesis
Some Non-business examples
In a criminal trial, we assume defendants are innocent until proven guilty. We
only take action if sufficient evidence has been found that the defendant is
guilty. This means:
 H0=The defendant is innocent
 H1=The defendant is guilty

Olympic athletes are routinely tested for performance-enhancing drugs. We


assume that they have complied with the rule to NOT take them. We only take
action if we have found that they have NOT complied with the rule.
 H0=No banned substance was used by the athlete
 H1=The athlete has used a banned substance
Stating the Hypothesis
A company that produces aluminum cans has a current supplier. A new supplier has entered the
market. Their quality control team wants to know if they should switch to the new supplier.
 What is H0?
 What is H1?

A customer service call center wants to change their procedure for handling complaints that
decreases the time needed to resolve complaints. They have been testing a new procedure in a
small group of calls. Should the adopt the new procedure?
 What is H0?
 What is H1?

A company that produces cell phone cases recently implemented a new manufacturing process in
an attempt to decrease the number of defective items. Is it working?
 What is H0?
 What is H1?
Specifying the decision rule
Before testing, we need to determine HOW the evidence will be used to
determine if the null hypothesis is rejected or not
How does this apply to our non-business examples?
To execute this statistically, we will use something called a critical value that will
define a rejection region
 We will get into exactly what these are as we execute the statistical tests

What does this mean for our other examples?


Data collection
For purposes of this class, we will generally assume that data collection has
already occurred
It is an important step in practice
What would we have to collect and how might we collect it our examples?
Make the decision
The decision is made using the results of the statistical test we conduct
We state the hypothesis, collect the data, determine the decision rule
Then, we run a test to generate a value that the decision rule can be applied to
 This test will differ based on what objective measure we are using
 We will get into specifics of the testing portion when we get to execution

We compare the test result to the decision rule and either
 Reject the null hypothesis
 Do not reject the null hypothesis
Take action based on decision
If we reject the null hypothesis, we have decided there is enough evidence to
justify the alternative hypothesis
 What should we do based on this in our examples?

If we do not reject the null hypothesis, we have not found sufficient evidence
for the alternative hypothesis
 What should we do based on this in our examples?
What happens if I am wrong?
We are limited in the data we can collect, the time we can spend, the money we
can spend
 We cannot collect enough information to be 100% positive

Occasionally, we will be wrong in our decision to reject/not reject


There are two ways I can be wrong
 I can reject the null hypothesis when I should not have
 I can fail to reject the null hypothesis when I should have

How often you make either of these mistakes is based on the critical value
(threshold) you specify in your decision rule
What happens if I am wrong?

Type I error is considered a false positive


Type II error is considered a false negative
In a criminal trial, what is threshold for finding a defendant guilty?
What would be a Type I error in a criminal trial?
What would be a Type II error in a criminal trial?
Issues with making an error
We will sometimes make errors
We can determine the likelihood (probability) that we make a specific kind of
error
 This is determined by how we set the decision rule and critical value

Generally, as we make one error less likely, the other gets more likely
We need to determine consequences of errors to determine which type is more
detrimental

What type of error is worse in a criminal trial?


Errors in Hypothesis Testing
We refer to the probability of making a Type I error as a (alpha)
We refer to the probability of making a Type II error as β (beta)
(1-β) is then the probability of correctly rejecting the null hypothesis – referred
to as power
(1-a) is then the probability of correctly NOT rejecting the null hypothesis
Errors in Hypothesis Testing
We obviously want a and β to be small
We can decrease a by increasing our threshold/critical value
 Higher thresholds make it more difficult to reject the null hypothesis – decreases false positive
 Consequently may make it more likely we get a false negative

We can decrease β by increasing the sample size


 Higher sample sizes make it more likely that we find an effect – decreases false negative
 Consequently may make it more likely we get a false positive

Since increasing sample size means we decrease an error with more information,
all else equal, we prefer a test with a lower β
What exactly are we testing?
Everything we have discussed with hypotheses so far has been verbal
To perform a statistical test, we need to state the hypotheses in quantitative
terms
To do this, we need to:
 Specify values (related to the objective measures)
 State directionality in a way that is mutually exclusive and collectively exhaustive
What exactly are we testing?
Specifying values
 Means (start today, finish next class)
 Proportions (cover this next class)

Directionality of H1 compared to H0
 Not equal to versus equal to
 Greater than versus less than or equal to
 Less than versus greater than or equal to

Any sign that contains “equal to” goes in H0 (the null hypothesis)

You might also like