SlideShare une entreprise Scribd logo
1  sur  47
Statistics for Managers 
Using Microsoft® Excel 
4th Edition 
Chapter 11 
Chi-Square Tests and 
Nonparametric Tests 
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1
Chapter Goals 
After completing this chapter, you should be 
able to: 
 Perform a c2 test for the difference between two 
proportions 
 Use a c2 test for differences in more than two proportions 
 Perform a c2 test of independence 
 Apply and interpret the Wilcoxon rank sum test for the 
difference between two medians 
 Perform nonparametric analysis of variance using the 
Kruskal-Wallis rank test for one-way ANOVA 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-2
Contingency Tables 
Contingency Tables 
 Useful in situations involving multiple population 
proportions 
 Used to classify sample observations according 
to two or more characteristics 
 Also called a cross-classification table. 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-3
Contingency Table Example 
Left-Handed vs. Gender 
Dominant Hand: Left vs. Right 
Gender: Male vs. Female 
 2 categories for each variable, so 
called a 2 x 2 table 
 Suppose we examine a sample of 
size 300 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-4
Contingency Table Example 
(continued) 
Sample results organized in a contingency table: 
Gender 
Hand Preference 
Left Right 
Female 12 108 120 
Male 24 156 180 
36 264 300 
sample size = n = 300: 
120 Females, 12 
were left handed 
180 Males, 24 were 
left handed 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-5
c2 Test for the Difference 
Between Two Proportions 
H0: p1 = p2 (Proportion of females who are left 
handed is equal to the proportion of 
males who are left handed) 
H1: p1 ≠ p2 (The two proportions are not the same – 
Hand preference is not independent 
of gender) 
 If H0 is true, then the proportion of left-handed females should be 
the same as the proportion of left-handed males 
 The two proportions above should be the same as the proportion of 
left-handed people overall 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-6
The Chi-Square Test Statistic 
The Chi-square test statistic is: 
(f f ) 
c = å - 
2 o e 
f 
all cells e 
2 
 where: 
fo = observed frequency in a particular cell 
fe = expected frequency in a particular cell if H0 is true 
c2 for the 2 x 2 case has 1 degree of freedom 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-7 
(Assumed: each cell in the contingency table has expected 
frequency of at least 5)
Decision Rule 
c2 
The c2 test statistic approximately follows a chi-squared 
distribution with one degree of freedom 
Statistics for Managers Using 
c2 
Microsoft Excel, 4e © 2004 
U 
Prentice-Hall, Inc. Chap 11-8 
Decision Rule: 
If c2 > c2 
U, reject H0, 
otherwise, do not 
reject H0 
0 
a 
Reject H0 Do not 
reject H0
Computing the 
Average Proportion 
p = X + 
X 
1 2 = 
+ 
n n 
The average 
proportion is: 
120 Females, 12 Here: 
were left handed 
180 Males, 24 were 
left handed 
X 
n 
1 2 
0.12 
p 12 24 = 36 
= 
300 
= + 
120 + 
180 
i.e., the proportion of left handers overall is 12% 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-9
Finding Expected Frequencies 
 To obtain the expected frequency for left handed 
females, multiply the average proportion left handed (p) 
by the total number of females 
 To obtain the expected frequency for left handed males, 
multiply the average proportion left handed (p) by the 
total number of males 
If the two proportions are equal, then 
P(Left Handed | Female) = P(Left Handed | Male) = .12 
i.e., we would expect (.12)(120) = 14.4 females to be left handed 
Statistics for Managers (.Using 
12)(180) = 21.6 males to be left handed 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-10
Observed v. Expected 
Frequencies 
Observed frequencies vs. expected frequencies: 
Gender 
Hand Preference 
Left Right 
Female 
Observed = 12 
Expected = 14.4 
Observed = 108 
Expected = 105.6 
120 
Male 
Observed = 24 
Expected = 21.6 
Observed = 156 
Expected = 158.4 
180 
36 264 300 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-11
The Chi-Square Test Statistic 
Gender 
Hand Preference 
Left Right 
Female 
Observed = 12 
Expected = 14.4 
Observed = 108 
Expected = 105.6 
120 
Male 
Observed = 24 
Expected = 21.6 
Observed = 156 
Expected = 158.4 
180 
36 264 300 
The test statistic is: 
(f f ) 
c = å - 
f 
Statistics (12 for 14.4) 
Managers 2 (108 Using 
105.6) 
2 (24 21.6) 
2 (156 158.4) 
2 
Microsoft Excel, 14.4 
4e © 2004 
0.6848 
105.6 
21.6 
158.4 
Prentice-Hall, Inc. Chap 11-12 
all cells e 
2 
2 o e 
= - + - + - + - =
Decision Rule Example 
The test statistic is c2 = 0 . 6848 , c with 1 d.f. = 
3.841 2U 
Decision Rule: 
If c2 > 3.841, reject H0, 
otherwise, do not reject H0 
Here, 
c2 = 0.6848 < c2 
U = 3.841, 
so we do not reject H0 
and conclude that there is 
not sufficient evidence 
that the two proportions 
are different at a = .05 
c2 
a 
Reject H0 Do not 
reject H0 
U=3.841 
c2 
0 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-13
c2 Test for the Difference Between 
More Than Two Proportions 
 Extend the c2 test to the case with more than 
two independent populations: 
H0: p1 = p2 = … = pc 
H1: Not all of the pj are equal (j = 1, 2, …, c) 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-14
The Chi-Square Test Statistic 
The Chi-square test statistic is: 
(f f ) 
c = å - 
2 o e 
f 
all cells e 
2 
 where: 
fo = observed frequency in a particular cell of the 2 x c table 
fe = expected frequency in a particular cell if H0 is true 
c2 for the 2 x c case has (2-1)(c-1) = c - 1 degrees of freedom 
Statistics Microsoft (Assumed: for Managers each cell Using 
Excel, 4e © 2004 
in the contingency table has expected 
frequency of at least 1) 
Prentice-Hall, Inc. Chap 11-15
Computing the 
Overall Proportion 
X 
n 
p = X + X + + 
X 
The overall  
proportion is: 
1 2 c = 
+ + + 
n n  
n 
1 2 c 
 Expected cell frequencies for the c categories 
are calculated as in the 2 x 2 case, and the 
decision rule is the same: 
Decision Rule: 
If c2 > c2 
U, reject H0, 
otherwise, do not 
reject H0 
Where c2 
U is from the 
chi-squared distribution 
with c – 1 degrees of 
freedom 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-16
c2 Test of Independence 
 Similar to the c2 test for equality of more than 
two proportions, but extends the concept to 
contingency tables with r rows and c columns 
H0: The two categorical variables are independent 
(i.e., there is no relationship between them) 
H1: The two categorical variables are dependent 
(i.e., there is a relationship between them) 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-17
c2 Test of Independence 
The Chi-square test statistic is: 
(f f ) 
c = å - 
2 o e 
f 
all cells e 
2 
 where: 
fo = observed frequency in a particular cell of the r x c table 
fe = expected frequency in a particular cell if H0 is true 
c2 for the r x c case has (r-1)(c-1) degrees of freedom 
Statistics (Assumed: for Managers each cell in Using 
the contingency table has expected 
Microsoft frequency Excel, 4e of at © least 2004 
1) 
Prentice-Hall, Inc. Chap 11-18 
(continued)
Expected Cell Frequencies 
 Expected cell frequencies: 
f row total column total e 
n 
= ´ 
Where: 
row total = sum of all frequencies in the row 
column total = sum of all frequencies in the column 
n = overall sample size 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-19
Decision Rule 
 The decision rule is 
If c2 > c2 
U, reject H0, 
otherwise, do not reject H0 
Where c2 
U is from the chi-squared distribution 
with (r – 1)(c – 1) degrees of freedom 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-20
Example 
 The meal plan selected by 200 students is shown below: 
Class 
Standing 
Number of meals per week 
20/week 10/week none Total 
Fresh. 24 32 14 70 
Soph. 22 26 12 60 
Junior 10 14 6 30 
Senior 14 16 10 40 
Total 70 88 42 200 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-21
Example 
 The hypothesis to be tested is: 
(continued) 
H0: Meal plan and class standing are independent 
(i.e., there is no relationship between them) 
H1: Meal plan and class standing are dependent 
(i.e., there is a relationship between them) 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-22
Class 
Standing 
Observed: 
Number of meals 
per week 
Total 
20/wk 10/wk none 
Fresh. 24 32 14 70 
Soph. 22 26 12 60 
Junior 10 14 6 30 
Senior 14 16 10 40 
Total 70 88 42 200 
Expected cell 
frequencies if H0 is true: 
Class 
Standing 
Number of meals 
per week 
Total 
20/wk 10/wk none 
Fresh. 24.5 30.8 14.7 70 
Soph. 21.0 26.4 12.6 60 
Junior 10.5 13.2 6.3 30 
Senior 14.0 17.6 8.4 40 
Total 70 88 42 200 
Example for one cell: 
f = row total ´ 
column total e 
Statistics 30 for 70 
Managers Using 
Microsoft 10.5 
200 
Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-23 
n 
= ´ = 
Example: 
Expected Cell Frequencies 
(continued)
Example: The Test Statistic 
 The test statistic value is: 
(continued) 
0.709 
2 
2 2 2 
(10 8.4) 
c = å - 
= - + - + + - = 
8.4 
(32 30.8) 
30.8 
(f f ) 
2 o e 
f 
all cells e 
(24 24.5) 
24.5 
 
c2 
= 12.592 for α = .05 from the chi-squared 
U distribution with (4 – 1)(3 – 1) = 6 degrees of 
freedom 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-24
Example: 
Decision and Interpretation 
(continued) 
The test statistic is c2 = 0 . 709 , c with 6 d.f. = 
12.592 2U 
Decision Rule: 
If c2 > 12.592, reject H0, 
otherwise, do not reject H0 
Here, 
c2 = 0.709 < c2 
U = 12.592, 
so do not reject H0 
Conclusion: there is not 
sufficient evidence that meal 
plan and class standing are 
related at a = .05 
c2 
a 
Reject H0 Do not 
reject H0 
U=12.592 
c2 
0 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-25
Wilcoxon Rank-Sum Test for 
Differences in 2 Medians 
 Test two independent population medians 
 Populations need not be normally distributed 
 Distribution free procedure 
 Used when only rank data is available 
 Must use normal approximation if either of the 
sample sizes is larger than 10 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-26
Wilcoxon Rank-Sum Test: 
Small Samples 
 Can use when both n1 , n2 ≤ 10 
 Assign ranks to the combined n1 + n2 sample 
observations 
 If unequal sample sizes, let n1 refer to smaller-sized 
sample 
 Smallest value rank = 1, largest value rank = n1 + n2 
 Assign average rank for ties 
 Sum the ranks for each sample: T1 and T2 
Statistics for Managers Using 
Microsoft  Obtain Excel, test 4e © statistic, 2004 
T(from smaller sample) 
1 Prentice-Hall, Inc. Chap 11-27
Checking the Rankings 
 The sum of the rankings must satisfy the 
formula below 
 Can use this to verify the sums T1 and T2 
T + T = n(n + 
1) 1 2 
2 
where n = n1 + n2 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-28
Wilcoxon Rank-Sum Test: 
Hypothesis and Decision Rule 
M1 = median of population 1; M2 = median of population 2 
Test statistic = T1 (Sum of ranks from smaller sample) 
Two-Tail Test Left-Tail Test Right-Tail Test 
H0: M1 = M2 
H1: M1 ¹ M2 
H0: M1 £ M2 
H1: M1 > M2 
H0: M1 ³ M2 
H1: M1 < M2 
Reject 
Do Not Reject 
Reject 
T1L T1U 
Reject 
T1L 
Do Not Reject 
Do Not Reject Reject 
T1U 
Statistics Reject Hif for T< Managers TUsing 
0 1 1L 
Microsoft or if Excel, T> T4e © 2004 
1 1U 
Prentice-Hall, Inc. Chap 11-29 
Reject H0 if T1 < T1L Reject H0 if T1 > T1U
Wilcoxon Rank-Sum Test: 
Small Sample Example 
Sample data is collected on the capacity rates 
(% of capacity) for two factories. 
Are the median operating rates for two factories 
the same? 
 For factory A, the rates are 71, 82, 77, 94, 88 
 For factory B, the rates are 85, 82, 92, 97 
Test for equality of the sample medians 
at the 0.05 significance level 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-30
Wilcoxon Rank-Sum Test: 
Small Sample Example 
Capacity Rank 
Factory A Factory B Factory A Factory B 
71 1 
77 2 
82 3.5 
82 3.5 
85 5 
88 6 
92 7 
94 8 
Ranked 
Capacity 
values: 
Statistics for Managers Using 
97 9 
Microsoft Excel, 4e © 2004 
Rank Sums: 20.5 24.5 
Prentice-Hall, Inc. Chap 11-31 
Tie in 3rd and 
4th places 
(continued)
Wilcoxon Rank-Sum Test: 
Small Sample Example 
(continued) 
Factory B has the smaller sample size, so 
the test statistic is the sum of the 
Factory B ranks: 
T1 = 24.5 
The sample sizes are: 
n1 = 4 (factory B) 
n2 = 5 (factory A) 
Statistics for Managers Using 
Microsoft Excel, 4e © The 2004 
level of significance is α = .05 
Prentice-Hall, Inc. Chap 11-32
Wilcoxon Rank-Sum Test: 
Small Sample Example 
n2 
a n1 
One- 
Tailed 
(continued) 
Two- 
Tailed 4 5 
4 
5 
.05 .10 12, 28 19, 36 
.025 .05 11, 29 17, 38 
.01 .02 10, 30 16, 39 
.005 .01 --, -- 15, 40 
6 
 Lower and 
Upper 
Critical 
Values for 
T1 from 
Appendix 
table E.8: 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. T1L = 11 and T1U Chap = 29 
11-33
Wilcoxon Rank-Sum Test: 
Small Sample Solution 
 a = .05 
 n1 = 4 , n2 = 5 
Two-Tail Test 
H0: M1 = M2 
H1: M1 ¹ M2 
Do Not Reject 
Reject 
Reject 
T1L=11 T1U=29 
(continued) 
Do not reject at a = 0.05 
Statistics Reject Hif for T< Managers T=11 
Using 
0 1 1LMicrosoft or if Excel, T> T=4e 29 
© 2004 
1 1UPrentice-Hall, Inc. Chap 11-34 
Test Statistic (Sum of 
ranks from smaller sample): 
T1 = 24.5 
Decision: 
Conclusion: 
There is not enough evidence 
that medians are not equal.
Wilcoxon Rank-Sum Test 
(Large Sample) 
 For large samples, the test statistic Tis 
1 approximately normal with mean μ 
T1 and 
standard deviation σ 
T1 : 
μ = n1(n + 
1) 
T1 
2 
σ = n1n2 (n + 
1) 
T1 
12 
 Must use the normal approximation if either n1 
or n2 > 10 
 Can use the normal approximation for small samples 
 Assign n1 to be the smaller of the two sample sizes 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-35
Wilcoxon Rank-Sum Test 
(Large Sample) 
 The Z test statistic is 
T - 
μ 
1 T 
σ 
T 
1 
1 
Z 
= 
 Where Z approximately follows a 
standardized normal distribution 
(continued) 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-36
Wilcoxon Rank-Sum Test: 
Normal Approximation Example 
Use the setting of the prior example: 
The sample sizes were: 
n1 = 4 (factory B) 
n2 = 5 (factory A) 
The level of significance was α = .05 
The test statistic was T1 = 24.5 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-37
Wilcoxon Rank-Sum Test: 
Normal Approximation Example 
20 
μ = n1(n + 1) 
= 4(9 + 1) 
= 
T1 2 
2 
σ = n1n2 (n + 1) 
= 4(5)(9 + 1) 
= 
T1 12 
12 
 The test statistic is 
2.739 
(continued) 
1.64 
24.5 20 
- 
1 T = - = 
2.739 
T μ 
σ 
Z 
T 
1 
1 
= 
 Z = 1.64 is not greater than the critical Z value of 1.96 
(for α = .05) so we do not reject H0 – there is not 
sufficient evidence that the medians are not equal 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-38
Kruskal-Wallis Rank Test 
 Tests the equality of more than 2 population 
medians 
 Assumptions: 
 The samples are random and independent 
 variables have a continuous distribution 
 the data can be ranked 
 populations have the same variability 
 populations have the same shape 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-39
Kruskal-Wallis Test Procedure 
 Obtain relative rankings for each value 
 In event of tie, each of the tied values gets the 
average rank 
 Sum the rankings for data from each of the c 
groups 
 Compute the H test statistic 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-40
Kruskal-Wallis Test Procedure 
 The Kruskal-Wallis H test statistic: (with c – 1 degrees of freedom) 
ù 
2 
j - + 
3(n 1) 
T 
n 
é 
H 12 
= å= 
n(n 1) 
c 
j 1 j 
ú úû 
ê êë 
+ 
where: 
n = sum of sample sizes in all samples 
c = Number of samples 
Tj = Sum of ranks in the jth sample 
nj = Size of the jth sample 
(continued) 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-41
Kruskal-Wallis Test Procedure 
 Complete the test by comparing the 
calculated H value to a critical c2 value from 
the chi-square distribution with c – 1 
degrees of freedom 
 Decision rule 
(continued) 
 Reject H0 if test statistic H > c2 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-42 
U 
 Otherwise do not reject H0 
c2 
c2 
U 
0 
a 
Reject H0 Do not 
reject H0
Kruskal-Wallis Example 
 Do different departments have different class 
sizes? 
Class size 
(Math, M) 
Class size 
(English, E) 
Class size 
(History, H) 
23 
45 
54 
78 
66 
55 
60 
72 
45 
70 
30 
40 
18 
34 
44 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-43
Kruskal-Wallis Example 
 Do different departments have different class 
sizes? 
Class size 
(Math, M) Ranking Class size 
(English, E) Ranking Class size 
(History, H) Ranking 
23 
41 
54 
78 
66 
269 
15 
12 
55 
60 
72 
45 
70 
10 
11 
14 
8 
13 
30 
40 
18 
34 
44 
35147 
S = 44 S = 56 S = 20 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-44
Kruskal-Wallis Example 
H : Median Median Median 
0 M E H = = 
H : Not all population Medians are equal 
A 
 The H statistic is 
(continued) 
3(15 1) 6.72 
- + 
ù 
ú úû 
2 2 2 
20 
5 
3(n 1) 
56 
+ + 
5 
R 
n 
2j 
= å= 
j 1 j 
44 
5 
é 
H 12 
n(n + 
1) 
12 
c 
15(15 1) 
ù 
= + - úû 
ê êë 
é 
êë 
ö 
÷ ÷ø 
æ 
ç çè 
+ 
= 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-45
Kruskal-Wallis Example 
 Compare H = 6.72 to the critical value from the 
chi-square distribution for 5 – 1 = 4 degrees of 
freedom and a = .05: 
4877 . 9 2U 
c = 
Since H = 6.72 < 
4877 . 9 2U 
c = 
do not reject H0 
(continued) 
There is not sufficient evidence to reject 
that the population medians are all equal 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-46
Chapter Summary 
 Developed and applied the c2 test for the 
difference between two proportions 
 Developed and applied the c2 test for 
differences in more than two proportions 
 Examined the c2 test for independence 
 Used the Wilcoxon rank sum test for two 
population medians 
 Small Samples 
 Large sample Z approximation 
 Applied the Kruskal-Wallis H-test for multiple 
population medians 
Statistics for Managers Using 
Microsoft Excel, 4e © 2004 
Prentice-Hall, Inc. Chap 11-47

Contenu connexe

Tendances

Repeated Measures ANOVA
Repeated Measures ANOVARepeated Measures ANOVA
Repeated Measures ANOVASr Edith Bogue
 
Parametric & non-parametric
Parametric & non-parametricParametric & non-parametric
Parametric & non-parametricSoniaBabaee
 
Chap11 chie square & non parametrics
Chap11 chie square & non parametricsChap11 chie square & non parametrics
Chap11 chie square & non parametricsUni Azza Aunillah
 
LECTURE 1 ONE SAMPLE T TEST.ppt
LECTURE 1 ONE SAMPLE T TEST.pptLECTURE 1 ONE SAMPLE T TEST.ppt
LECTURE 1 ONE SAMPLE T TEST.pptKEHKASHANNIZAM
 
Reporting a single sample t-test
Reporting a single sample t-testReporting a single sample t-test
Reporting a single sample t-testKen Plummer
 
Mann Whitney U Test | Statistics
Mann Whitney U Test | StatisticsMann Whitney U Test | Statistics
Mann Whitney U Test | StatisticsTransweb Global Inc
 
The Chi-Square Statistic: Tests for Goodness of Fit and Independence
The Chi-Square Statistic: Tests for Goodness of Fit and IndependenceThe Chi-Square Statistic: Tests for Goodness of Fit and Independence
The Chi-Square Statistic: Tests for Goodness of Fit and Independencejasondroesch
 
2 way ANOVA(Analysis Of VAriance
2 way ANOVA(Analysis Of VAriance2 way ANOVA(Analysis Of VAriance
2 way ANOVA(Analysis Of VAriancemusadoto
 
Reporting pearson correlation in apa
Reporting pearson correlation in apa Reporting pearson correlation in apa
Reporting pearson correlation in apa Amit Sharma
 
Calculating a single sample z test by hand
Calculating a single sample z test by handCalculating a single sample z test by hand
Calculating a single sample z test by handKen Plummer
 
Discrete probability
Discrete probabilityDiscrete probability
Discrete probabilityRanjan Kumar
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-testChristina K J
 
Two-factor Mixed MANOVA with SPSS
Two-factor Mixed MANOVA with SPSSTwo-factor Mixed MANOVA with SPSS
Two-factor Mixed MANOVA with SPSSJ P Verma
 
Research Methodology General.ppt
Research  Methodology  General.pptResearch  Methodology  General.ppt
Research Methodology General.pptShama
 
Two-way Repeated Measures ANOVA
Two-way Repeated Measures ANOVATwo-way Repeated Measures ANOVA
Two-way Repeated Measures ANOVAJ P Verma
 
Reporting statistics in psychology
Reporting statistics in psychologyReporting statistics in psychology
Reporting statistics in psychologyReiner-Vinicius
 

Tendances (20)

Repeated Measures ANOVA
Repeated Measures ANOVARepeated Measures ANOVA
Repeated Measures ANOVA
 
Parametric & non-parametric
Parametric & non-parametricParametric & non-parametric
Parametric & non-parametric
 
Chap09 2 sample test
Chap09 2 sample testChap09 2 sample test
Chap09 2 sample test
 
Chap11 chie square & non parametrics
Chap11 chie square & non parametricsChap11 chie square & non parametrics
Chap11 chie square & non parametrics
 
LECTURE 1 ONE SAMPLE T TEST.ppt
LECTURE 1 ONE SAMPLE T TEST.pptLECTURE 1 ONE SAMPLE T TEST.ppt
LECTURE 1 ONE SAMPLE T TEST.ppt
 
Reporting a single sample t-test
Reporting a single sample t-testReporting a single sample t-test
Reporting a single sample t-test
 
Degree of freedom
Degree of freedomDegree of freedom
Degree of freedom
 
Mann Whitney U Test | Statistics
Mann Whitney U Test | StatisticsMann Whitney U Test | Statistics
Mann Whitney U Test | Statistics
 
The Chi-Square Statistic: Tests for Goodness of Fit and Independence
The Chi-Square Statistic: Tests for Goodness of Fit and IndependenceThe Chi-Square Statistic: Tests for Goodness of Fit and Independence
The Chi-Square Statistic: Tests for Goodness of Fit and Independence
 
2 way ANOVA(Analysis Of VAriance
2 way ANOVA(Analysis Of VAriance2 way ANOVA(Analysis Of VAriance
2 way ANOVA(Analysis Of VAriance
 
Reporting pearson correlation in apa
Reporting pearson correlation in apa Reporting pearson correlation in apa
Reporting pearson correlation in apa
 
Model Validation
Model Validation Model Validation
Model Validation
 
Calculating a single sample z test by hand
Calculating a single sample z test by handCalculating a single sample z test by hand
Calculating a single sample z test by hand
 
Discrete probability
Discrete probabilityDiscrete probability
Discrete probability
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
Two-factor Mixed MANOVA with SPSS
Two-factor Mixed MANOVA with SPSSTwo-factor Mixed MANOVA with SPSS
Two-factor Mixed MANOVA with SPSS
 
Mann - Whitney U test.pptx
Mann - Whitney U test.pptxMann - Whitney U test.pptx
Mann - Whitney U test.pptx
 
Research Methodology General.ppt
Research  Methodology  General.pptResearch  Methodology  General.ppt
Research Methodology General.ppt
 
Two-way Repeated Measures ANOVA
Two-way Repeated Measures ANOVATwo-way Repeated Measures ANOVA
Two-way Repeated Measures ANOVA
 
Reporting statistics in psychology
Reporting statistics in psychologyReporting statistics in psychology
Reporting statistics in psychology
 

Similaire à Chi square using excel

Chi Square Tests and Nonparametric Tests
Chi Square Tests and Nonparametric TestsChi Square Tests and Nonparametric Tests
Chi Square Tests and Nonparametric TestsYesica Adicondro
 
Bbs11 ppt ch12
Bbs11 ppt ch12Bbs11 ppt ch12
Bbs11 ppt ch12Tuul Tuul
 
Chap08 fundamentals of hypothesis
Chap08 fundamentals of  hypothesisChap08 fundamentals of  hypothesis
Chap08 fundamentals of hypothesisUni Azza Aunillah
 
Chap06 normal distributions & continous
Chap06 normal distributions & continousChap06 normal distributions & continous
Chap06 normal distributions & continousUni Azza Aunillah
 
Fundamentals of Testing Hypothesis
Fundamentals of Testing HypothesisFundamentals of Testing Hypothesis
Fundamentals of Testing HypothesisYesica Adicondro
 
chi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanchi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanmuhammad shahid
 
The Normal Distribution and Other Continuous Distributions
The Normal Distribution and Other Continuous DistributionsThe Normal Distribution and Other Continuous Distributions
The Normal Distribution and Other Continuous DistributionsYesica Adicondro
 
Chap14 multiple regression model building
Chap14 multiple regression model buildingChap14 multiple regression model building
Chap14 multiple regression model buildingUni Azza Aunillah
 
Numerical Descriptive Measures
Numerical Descriptive MeasuresNumerical Descriptive Measures
Numerical Descriptive MeasuresYesica Adicondro
 
Newbold_chap16.ppt
Newbold_chap16.pptNewbold_chap16.ppt
Newbold_chap16.pptcfisicaster
 
Chap03 numerical descriptive measures
Chap03 numerical descriptive measuresChap03 numerical descriptive measures
Chap03 numerical descriptive measuresUni Azza Aunillah
 
multiple regression model building
 multiple regression model building multiple regression model building
multiple regression model buildingYesica Adicondro
 

Similaire à Chi square using excel (20)

Chi Square Tests and Nonparametric Tests
Chi Square Tests and Nonparametric TestsChi Square Tests and Nonparametric Tests
Chi Square Tests and Nonparametric Tests
 
Bbs11 ppt ch12
Bbs11 ppt ch12Bbs11 ppt ch12
Bbs11 ppt ch12
 
Chap08 fundamentals of hypothesis
Chap08 fundamentals of  hypothesisChap08 fundamentals of  hypothesis
Chap08 fundamentals of hypothesis
 
Analysis of Variance
Analysis of VarianceAnalysis of Variance
Analysis of Variance
 
Chap06 normal distributions & continous
Chap06 normal distributions & continousChap06 normal distributions & continous
Chap06 normal distributions & continous
 
Fundamentals of Testing Hypothesis
Fundamentals of Testing HypothesisFundamentals of Testing Hypothesis
Fundamentals of Testing Hypothesis
 
chi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanchi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistan
 
The Normal Distribution and Other Continuous Distributions
The Normal Distribution and Other Continuous DistributionsThe Normal Distribution and Other Continuous Distributions
The Normal Distribution and Other Continuous Distributions
 
Chap12 simple regression
Chap12 simple regressionChap12 simple regression
Chap12 simple regression
 
Chap14 multiple regression model building
Chap14 multiple regression model buildingChap14 multiple regression model building
Chap14 multiple regression model building
 
Chapter12
Chapter12Chapter12
Chapter12
 
Numerical Descriptive Measures
Numerical Descriptive MeasuresNumerical Descriptive Measures
Numerical Descriptive Measures
 
chap08.pptx
chap08.pptxchap08.pptx
chap08.pptx
 
Newbold_chap16.ppt
Newbold_chap16.pptNewbold_chap16.ppt
Newbold_chap16.ppt
 
Chap03 numerical descriptive measures
Chap03 numerical descriptive measuresChap03 numerical descriptive measures
Chap03 numerical descriptive measures
 
multiple regression model building
 multiple regression model building multiple regression model building
multiple regression model building
 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
 
chap06-1.pptx
chap06-1.pptxchap06-1.pptx
chap06-1.pptx
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
 
qm2CHAP12.ppt
qm2CHAP12.pptqm2CHAP12.ppt
qm2CHAP12.ppt
 

Dernier

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Dernier (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Chi square using excel

  • 1. Statistics for Managers Using Microsoft® Excel 4th Edition Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1
  • 2. Chapter Goals After completing this chapter, you should be able to:  Perform a c2 test for the difference between two proportions  Use a c2 test for differences in more than two proportions  Perform a c2 test of independence  Apply and interpret the Wilcoxon rank sum test for the difference between two medians  Perform nonparametric analysis of variance using the Kruskal-Wallis rank test for one-way ANOVA Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-2
  • 3. Contingency Tables Contingency Tables  Useful in situations involving multiple population proportions  Used to classify sample observations according to two or more characteristics  Also called a cross-classification table. Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-3
  • 4. Contingency Table Example Left-Handed vs. Gender Dominant Hand: Left vs. Right Gender: Male vs. Female  2 categories for each variable, so called a 2 x 2 table  Suppose we examine a sample of size 300 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-4
  • 5. Contingency Table Example (continued) Sample results organized in a contingency table: Gender Hand Preference Left Right Female 12 108 120 Male 24 156 180 36 264 300 sample size = n = 300: 120 Females, 12 were left handed 180 Males, 24 were left handed Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-5
  • 6. c2 Test for the Difference Between Two Proportions H0: p1 = p2 (Proportion of females who are left handed is equal to the proportion of males who are left handed) H1: p1 ≠ p2 (The two proportions are not the same – Hand preference is not independent of gender)  If H0 is true, then the proportion of left-handed females should be the same as the proportion of left-handed males  The two proportions above should be the same as the proportion of left-handed people overall Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-6
  • 7. The Chi-Square Test Statistic The Chi-square test statistic is: (f f ) c = å - 2 o e f all cells e 2  where: fo = observed frequency in a particular cell fe = expected frequency in a particular cell if H0 is true c2 for the 2 x 2 case has 1 degree of freedom Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-7 (Assumed: each cell in the contingency table has expected frequency of at least 5)
  • 8. Decision Rule c2 The c2 test statistic approximately follows a chi-squared distribution with one degree of freedom Statistics for Managers Using c2 Microsoft Excel, 4e © 2004 U Prentice-Hall, Inc. Chap 11-8 Decision Rule: If c2 > c2 U, reject H0, otherwise, do not reject H0 0 a Reject H0 Do not reject H0
  • 9. Computing the Average Proportion p = X + X 1 2 = + n n The average proportion is: 120 Females, 12 Here: were left handed 180 Males, 24 were left handed X n 1 2 0.12 p 12 24 = 36 = 300 = + 120 + 180 i.e., the proportion of left handers overall is 12% Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-9
  • 10. Finding Expected Frequencies  To obtain the expected frequency for left handed females, multiply the average proportion left handed (p) by the total number of females  To obtain the expected frequency for left handed males, multiply the average proportion left handed (p) by the total number of males If the two proportions are equal, then P(Left Handed | Female) = P(Left Handed | Male) = .12 i.e., we would expect (.12)(120) = 14.4 females to be left handed Statistics for Managers (.Using 12)(180) = 21.6 males to be left handed Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-10
  • 11. Observed v. Expected Frequencies Observed frequencies vs. expected frequencies: Gender Hand Preference Left Right Female Observed = 12 Expected = 14.4 Observed = 108 Expected = 105.6 120 Male Observed = 24 Expected = 21.6 Observed = 156 Expected = 158.4 180 36 264 300 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-11
  • 12. The Chi-Square Test Statistic Gender Hand Preference Left Right Female Observed = 12 Expected = 14.4 Observed = 108 Expected = 105.6 120 Male Observed = 24 Expected = 21.6 Observed = 156 Expected = 158.4 180 36 264 300 The test statistic is: (f f ) c = å - f Statistics (12 for 14.4) Managers 2 (108 Using 105.6) 2 (24 21.6) 2 (156 158.4) 2 Microsoft Excel, 14.4 4e © 2004 0.6848 105.6 21.6 158.4 Prentice-Hall, Inc. Chap 11-12 all cells e 2 2 o e = - + - + - + - =
  • 13. Decision Rule Example The test statistic is c2 = 0 . 6848 , c with 1 d.f. = 3.841 2U Decision Rule: If c2 > 3.841, reject H0, otherwise, do not reject H0 Here, c2 = 0.6848 < c2 U = 3.841, so we do not reject H0 and conclude that there is not sufficient evidence that the two proportions are different at a = .05 c2 a Reject H0 Do not reject H0 U=3.841 c2 0 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-13
  • 14. c2 Test for the Difference Between More Than Two Proportions  Extend the c2 test to the case with more than two independent populations: H0: p1 = p2 = … = pc H1: Not all of the pj are equal (j = 1, 2, …, c) Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-14
  • 15. The Chi-Square Test Statistic The Chi-square test statistic is: (f f ) c = å - 2 o e f all cells e 2  where: fo = observed frequency in a particular cell of the 2 x c table fe = expected frequency in a particular cell if H0 is true c2 for the 2 x c case has (2-1)(c-1) = c - 1 degrees of freedom Statistics Microsoft (Assumed: for Managers each cell Using Excel, 4e © 2004 in the contingency table has expected frequency of at least 1) Prentice-Hall, Inc. Chap 11-15
  • 16. Computing the Overall Proportion X n p = X + X + + X The overall  proportion is: 1 2 c = + + + n n  n 1 2 c  Expected cell frequencies for the c categories are calculated as in the 2 x 2 case, and the decision rule is the same: Decision Rule: If c2 > c2 U, reject H0, otherwise, do not reject H0 Where c2 U is from the chi-squared distribution with c – 1 degrees of freedom Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-16
  • 17. c2 Test of Independence  Similar to the c2 test for equality of more than two proportions, but extends the concept to contingency tables with r rows and c columns H0: The two categorical variables are independent (i.e., there is no relationship between them) H1: The two categorical variables are dependent (i.e., there is a relationship between them) Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-17
  • 18. c2 Test of Independence The Chi-square test statistic is: (f f ) c = å - 2 o e f all cells e 2  where: fo = observed frequency in a particular cell of the r x c table fe = expected frequency in a particular cell if H0 is true c2 for the r x c case has (r-1)(c-1) degrees of freedom Statistics (Assumed: for Managers each cell in Using the contingency table has expected Microsoft frequency Excel, 4e of at © least 2004 1) Prentice-Hall, Inc. Chap 11-18 (continued)
  • 19. Expected Cell Frequencies  Expected cell frequencies: f row total column total e n = ´ Where: row total = sum of all frequencies in the row column total = sum of all frequencies in the column n = overall sample size Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-19
  • 20. Decision Rule  The decision rule is If c2 > c2 U, reject H0, otherwise, do not reject H0 Where c2 U is from the chi-squared distribution with (r – 1)(c – 1) degrees of freedom Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-20
  • 21. Example  The meal plan selected by 200 students is shown below: Class Standing Number of meals per week 20/week 10/week none Total Fresh. 24 32 14 70 Soph. 22 26 12 60 Junior 10 14 6 30 Senior 14 16 10 40 Total 70 88 42 200 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-21
  • 22. Example  The hypothesis to be tested is: (continued) H0: Meal plan and class standing are independent (i.e., there is no relationship between them) H1: Meal plan and class standing are dependent (i.e., there is a relationship between them) Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-22
  • 23. Class Standing Observed: Number of meals per week Total 20/wk 10/wk none Fresh. 24 32 14 70 Soph. 22 26 12 60 Junior 10 14 6 30 Senior 14 16 10 40 Total 70 88 42 200 Expected cell frequencies if H0 is true: Class Standing Number of meals per week Total 20/wk 10/wk none Fresh. 24.5 30.8 14.7 70 Soph. 21.0 26.4 12.6 60 Junior 10.5 13.2 6.3 30 Senior 14.0 17.6 8.4 40 Total 70 88 42 200 Example for one cell: f = row total ´ column total e Statistics 30 for 70 Managers Using Microsoft 10.5 200 Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-23 n = ´ = Example: Expected Cell Frequencies (continued)
  • 24. Example: The Test Statistic  The test statistic value is: (continued) 0.709 2 2 2 2 (10 8.4) c = å - = - + - + + - = 8.4 (32 30.8) 30.8 (f f ) 2 o e f all cells e (24 24.5) 24.5  c2 = 12.592 for α = .05 from the chi-squared U distribution with (4 – 1)(3 – 1) = 6 degrees of freedom Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-24
  • 25. Example: Decision and Interpretation (continued) The test statistic is c2 = 0 . 709 , c with 6 d.f. = 12.592 2U Decision Rule: If c2 > 12.592, reject H0, otherwise, do not reject H0 Here, c2 = 0.709 < c2 U = 12.592, so do not reject H0 Conclusion: there is not sufficient evidence that meal plan and class standing are related at a = .05 c2 a Reject H0 Do not reject H0 U=12.592 c2 0 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-25
  • 26. Wilcoxon Rank-Sum Test for Differences in 2 Medians  Test two independent population medians  Populations need not be normally distributed  Distribution free procedure  Used when only rank data is available  Must use normal approximation if either of the sample sizes is larger than 10 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-26
  • 27. Wilcoxon Rank-Sum Test: Small Samples  Can use when both n1 , n2 ≤ 10  Assign ranks to the combined n1 + n2 sample observations  If unequal sample sizes, let n1 refer to smaller-sized sample  Smallest value rank = 1, largest value rank = n1 + n2  Assign average rank for ties  Sum the ranks for each sample: T1 and T2 Statistics for Managers Using Microsoft  Obtain Excel, test 4e © statistic, 2004 T(from smaller sample) 1 Prentice-Hall, Inc. Chap 11-27
  • 28. Checking the Rankings  The sum of the rankings must satisfy the formula below  Can use this to verify the sums T1 and T2 T + T = n(n + 1) 1 2 2 where n = n1 + n2 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-28
  • 29. Wilcoxon Rank-Sum Test: Hypothesis and Decision Rule M1 = median of population 1; M2 = median of population 2 Test statistic = T1 (Sum of ranks from smaller sample) Two-Tail Test Left-Tail Test Right-Tail Test H0: M1 = M2 H1: M1 ¹ M2 H0: M1 £ M2 H1: M1 > M2 H0: M1 ³ M2 H1: M1 < M2 Reject Do Not Reject Reject T1L T1U Reject T1L Do Not Reject Do Not Reject Reject T1U Statistics Reject Hif for T< Managers TUsing 0 1 1L Microsoft or if Excel, T> T4e © 2004 1 1U Prentice-Hall, Inc. Chap 11-29 Reject H0 if T1 < T1L Reject H0 if T1 > T1U
  • 30. Wilcoxon Rank-Sum Test: Small Sample Example Sample data is collected on the capacity rates (% of capacity) for two factories. Are the median operating rates for two factories the same?  For factory A, the rates are 71, 82, 77, 94, 88  For factory B, the rates are 85, 82, 92, 97 Test for equality of the sample medians at the 0.05 significance level Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-30
  • 31. Wilcoxon Rank-Sum Test: Small Sample Example Capacity Rank Factory A Factory B Factory A Factory B 71 1 77 2 82 3.5 82 3.5 85 5 88 6 92 7 94 8 Ranked Capacity values: Statistics for Managers Using 97 9 Microsoft Excel, 4e © 2004 Rank Sums: 20.5 24.5 Prentice-Hall, Inc. Chap 11-31 Tie in 3rd and 4th places (continued)
  • 32. Wilcoxon Rank-Sum Test: Small Sample Example (continued) Factory B has the smaller sample size, so the test statistic is the sum of the Factory B ranks: T1 = 24.5 The sample sizes are: n1 = 4 (factory B) n2 = 5 (factory A) Statistics for Managers Using Microsoft Excel, 4e © The 2004 level of significance is α = .05 Prentice-Hall, Inc. Chap 11-32
  • 33. Wilcoxon Rank-Sum Test: Small Sample Example n2 a n1 One- Tailed (continued) Two- Tailed 4 5 4 5 .05 .10 12, 28 19, 36 .025 .05 11, 29 17, 38 .01 .02 10, 30 16, 39 .005 .01 --, -- 15, 40 6  Lower and Upper Critical Values for T1 from Appendix table E.8: Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. T1L = 11 and T1U Chap = 29 11-33
  • 34. Wilcoxon Rank-Sum Test: Small Sample Solution  a = .05  n1 = 4 , n2 = 5 Two-Tail Test H0: M1 = M2 H1: M1 ¹ M2 Do Not Reject Reject Reject T1L=11 T1U=29 (continued) Do not reject at a = 0.05 Statistics Reject Hif for T< Managers T=11 Using 0 1 1LMicrosoft or if Excel, T> T=4e 29 © 2004 1 1UPrentice-Hall, Inc. Chap 11-34 Test Statistic (Sum of ranks from smaller sample): T1 = 24.5 Decision: Conclusion: There is not enough evidence that medians are not equal.
  • 35. Wilcoxon Rank-Sum Test (Large Sample)  For large samples, the test statistic Tis 1 approximately normal with mean μ T1 and standard deviation σ T1 : μ = n1(n + 1) T1 2 σ = n1n2 (n + 1) T1 12  Must use the normal approximation if either n1 or n2 > 10  Can use the normal approximation for small samples  Assign n1 to be the smaller of the two sample sizes Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-35
  • 36. Wilcoxon Rank-Sum Test (Large Sample)  The Z test statistic is T - μ 1 T σ T 1 1 Z =  Where Z approximately follows a standardized normal distribution (continued) Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-36
  • 37. Wilcoxon Rank-Sum Test: Normal Approximation Example Use the setting of the prior example: The sample sizes were: n1 = 4 (factory B) n2 = 5 (factory A) The level of significance was α = .05 The test statistic was T1 = 24.5 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-37
  • 38. Wilcoxon Rank-Sum Test: Normal Approximation Example 20 μ = n1(n + 1) = 4(9 + 1) = T1 2 2 σ = n1n2 (n + 1) = 4(5)(9 + 1) = T1 12 12  The test statistic is 2.739 (continued) 1.64 24.5 20 - 1 T = - = 2.739 T μ σ Z T 1 1 =  Z = 1.64 is not greater than the critical Z value of 1.96 (for α = .05) so we do not reject H0 – there is not sufficient evidence that the medians are not equal Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-38
  • 39. Kruskal-Wallis Rank Test  Tests the equality of more than 2 population medians  Assumptions:  The samples are random and independent  variables have a continuous distribution  the data can be ranked  populations have the same variability  populations have the same shape Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-39
  • 40. Kruskal-Wallis Test Procedure  Obtain relative rankings for each value  In event of tie, each of the tied values gets the average rank  Sum the rankings for data from each of the c groups  Compute the H test statistic Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-40
  • 41. Kruskal-Wallis Test Procedure  The Kruskal-Wallis H test statistic: (with c – 1 degrees of freedom) ù 2 j - + 3(n 1) T n é H 12 = å= n(n 1) c j 1 j ú úû ê êë + where: n = sum of sample sizes in all samples c = Number of samples Tj = Sum of ranks in the jth sample nj = Size of the jth sample (continued) Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-41
  • 42. Kruskal-Wallis Test Procedure  Complete the test by comparing the calculated H value to a critical c2 value from the chi-square distribution with c – 1 degrees of freedom  Decision rule (continued)  Reject H0 if test statistic H > c2 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-42 U  Otherwise do not reject H0 c2 c2 U 0 a Reject H0 Do not reject H0
  • 43. Kruskal-Wallis Example  Do different departments have different class sizes? Class size (Math, M) Class size (English, E) Class size (History, H) 23 45 54 78 66 55 60 72 45 70 30 40 18 34 44 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-43
  • 44. Kruskal-Wallis Example  Do different departments have different class sizes? Class size (Math, M) Ranking Class size (English, E) Ranking Class size (History, H) Ranking 23 41 54 78 66 269 15 12 55 60 72 45 70 10 11 14 8 13 30 40 18 34 44 35147 S = 44 S = 56 S = 20 Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-44
  • 45. Kruskal-Wallis Example H : Median Median Median 0 M E H = = H : Not all population Medians are equal A  The H statistic is (continued) 3(15 1) 6.72 - + ù ú úû 2 2 2 20 5 3(n 1) 56 + + 5 R n 2j = å= j 1 j 44 5 é H 12 n(n + 1) 12 c 15(15 1) ù = + - úû ê êë é êë ö ÷ ÷ø æ ç çè + = Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-45
  • 46. Kruskal-Wallis Example  Compare H = 6.72 to the critical value from the chi-square distribution for 5 – 1 = 4 degrees of freedom and a = .05: 4877 . 9 2U c = Since H = 6.72 < 4877 . 9 2U c = do not reject H0 (continued) There is not sufficient evidence to reject that the population medians are all equal Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-46
  • 47. Chapter Summary  Developed and applied the c2 test for the difference between two proportions  Developed and applied the c2 test for differences in more than two proportions  Examined the c2 test for independence  Used the Wilcoxon rank sum test for two population medians  Small Samples  Large sample Z approximation  Applied the Kruskal-Wallis H-test for multiple population medians Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-47