Statistics: Statistical Tests

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 42

Part 22 – Statistical Tests:1

Statistics and Data


Analysis

Dr. Welker
Part 22 – Statistical Tests:1

Statistics and Data Analysis

Part 22 – Statistical
Tests: 1
1/40
Part 22 – Statistical Tests:1

Statistical Testing

 Methodology: The scientific method and


statistical testing
 Classical hypothesis testing
 Setting up the test
 Test of a hypothesis about a mean
 Other kinds of statistical tests
 Mechanics of hypothesis testing
 A sampler of testing applications
 Statistical methodologies

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
2/40
Part 22 – Statistical Tests:1

Disagreeing with Aristotle –


A Revolution in Thought
About 1600 A.D., it became apparent to several people - Galileo Galilei in Italy,
Francis Bacon in England, Tycho Brahe in Denmark, and others - that there
were no subtle logical errors in Aristotle's use of the deductive method. The
problem was that the deductive method, while wildly successful in mathematics,
did not fit well with scientific investigations of nature.
In order to use the deductive method, you need to start with axioms -
simple true statements about the way the world works. Then you use these
axioms to build your logical system of nature. If your axioms are true, everything
that follows will be true, but Galileo and his contemporaries realized that the
problem was that it was enormously difficult to determine "simple true
statements about the way the world works". In fact, they realized that it should
be the goal of science - not the starting place - to determine what the "simple
Francis Bacon, true statements about the way the world works" really are!
ca. 1600 Since 1600, the inductive method has been incredibly successful in
investigating nature - surely far more successful than its originators could have
imagined. The inductive method of investigation has become so entrenched in
science that it is often referred to as the scientific method.
http://www.batesville.k12.in.us/Physics/PhyNet/AboutScience/Inductive.html

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
3/40
Part 22 – Statistical Tests:1

Classical Hypothesis Testing

 The scientific method applied to statistical hypothesis testing


 Hypothesis: The world works according to my hypothesis
 Testing or supporting the hypothesis
 Data gathering
 Rejection of the hypothesis if the data are inconsistent with it
 Retention and exposure to further investigation if the data are
consistent with the hypothesis
 Failure to reject is not equivalent to acceptance.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
4/40
Part 22 – Statistical Tests:1

http://query.nytimes.com/gst/fullpage.html?res=9C00E4DF113BF935A3575BC0A9649C8B63
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
5/40
Part 22 – Statistical Tests:1

Methodology

 The standard approach would be to


hypothesize that there is no link and
seek data (evidence) that are (is)
inconsistent with the hypothesis.
 That is the way the NCI usually
carries out an investigation.
 This one was different.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
6/40
Part 22 – Statistical Tests:1

Errors in Testing
Hypothesis is Hypothesis is
True False

I Do Not Reject Correct


the Hypothesis Decision Type II Error

I Reject the Correct


Hypothesis Type I Error
Decision

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
7/40
Part 22 – Statistical Tests:1

A Legal Analogy:
The Null Hypothesis is INNOCENT
Null Hypothesis Alternative Hypothesis
Not Guilty Guilty

Finding: Verdict Type II Error


Not Guilty Correct Decision Guilty defendant goes
free

Type I Error
Finding: Verdict Innocent defendant is Correct Decision
Guilty convicted

The errors are not symmetric. Most thinkers consider Type


I errors to be more serious than Type II in this setting.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
8/40
Part 22 – Statistical Tests:1

(Jerzy) Neyman –
(Karl) Pearson Methodology
 “Statistical” testing
 Methodology
 Formulate the “null” hypothesis
 Decide (in advance) what kinds of
“evidence” (data) will lead to rejection of the
null hypothesis. I.e., define the rejection
region)
 Gather the data
 Carry out the test.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
9/40
Part 22 – Statistical Tests:1

Formulating the Hypothesis


 Stating the hypothesis: A belief about the
“state of nature”
 A parameter takes a particular value
 There is a relationship between variables
 And so on…
 The null vs. the alternative
 By induction: If we wish to find evidence of
something, first assume it is not true.
 Look for evidence that leads to rejection of
the assumed hypothesis.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
10/40
Part 22 – Statistical Tests:1

Terms of Art

 Null Hypothesis: The proposed state


of nature
 Alternative hypothesis: The state of
nature that is believed to prevail if the
null is rejected.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
11/40
Part 22 – Statistical Tests:1

Example: Credit Rule


 Investigation: I believe that Fair Isaacs
relies on home ownership in deciding
whether to “accept” an application.
 Null hypothesis: There is no
relationship
 Alternative hypothesis: They do use
homeownership data.
 What decision rule should I use?

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
12/40
Part 22 – Statistical Tests:1

Some Evidence = Homeowners

5469

5030
1845 To be
pursued
1100
in a later
class...

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
13/40
Part 22 – Statistical Tests:1

The Rejection Region

What is the “rejection region?”


 Data (evidence) that are inconsistent
with my hypothesis
 Evidence is divided into two types:
 Data that are inconsistent with my
hypothesis (the rejection region)
 Everything else

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
14/40
Part 22 – Statistical Tests:1

Application: Breast Cancer On


Long Island
 Null Hypothesis: There is no link between the high
cancer rate on LI and the use of pesticides and toxic
chemicals in dry cleaning, farming, etc.
 Neyman-Pearson Procedure
 Examine the physical and statistical evidence
 If there is convincing covariation, reject the null
hypothesis
 What is the rejection region?
 The NCI study:
 Working hypothesis: There is a link: We will find
the evidence.
 How do you reject this hypothesis?

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
15/40
Part 22 – Statistical Tests:1

Formulating the Testing


Procedure

 Usually: What kind of data will lead


me to reject the hypothesis?

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
16/40
Part 22 – Statistical Tests:1

Hypothesis Testing Strategy


 Formulate the null hypothesis
 Gather the evidence

 Question: If my null hypothesis were


true, how likely is it that I would have
observed this evidence?
 Very unlikely: Reject the hypothesis
 Not unlikely: Do not reject. (Retain the
hypothesis for continued scrutiny.)
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
17/40
Part 22 – Statistical Tests:1

Hypothesis About a Mean


 I believe that the average income of
individuals in a population is $30,000.
 H0 : μ = $30,000 (The null)
 H1: μ ≠ $30,000 (The alternative)
 I will draw the sample and examine the
data.
 The rejection region is data for which the
sample mean is far from $30,000.
 How far is far????? That is the test.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
18/40
Part 22 – Statistical Tests:1

Application
 The mean of a population takes a
specific value:
 Null hypothesis:
H0: μ = $30,000
H1: μ ≠ $30,000
 Test: Sample mean close to
hypothesized population mean?
 Rejection region: Sample means that
are far from $30,000
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
19/40
Part 22 – Statistical Tests:1

Deciding on the
Rejection Region
 If the sample mean is far from $30,000, reject the
hypothesis.
 Choose, the region, for example,

Rejection Rejection

29,500 30,000 30,500

The probability that the mean falls in the rejection region


even though the hypothesis is true (should not be rejected)
is the probability of a type 1 error. Even if the true mean
really is $30,000, the sample mean could fall in the rejection
region.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
20/40
Part 22 – Statistical Tests:1

Reduce the Probability of a Type I Error by


Making the (non)Rejection Region Wider

Reduce the probability of a type I error by moving the


boundaries of the rejection region farther out.

Probability outside
this interval is large.

28,500 29,500 30,000 30,500 31,500

You can make a type I error


Probability outside this
impossible by making the
rejection region very far from the interval is much smaller.
null. Then you would never make
a type I error because you would
never reject H0.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
21/40
Part 22 – Statistical Tests:1

Setting the α Level

 “α” is the probability of a type I error


 Choose the width of the interval by
choosing the desired probability of a
type I error, based on the t or normal
distribution. (How confident do I want
to be?)
 Multiply the z or t value by the
standard error of the mean.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
22/40
Part 22 – Statistical Tests:1

Testing Procedure
 The rejection region will be the range
of values
greater than μ0 + zσ/√N or
less than μ0 - zσ/√N
 Use z = 1.96 for 1 - α = 95%

 Use z = 2.576 for 1 - α = 99%

 Use the t table if small sample and


sampling from a normal distribution.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
23/40
Part 22 – Statistical Tests:1

Deciding on the
Rejection Region
 If the sample mean is far from $30,000, reject
the hypothesis.
 Choose, the region, say,
Rejection Rejection

 
$30,000  1.96 $30,000  1.96
N N
I am 95% certain that I will not commit a type I error (reject the
hypothesis in error). (I cannot be 100% certain.)

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
24/40
Part 22 – Statistical Tests:1

The Testing Procedure (For a Mean)


 
Reject if x > 0  1.96 Reject if x < 0 -1.96
N N
 
or x - 0 > 1.96 or x - 0 < -1.96
N N
x - 0 x - 0
or > 1.96 or < -1.96
/ N / N
or z > 1.96 or z < -1.96

x - 30,000
Reject if  1.96
/ N

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
25/40
Part 22 – Statistical Tests:1

The Test Procedure

 Choosing z = 1.96 makes the


probability of a Type I error 0.05.
 Choosing z = 2.576 would reduce the
probability of a Type I error to 0.01.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
26/40
Part 22 – Statistical Tests:1

What to use for σ?

 The known value if there is one


 The sample estimate if random
sampling.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
27/40
Part 22 – Statistical Tests:1

Application
H0 :  = $30,000
N = 13, 444 (Huge sample. t is the same as normal)
x = $30,144.3 (Is this far from $30,000?)
s = $15035.5
$30114.3 - $30,000
t= = 0.881
$15035.5/ 13,444
The rejection region is |t| > 1.96.
Do not reject the hypothesis.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
28/40
Part 22 – Statistical Tests:1

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
29/40
Part 22 – Statistical Tests:1

If you choose
1-Sample Z…
to use the
normal
distribution,
Minitab
assumes you
know σ and
asks for the
value.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
30/40
Part 22 – Statistical Tests:1

Specify the Hypothesis Test

Minitab assumes 95%.


You can choose some
other value.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
31/40
Part 22 – Statistical Tests:1

The Test Results (Are In)

s
x  1.96
N

  xi  x 
2
 x N N
s i1
Mean  x  , StDev=s= , SE Mean= i1 i
N N 1 N
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
32/40
Part 22 – Statistical Tests:1

An Intuitive Approach
 Using the confidence interval
 The confidence interval gives the range of plausible values.
If this range does not include the null hypothesis, reject the hypothesis.
If the confidence interval contains the hypothesized value, retain the
hypothesis.

Includes $30,000.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
33/40
Part 22 – Statistical Tests:1

The P value

 The “P value” is the probability that


you would have observed the
evidence that you did observe if the
null hypothesis were true.
 If the P value is less than the Type I
error probability (usually 0.05) you
have chosen, you will reject the
hypothesis.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
34/40
Part 22 – Statistical Tests:1

P Value > α. Do Not Reject

α=.05
(The test) 0.025 in each tail

P=.378 t=.88
(The data)
0.189 in each tail

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
35/40
Part 22 – Statistical Tests:1

Insignificant Results

This is 1 – α.

The test results are “significant” if the P value is less than α.


These test results are “insignificant” at the 5% level.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
36/40
Part 22 – Statistical Tests:1

The Power of a
Test Procedure
 Power = The probability it will correctly reject a
false hypothesis.
 A type II error occurs when you fail to reject a
false hypothesis.
 β = probability of a type II error. (Standard notation in
statistics – yes, it does conflict with the standard
notation for regression coefficients.)
 Power = 1 – β
 Power depends on what the true value is
(remember, the null is false, so something else
is true).
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
37/40
Part 22 – Statistical Tests:1

One Sided Hypotheses


 One sided tests can reflect a bias on
the part of the investigator.
 But, business decisions, legal
applications, medical applications
(efficacy of a drug) may dictate that a
one sided test is called for.
 If it is unclear, use a two sided test.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
38/40
Part 22 – Statistical Tests:1

Application:
One sided test of a mean
 Hypothesis: The mean is greater than some
value
 Business application: Does a new machine that
we might buy produce grommets faster than
the one we have now?
 H 0: μ ≤ M
(where M is the mean of the old machine.)
H 1: μ > M
 Rejection region: Mean of a sample of
production rates from the new machine is far
above M.

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
39/40
Part 22 – Statistical Tests:1

Problems with Classical Testing

 All or nothing. When we set α and design


the test, we commit to rejection of H0 even if
the evidence is just over the boundary.
 The method provides no way to use the
results of another study. What if two
otherwise similar studies, but with different
samples contradict each other?
 There is a branch of statistics based on
Bayes Theorem that deals with these
issues.
Marginal Plot of Listing vs IncomePC
Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000
40/40
Part 22 – Statistical Tests:1

Summary

 Methodological issues: Science and


hypothesis tests
 Neyman-Pearson methods:
 Formulating a testing procedure
 Determining the “rejection region”

 Many different kinds of applications

Marginal Plot of Listing vs IncomePC


Pie Chart of Percent vs Type Boxplot of Listing Scatterplot of Listing vs IncomePC Probability Plot of Listing Scatterplot of Listing vs IncomePC Histogram of Listing Empirical CDF of Listing
Normal - 95% CI Normal
Category
Meatball 900000 900000 900000 14

e  mc  
Pepperoni 99 Mean 369687
Garlic 5.0% Mean 369687 100
Mushroom and Onion
9.2%
2.3%
Pepperoni
21.8%
Plain
Mushroom
Sausage
800000 800000
95
StDev
N
156865
51
800000 2 12
StDev
N
156865
51
AD 0.994 80
Pepper and Onion 700000 90 700000
700000 P-Value 0.012
Mushroom and Onion 10
Garlic 80 1000000
600000 600000 60
Frequency

Pepper and Onion

Percent
Meatball 70
600000
Listing

Listing

7.3% 8
Percent

60 800000
500000 500000
Listing

50
40
Sausage 500000 40 6

Listing
5.8% 400000 30 400000 600000
400000 20 20
300000 300000 4
10 400000
300000 200000 5 200000 2 0
Mushroom Plain 200000
16.2% 32.5% 0 00 00 00 00 00 00 00 00 00
200000 100000 100000
1 0 00 00 00 00 00 00 00 00 00
15000 17500 20000 22500 25000 27500 30000 32500 0 200000 400000 600000 800000 1000000 15000 17500 20000 22500 25000 27500 30000 32500 200000 300000 400000 500000 600000 700000 800000 900000 10 20 30 40 50 60 70 80 90 15000 20000 25000 30000
IncomePC Listing IncomePC Listing Listing IncomePC
100000

You might also like