EPI 809 / Spring 2008 Chapter 9 Nonparametric Statistics.
-
Upload
cameron-shepherd -
Category
Documents
-
view
233 -
download
3
Transcript of EPI 809 / Spring 2008 Chapter 9 Nonparametric Statistics.
EPI 809 / Spring 2008EPI 809 / Spring 2008
Chapter 9Chapter 9
Nonparametric StatisticsNonparametric Statistics
EPI 809 / Spring 2008EPI 809 / Spring 2008
Learning ObjectivesLearning Objectives
1.1. Distinguish Parametric & Distinguish Parametric & Nonparametric Test Procedures Nonparametric Test Procedures
2.2. Explain commonly used Explain commonly used Nonparametric Test ProceduresNonparametric Test Procedures
3.3. Perform Hypothesis Tests Using Perform Hypothesis Tests Using Nonparametric ProceduresNonparametric Procedures
EPI 809 / Spring 2008EPI 809 / Spring 2008
Hypothesis Testing ProceduresHypothesis Testing Procedures
HypothesisTesting
Procedures
NonparametricParametric
Z Test
Kruskal-WallisH-Test
WilcoxonRank Sum
Test
t Test One-WayANOVA
HypothesisTesting
Procedures
NonparametricParametric
Z Test
Kruskal-WallisH-Test
WilcoxonRank Sum
Test
t Test One-WayANOVA
Many More Tests Exist!Many More Tests Exist!
EPI 809 / Spring 2008EPI 809 / Spring 2008
Parametric Test ProceduresParametric Test Procedures
1.1. Involve Population Parameters (Mean)Involve Population Parameters (Mean)
2.2. Have Stringent Assumptions Have Stringent Assumptions
(Normality)(Normality)
3.3. Examples: Z Test, t Test, Examples: Z Test, t Test, 22 Test, Test,
F testF test
EPI 809 / Spring 2008EPI 809 / Spring 2008
Nonparametric Test Nonparametric Test ProceduresProcedures
1.1. Do Not Involve Population Do Not Involve Population ParametersParameters
Example: Probability Distributions, Example: Probability Distributions, IndependenceIndependence
2.2. Data Measured on Any Scale (Data Measured on Any Scale (Ratio Ratio or or Interval, Ordinal or Nominal)Interval, Ordinal or Nominal)
3.3. Example: Wilcoxon Rank Sum TestExample: Wilcoxon Rank Sum Test
EPI 809 / Spring 2008EPI 809 / Spring 2008
Advantages of Advantages of Nonparametric TestsNonparametric Tests
1.1. Used With All ScalesUsed With All Scales
2.2. Easier to ComputeEasier to Compute
3.3. Make Fewer AssumptionsMake Fewer Assumptions
4.4. Need Not Involve Need Not Involve Population ParametersPopulation Parameters
5.5. Results May Be as Exact Results May Be as Exact
as Parametric Proceduresas Parametric Procedures
© 1984-1994 T/Maker Co.
EPI 809 / Spring 2008EPI 809 / Spring 2008
Disadvantages of Disadvantages of Nonparametric TestsNonparametric Tests
1.1. May Waste Information May Waste Information Parametric model more efficient Parametric model more efficient
if data Permitif data Permit
2.2. Difficult to Compute byDifficult to Compute by
hand for Large Sampleshand for Large Samples
3.3. Tables Not Widely AvailableTables Not Widely Available
© 1984-1994 T/Maker Co.
EPI 809 / Spring 2008EPI 809 / Spring 2008
Popular Nonparametric TestsPopular Nonparametric Tests
1.1. Sign Test Sign Test
2.2. Wilcoxon Rank Sum TestWilcoxon Rank Sum Test
3.3. Wilcoxon Signed Rank TestWilcoxon Signed Rank Test
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test Sign Test
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test Sign Test
1.1. Tests One Population Median, Tests One Population Median,
2.2. Corresponds to t-Test for 1 MeanCorresponds to t-Test for 1 Mean
3.3. Assumes Population Is ContinuousAssumes Population Is Continuous
4.4. Small Sample Test Statistic: # Sample Values Small Sample Test Statistic: # Sample Values Above (or Below) MedianAbove (or Below) Median
5. Can Use Normal Approximation If 5. Can Use Normal Approximation If nn 10 10
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test ConceptsSign Test Concepts
Make null hypothesis about true medianMake null hypothesis about true median
Let S = number of values greater than medianLet S = number of values greater than median
Each sampled item is independentEach sampled item is independent
If null hypothesis is true, S should have binomial If null hypothesis is true, S should have binomial distribution with success probability .5distribution with success probability .5
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test ExampleSign Test Example
You’re an analyst for Chef-Boy-R-Dee. You’ve You’re an analyst for Chef-Boy-R-Dee. You’ve asked 7 people to rate a new ravioli on a 5-point asked 7 people to rate a new ravioli on a 5-point scale (1 = terrible,…, 5 = excellent) The ratings scale (1 = terrible,…, 5 = excellent) The ratings are: are: 2 5 3 4 1 4 52 5 3 4 1 4 5. .
At the At the .05.05 level, is there evidence that the level, is there evidence that the medianmedian rating is rating is at least 3at least 3??
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : HHaa: : = = Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = .05.05 Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = .05.05 Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
S = 2 S = 2 (Ratings 1 & 2 Are (Ratings 1 & 2 Are Less Than Less Than = = 3:3:22, 5, 3, 4, , 5, 3, 4, 11, 4, 5), 4, 5)Is observing 2 or more a small prob event?
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = .05.05 Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
PP(S (S 2) = 1 - 2) = 1 - PP(S (S 1) 1) = .9297= .9297
(Binomial Table, (Binomial Table, nn = 7, = 7, pp = 0.50) = 0.50)
S = 2 S = 2 (Ratings 1 & 2 Are (Ratings 1 & 2 Are Less Than Less Than = = 3:3:22, 5, 3, 4, , 5, 3, 4, 11, 4, 5), 4, 5)Is observing 2 or more a small prob event?
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = .05.05 Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
Do Not Reject at Do Not Reject at = .05 = .05
PP((xx 2) = 1 - 2) = 1 - PP((xx 1) 1) = . 9297= . 9297
(Binomial Table, (Binomial Table, nn = 7, = 7, pp = 0.50) = 0.50)
S = 2 S = 2 (Ratings 1 & 2 Are (Ratings 1 & 2 Are Less Than Less Than = = 3:3:22, 5, 3, 4, , 5, 3, 4, 11, 4, 5), 4, 5)Is observing 2 or more a small prob event?
EPI 809 / Spring 2008EPI 809 / Spring 2008
Sign Test SolutionSign Test Solution
HH00: : = = 33 HHaa: : < 3 < 3 = = .05.05 Test Statistic:Test Statistic:
P-Value: P-Value:
Decision:Decision:
Conclusion:Conclusion:
Do Not Reject at Do Not Reject at = .05 = .05
There is No evidence for There is No evidence for Median < 3Median < 3
PP((xx 2) = 1 - 2) = 1 - PP((xx 1) 1) == = . 9297= . 9297
(Binomial Table, (Binomial Table, nn = 7, = 7, pp = 0.50) = 0.50)
S = 2 S = 2 (Ratings 1 & 2 are (Ratings 1 & 2 are < < = = 3:3:22, 5, 3, 4, , 5, 3, 4, 11, 4, 5), 4, 5)Is observing 2 or more a small prob event?
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Wilcoxon Rank Sum TestTest
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test
1.1.Tests Two Independent Population Tests Two Independent Population Probability DistributionsProbability Distributions
2.2.Corresponds to t-Test for 2 Independent Corresponds to t-Test for 2 Independent MeansMeans
3.3.AssumptionsAssumptionsIndependent, Random SamplesIndependent, Random Samples
Populations Are ContinuousPopulations Are Continuous
4.4.Can Use Normal Approximation If Can Use Normal Approximation If nnii 10 10
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test ProcedureProcedure
1.1. Assign Ranks, Assign Ranks, RRii, to the , to the nn11 + + nn22 Sample Sample ObservationsObservations
If Unequal Sample Sizes, Let If Unequal Sample Sizes, Let nn11 Refer to Smaller-Sized Sample Refer to Smaller-Sized Sample
Smallest Value = 1Smallest Value = 1
2.2. Sum the Ranks, Sum the Ranks, TTii, for Each Sample, for Each Sample
Test Statistic Is Test Statistic Is TTA A (Smallest Sample)(Smallest Sample)Null Null hypothesis: both samples come from the same underlying hypothesis: both samples come from the same underlying
distributiondistribution
Distribution of T is not quite as simple as binomial, but it can be Distribution of T is not quite as simple as binomial, but it can be computedcomputed
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test ExampleExample
You’re a production planner. You want to see if You’re a production planner. You want to see if the operating rates for 2 factories is the same. the operating rates for 2 factories is the same. For factory 1, the rates (% of capacity) are For factory 1, the rates (% of capacity) are 7171, , 8282, , 7777, , 9292, , 8888. For factory 2, the rates are . For factory 2, the rates are 8585, , 8282, , 9494 & & 9797. Do the factory rates have the same . Do the factory rates have the same probability distributionsprobability distributions at the at the .10.10 level? level?
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00:: HHaa:: == nn11 = = nn22 = = Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
RanksRanks
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight == nn11 = = nn22 = = Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
RanksRanks
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight = = .10.10 nn11 = = 4 4 nn22 = = 5 5 Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
RanksRanks
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Wilcoxon Rank Sum Table 12 (Rosner) (Portion)Table 12 (Rosner) (Portion)
n1 4 5 6 ..
TL TU TL TU TL TU ..
4 10 26 16 34 23 43 .. n2 5 11 29 17 38 24 48 .. 6 12 32 18 42 26 52 .. : : : : : : : :
n1 4 5 6 ..
TL TU TL TU TL TU ..
4 10 26 16 34 23 43 .. n2 5 11 29 17 38 24 48 .. 6 12 32 18 42 26 52 .. : : : : : : : :
= .05 two-tailed= .05 two-tailed
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight = = .10.10 nn11 = = 4 4 nn22 = = 5 5 Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:RejectReject RejectRejectDo Not Do Not
RejectReject
1212 2828 RanksRanks
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 8582 8277 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 8582 8277 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 8582 8277 2 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 8582 3 82 477 2 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 8582 3 3.5 82 4 3.577 2 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 9492 9788 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 9492 9788 6 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 9492 7 9788 6 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 94 892 7 9788 6 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 94 892 7 97 988 6 ... ...
Rank Sum
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test Computation TableComputation Table
Factory 1 Factory 2Rate Rank Rate Rank
71 1 85 582 3 3.5 82 4 3.577 2 94 892 7 97 988 6 ... ...
Rank Sum 19.5 25.5
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight = = .10.10 nn11 = = 4 4 nn22 = = 5 5 Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:RejectReject RejectRejectDo Not Do Not
RejectReject
1212 2828 RanksRanks
TT22 = 5 + 3.5 + 8+ 9 = 25.5 = 5 + 3.5 + 8+ 9 = 25.5 (Smallest Sample)(Smallest Sample)
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight = = .10.10 nn11 = = 4 4 nn22 = = 5 5 Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Do Not Reject at Do Not Reject at = .10 = .10RejectReject RejectRejectDo Not Do Not
RejectReject
1212 2828 RanksRanks
TT22 = 5 + 3.5 + 8+ 9 = 25.5 = 5 + 3.5 + 8+ 9 = 25.5 (Smallest Sample)(Smallest Sample)
EPI 809 / Spring 2008EPI 809 / Spring 2008
Wilcoxon Rank Sum Test Wilcoxon Rank Sum Test SolutionSolution
HH00: : Identical Distrib.Identical Distrib. HHaa: : Shifted Left or Shifted Left or
RightRight = = .10.10 nn11 = = 4 4 nn22 = = 5 5 Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Do Not Reject at Do Not Reject at = .10 = .10
There is No evidence for There is No evidence for unequal distribunequal distrib
RejectReject RejectRejectDo Not Do Not RejectReject
1212 2828 RanksRanks
TT22 = 5 + 3.5 + 8+ 9 = 25.5 = 5 + 3.5 + 8+ 9 = 25.5 (Smallest Sample)(Smallest Sample)