Download File - Good Stuff For Students

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Psychometrics wikipedia, lookup

Foundations of statistics wikipedia, lookup

Omnibus test wikipedia, lookup

Resampling (statistics) wikipedia, lookup

Statistical hypothesis testing wikipedia, lookup

Student's t-test wikipedia, lookup

Misuse of statistics wikipedia, lookup

Transcript
QNT561
Night Three I
Hypothesis Testing
Objectives
Confidence Intervals
Sample Size
One-Sample Hypothesis Tests
Two-Sample Hypothesis Tests
F-Test, ANOVA
Confidence Intervals



The Statistics for Business Text, Chapter Five
into Six are quite excellent, but the concepts are
a bit challenging.
Let’s dive right into Excel and explore how to
get those calculations done, and what they mean!
A Quick YouTube Primer
General Steps in Hypothesis
Testing








1) Get and idea or a hunch—really!
2) Formulate testable hypothesis
3) Design the experiment
4) Set up a decision rule
5) Collect data
6) Make a decision
7) Revise your idea or hunch
8) Do it again!
Five Steps for Testing a
Hypothesis
1) State the null and alternate hypothesis
 2) Select a level of significance
 3) Identify the test statistic
 4) Formulate a decision rule
 5) Take a sample, do the math, arrive at a
decision

Null and Alternate Hypothesis



The Null Hypothesis is the hypothesis of NO CHANGE.
It is the hypothesis you typically wish to reject with your
experiment. (The status quo.)
The Alternate Hypothesis is the hypothesis of change in
some direction—more, less, a difference. This is typically
the hypothesis that you are hoping to not reject.
Always formed in pairs, they are mutually exclusive and
collectively exhaustive statements:
 H0:Null Hypothesis
 H1:Alternate Hypothesis
Can a Hypothesis be Proved?


No---it is not possible to prove a null
hypothesis. We can only fail to reject a null
hypothesis (which means the alternate
hypothesis is not rejected).
Statistics and hypothesis testing cannot prove
anything! Avoid using the word “prove” when
explaining or supporting your findings from
testing.

What can be said if prove is off limits?
Examples of Null and Alternate
Hypothesis

H0: Defendant is Innocent (status quo as all are presumed
innocent until proven guilty…proven?)

H1: Defendant is Guilty


H0: Olympian did not use illegal steroids (status quo)
H1: Olympian did use illegal steroids

H0: Green chile containers have 8.0 ounces of product in each
(no change—containers are designed for 8.0 oz. and the machine set
at 8.0 oz.)

H1: Green chile containers do not have 8.0 ounces of product
in each; OR has more than 8.0 ounces; OR has less than 8.0
ounces
Your Turn



Fred wants to measure the time his crew takes to
submit their end-of-day reports. He thinks his new
crew takes too long. What is the null and alternate
hypothesis?
Sally needs to see if the changes made to her salon
helped increase traffic. What is the null and alternate
hypothesis?
George works for PLM Industries and fills orders that
have between 5-10 items each. He want to see if his fill
times have increased. What is the null and alternate
hypothesis?
Types of Error
(Level of Significance)

Type I Error (α): Rejecting H0 when, in fact, it is
true!

α is alpha in the Greek alphabet (also know as the level of
significance)


A “false positive”
Type II Error (β): Failing to reject H0 when, in
fact, it is false!


β is beta in the Greek alphabet
A “false negative”
Types of Error
(Level of Significance)

Example:

H0: Olympian did not use illegal steroids
(status quo)

H1: Olympian did use illegal steroids
What is the α impact? (False positive)
 What is the β impact? (False negative)


How to reduce α and β risk?

Both can be simultaneously reduced by
increasing the sample size, which is not
always feasible or cost-effective.
Choosing the Level of
Significance



The smaller, the better, but there are
temptations to fiddle with this level to “get the
answer you want.”
Typical levels are 0.01, 0.05, 0.10, but can
assume any value between 0 and 1, but not 0 or
1.
The smaller the level of significance, the more
difficult it will be to reject the null hypothesis.
Statistical Hypothesis Testing

A statistical hypothesis is a statement about
the value of a population parameter (θ)
that we are interested in analyzing.


θ is theta in the Greek alphabet and
represents a population parameter
One-tailed and two-tailed tests
H0 :   0
H0 :   0
H0 :   0
H1 :   0
H1 :   0
H1 :    0
Select the Test Statistic


This is the statistical tool you will use to
“crunch” the data
For this chapter:
z-tests
 Student’s t-test

x 
z
  


 n
z
p 
 1   
n
x 
t
 s 


 n
Formulate the Decision Rule



Different for a one-tail test and a two-tail test
The decision rule is determined from your level
of significance.
With this information, you determine the critical
value:

The dividing point between the region where the
null hypothesis is rejected and the region where it is
not rejected.
Decision Rule, One Tail Test




Select your level of significance. In this case, we will
select 0.05.
Subtract that from 0.50, you get 0.4500 (0.50 is the half
of the normal distribution curve.)
Get the chart titled “Areas under the Normal Curve”
and in the body of the table, find a value that is very
close to 0.4500.
You see that 0.4505 is pretty close. Now find the
numbers in the margins of the table and you get
1.65—I’ll show you this.
One-Tailed Example
Decision Rule, Two Tailed Test





Select your level of significance, in this slide, we will
continue to use 0.05.
Divide that by 2, or take half of 0.05, which is 0.025.
Subtract 0.025 from 0.50 and you get 0.4750.
Get the chart titled “Areas under the Normal Curve”
and in the body of the table, find a value that is very
close to 0.4750.
You see that 0.4750 is listed! Go to the margins, and
you get 1.96 and -1.96---I’ll explain how to do this.
Two-Tailed Example
Combo Slide!
Decision Rule Statement

“At the 0.05 level of significance, we will
reject the null hypothesis if:
 the
computed z value is greater than 1.65.”
(one tail test, right)
 the computed z value is less than -1.65.” (one
tail test, left)
 the computed z value is greater than 1.96 or
less than -1.96.” (two tail test)
Let’s Try One!


PLM Industries manufactures and assembles desks and
other office equipment. The weekly production of the
Model A325 desk at the Fredonia Plant follows a normal
probability distribution with other plants with a
population mean of 200 and a population standard
deviation of 16. Recently, new production methods have
been introduced and new employees hired at the
Fredonia plant. The VP of manufacturing would like to
investigate whether there has been a change in the
weekly production of the A325. Is the mean number of
desks produced at the FredoniaPlant different from 200
at the 0.01 significance level?
This plant averages 203.5 desks per week over 50 weeks.
Step One: State the Null and
Alternate Hypothesis


In English: “There is a significant
difference at the Fredonia Plant in the
manufacturing output of the A325 desk.”
In Statistics:
H0: μ=200
 H1: μ ≠200

Two-tailed Test!
Step Two: Select the Level of
Significance


The problem provided the significance level:
0.01.
What if the problem didn’t provide one? Pick
one! The typical levels are 0.01, 0.05, 0.10, but
you get to decide the level—how small of a
Type I Error risk do you wish to have?
Step Three: Select the Test
Statistic


The test statistic for a mean when the
population standard deviation is known is
the z-test.
We know the population mean and
standard deviation from the problem.

[If the population standard deviation (σ) is
unknown, the Student’s t-test is appropriate.]
Step Four: Formulate the
Decision Rule



The decision rule is formulated by finding
the critical value of z from the table. Since
this is a two-tailed test, take 0.01 and divide
it by 2, and you get 0.005.
Take 0.5000-0.005 and you get 0.4950. Find
this value in the body of the table and you
find 0.4951, close enough!
Take it to the margins, and you have a
critical value of 2.58 and -2.58.
Step Five: Do the Math, Interpret
Your Results




203.5  200
x 
Plug and chug!
z
z
  
 16 
z==========




n


z=1.55
 50 
Is 1.55 greater than 2.58? It is not, therefore:


Fail to reject the null hypothesis.
Interpret the Results:
 There is no significant difference in the
manufacturing output of the A325 desk at the
Fredonia Plant.
Lather, rinse, repeat!


Those are the five steps in a nutshell. Now, let’s
do more of those!
But first…the p-value!
p Value---What is it and Why Do
I Care?

The p-value is the actual significance level. We had
0.01 in the previous problem and we did NOT reject
the null hypothesis. The p-value tells us the actual
risk involved in having a Type I Error.

Take the calculated z value, in this last problem it
was 1.55. Find the area under the curve that
matches 1.55…in this case 0.4394. 0.5000.4394=0.0606 or 6.06%.
p-Value…



The p-value must be smaller than the level of
significance if you rejected the null hypothesis!
Always!
In this case, our significance level was 0.01 and
our p-value was 0.0606; clearly, if we did reject
the null hypothesis, we would have been quite
incorrect!
That is the p-value. (It is calculated differently for z, t, and
F tests, too.)
What if we changed…



…the significance level from 0.01 to 0.15?
Well, that would not be ethical. We select the
significance level BEFORE we conduct the
study…always!
However, I said I would teach you how you can
lie with statistics, and how you are lied to with
statistics, so here we go.
Desk A325 Problem, new level of
significance





μ=200, σ=16
Our plant mean 203.5, sample size 50.
New significance level 0.15 (instead of 0.01)
We will reject the null hypothesis if the
computed z-value is greater than 1.44 or less
than -1.44. (Where did that come from?!?!?!)
Math!
203.5  200
z
 1.55
16
50
“OK…what just happened?”

Our calculated z-value is 1.55, but we need a number
greater than 1.44…and 1.55 is greater than 1.44,
therefore, we reject the null hypothesis!

We can now say that there was a significant change in
the production of the A325 desk at the Fredonia
Plant…we’ve INCREASED weekly production! Let’s
celebrate!!! (Why increased? How do we know that?)

Really? Well, the data says that the production
increased…right? [Oh---that is soooo wrong! Yup, but
who else knows? Thus, one of the lies I’ve been telling
you about!]
Statistical Hypothesis Testing Is
A VERY Powerful Tool!

Just by tweaking the level of significance, what
was originally not a “fact” is now a “fact”.

Knowing how stats works will make you a better
manager, a better consumer of information, and
when you apply sound and ethical statistics to
help you and your company solve problems, you
will demonstrate your abilities as an effective,
ethical, and educated manager.
Statistical Hypothesis Testing
Abuses


Changing the significance level after-the-fact is
not condoned and the demonstration you just
saw was to illustrate how it works---it is not an
endorsement!
Does it happen? Sure it does, but now you
know what to ask and how to spot it. You also
know that changing the level of significance
after-the-fact is unethical.
Another!

{Generic problem} A
sample of 36 observations is
selected from a normal population. The sample
mean is 21 and the population standard
deviation is 5. Conduct the following test of
hypothesis using the 0.05 significance level.
H 0 :   20
H1 :   20
Well, some steps are done!

Step one is….


H1 :   20
Step two is…..


State the null and alternate hypothesis—done.
H 0 :   20
Select a level of significance (0.05)---done.
Step three is….


Select the test statistic—you have to select this:
In this case, a z-test because we know the population
mean and standard deviation. (20 and 5)
Formulate a Decision Rule

One or two tailed test?



Why? Because there is direction!
See the greater than sign?
H :




One!
That’s direction…a right side!
0.05 significance level
.5000-.05=0.4500
Critical value==1.65
0
 20
H1 :   20
Formulate a Decision Rule
 We
will reject the null
hypothesis IF the calculated
z-value is greater than 1.65.
Take a Sample…


Already done for you in this problem.
Math time!
21  20
z
 1.2
5
36

Did we reject the null hypothesis?

1.2 is not greater than 1.65, therefore do not
reject the null hypothesis. There is no
significant increase noted in the sample.
Another!

{Generic problem} A
sample of 64 observations is
selected from a normal population. The
sample mean is 215 and the population
standard deviation is 15. Conduct the
following test of hypothesis using the 0.04
significance level!
H 0 :   220
H1 :   220
Do It Using the Five Steps!





Step One: State the null and alternate
hypothesis
Step Two: Select a level of significance
Step Three: Identify the test statistic
Step Four: Formulate a decision rule
Step Five: Take a sample, arrive at a
decision, INTERPRET THE RESULT!
Answer





One tail test
Critical value: 0.5000-.04=0.4600; therefore, a
critical value of 1.76 or -1.76, depending on the
direction.
Test statistic: z-test—we know σ
We will reject the null hypothesis if the
computer z-value is less than -1.76.
Math!
215  220
z
 2.667
15
64
Interpret the Result



Because -2.667 is less than -1.76, we reject
the null hypothesis and “accept” the
alternate hypothesis.
There is a significant reduction in the
sample…what exactly, we don’t know,
but we know it is significant.
p-value! Well, calculated z is -2.667, table
says 0.4962, 0.5000-0.4962=0.0038, which is
less than the significance level of 0.04.
Student’s t-test


Just like the z-test, but we use this tool when we
don’t know the population standard deviation σ.
Used if the sample is less than 30, too.
x 
t
 sd 


 n
Everything Else…Same (almost)!



The five step process is the same.
What does change is the table we consult
for the critical value and the application of
the degrees of freedom to determine the
c.v. (critical value)
Here we go!
Problem

The McPatrick Insurance Company Claims
Department reports that the mean cost to
process a claim is $60. An industry comparison
showed this amount to be larger than most
other insurance companies, so the company
instituted cost-cutting measures. To evaluate
the effect of the cost-cutting measures, the
supervisor of the department selected a random
sample of 26 claims processed last month.
Problem, continued





n=26 (26 random samples of claims selected)
Sample mean 56.42
Sample standard deviation: 10.04
Significance level 0.01
Null and alternate hypothesis? (The manager wants to
see if the cost-cutting is helping the cost!)

Go!
Let’s work this together!






H0; H1 State these in “English” and in “Geek”
Significance: 0.01
Test statistic: One-tail t-test because we have no σ,
therefore we substitute the sample standard deviation.
Critical value: One tail, degree of freedom (n-1), 26-1=25.
Formulate the decision rule: “We will reject the null
hypothesis if the computed/calculated t-statistic is less
than -2.485.”
Math!
x 
56.42  60
t
s
n
t
10.04
26
 1.818
Interpret the Results



-1.818 is NOT less than -2.485, therefore we do
NOT reject the null hypothesis
The cost-cutting did not yield significant costper-claim savings.
Back to the drawing board, Claims Department
Supervisor…something else may be the cost
culprit.
Again!


The mean length of a counterbalance bar is 43
millimeters. The production supervisor is
concerned that the adjustments of the
machine producing the bars has changed…or
he suspects they have changed. He asks
engineering to investigate. They randomly
pull 12 bars from the population and
measures each.
Raw data to follow…
Data

Problem: Is the machine out of tolerance?






(Has there been a change in the settings?)
Raw Data: 42, 39, 42, 45, 43, 40, 39, 41, 40, 42, 43,
42.
Calculate the sample mean and standard
deviation (using Excel® or your calculator).
State the null and alternate hypothesis---one or
two tailed test?
Use the 0.02 significance level!
Five Step Process….GO!
What do we have?
H 0 :   43
H1 :   43




Significance level 0.02, two-tail test.
Critical value: df=12-1=11, c.v.=+2.718 and 2.718…two-tailed test, right?
Test Statistic: t-test..we have no sigma, small n.
Decision rule: “We will reject the null hypothesis
if the computed/calculated t-value is greater
than 2.718 or less than -2.718.”
Nitty Gritty

Math!
 Sample
mean: 41.5
 Sample standard deviation: 1.784
 Computed t-value: -2.913
x 
t
s
n
41.5  43
t
 2.913
1.784
12
Bottom Line?



Last step: “We reject the null hypothesis—
there is a significance change in the
machine’s adjustments causing the parts
produced to be smaller than specifications
allow.”
Time to get the machine fixed…possibly alert
customers of the issue….recall?
Business decisions are often made based
on…STATISTICAL HYPOTHESIS TESTING!
Test of Hypothesis, One
Proportion
z
p 

 1   
n
Aside from the math, this is handled just
like a regular z-test!
Where:
 p=the
sample
proportion
 π=the population
proportion
 n=sample size
One Proportion Example

A sample of 100 observations
revealed that p=0.75. At the 0.05 significance
level can the null hypothesis be rejected?
{Generic Problem}
H 0 :   0.70
H1 :   0.70
One Proportion Example




Step One: Null and alternate given to us.
Step Two: Level of Significance: given to
us as 0.05, one-tail test.
Step Three: Identify the test statistic---one
proportion z-test.
Step Four: “We will reject the null
hypothesis if the computed z-value is
greater than 1.65.”
One Proportion Example

Math Time!
z

0.75  0.70
0.70 1  0.70 
100
 1.09
Interpret the results: The computed z-value of 1.09 is
NOT greater than the 1.65 critical value, therefore, we
cannot reject the null hypothesis. There is no significant
increase in the sample proportion when compared to the
population proportion.