This action might not be possible to undo. Are you sure you want to continue?

**COMPLETE BUSINESS STATISTICS
**

by AMIR D. ACZEL & JAYAVEL SOUNDERPANDIAN 6th edition.

14-2

Chapter 14

Nonparametric Methods and Chi-Square Tests

14-3

**14 Nonparametric Methods and ChiSquare Tests (1)
**

• Using Statistics • The Sign Test • The Runs Test - A Test for Randomness • The Mann-Whitney U Test • The Wilcoxon Signed-Rank Test • The Kruskal-Wallis Test - A Nonparametric

Alternative to One-Way ANOVA

14-4

**14 Nonparametric Methods and ChiSquare Tests (2)
**

• The Friedman Test for a Randomized Block

Design • The Spearman Rank Correlation Coefficient • A Chi-Square Test for Goodness of Fit • Contingency Table Analysis - A Chi-Square Test for Independence • A Chi-Square Test for Equality of Proportions

14-5

**14 LEARNING OBJECTIVES
**

After reading this chapter you should be able to: • Differentiate between parametric and nonparametric tests • Conduct a sign test to compare population means • Conduct a runs test to detect abnormal sequences • Conduct a Mann-Whitney test for comparing population distributions • Conduct a Wilkinson’s test for paired differences

14-6

**14 LEARNING OBJECTIVES (2)
**

After reading this chapter you should be able to:

**• Conduct a Friedman’s test for randomized
**

block designs • Compute Spearman’s Rank Correlation Coefficient for ordinal data • Conduct a chi-square test for goodness-of-fit • Conduct a chi-square test for independence • Conduct a chi-square test for equality of proportions

14-7

14-1 Using Statistics (Parametric Tests)

• Parametric Methods

Inferences based on assumptions about the nature of the population distribution

Usually: population is normal

Types of tests

z-test or t-test » Comparing two population means or proportions » Testing value of population mean or proportion ANOVA » Testing equality of several population means

14-8

Nonparametric Tests

• Nonparametric Tests

Distribution-free methods making no assumptions about the population distribution Types of tests

Sign tests

» » » » »

Sign Test: Comparing paired observations McNemar Test: Comparing qualitative variables Cox and Stuart Test: Detecting trend

Runs tests

Runs Test: Detecting randomness Wald-Wolfowitz Test: Comparing two distributions

14-9

Nonparametric Tests (Continued)

• Nonparametric Tests

Ranks tests

• • •

Mann-Whitney U Test: Comparing two populations Wilcoxon Signed-Rank Test: Paired comparisons Comparing several populations: ANOVA with ranks Kruskal-Wallis Test Friedman Test: Repeated measures

**Spearman Rank Correlation Coefficient Chi-Square Tests
**

• • •

Goodness of Fit Testing for independence: Contingency Table Analysis Equality of Proportions

14-10

Nonparametric Tests (Continued)

**• Deal with enumerative (frequency counts)
**

data. • Do not deal with specific population parameters, such as the mean or standard deviation. • Do not require assumptions about specific population distributions (in particular, the normality assumption).

14-11

14-2 Sign Test

**• Comparing paired observations
**

Paired observations: X and Y p = P(X > Y)

Two-tailed test Right-tailed test Left-tailed test Test statistic: H0: p = 0.50 H1: p ≠ 0.50 H0: p ≤ 0.50 H1: p > 0.50 H0: p ≥ 0.50 H1: p < 0.50 T = Number of + signs

14-12

Sign Test Decision Rule

**• Small Sample: Binomial Test
**

For a two-tailed test, find a critical point corresponding as closely as possible to α/2 (C1) and define C2 as n-C1. Reject null hypothesis if T ≤ C1or T ≥ C2. For a right-tailed test, reject H0 if T ≥ C, where C is the value of the binomial distribution with parameters n and p = 0.50 such that the sum of the probabilities of all values less than or equal to C is as close as possible to the chosen level of significance, α. For a left-tailed test, reject H0 if T ≥ C, where C is defined as above.

14-13

Example 14-1

CEO Before After CEO Before After 11 33 44 22 55 55 33 22 33 44 22 44 55 44 44 66 22 33 77 11 22 88 55 44 99 44 55 10 10 55 44 11 11 33 44 12 12 22 55 13 13 22 55 14 14 22 33 15 15 11 22 16 16 33 22 17 17 44 55 Sign Sign 11 00 11 11 00 11 11 -1 -1 11 -1 -1 11 11 11 11 11 -1 -1 11 ++ ++ ++ ++ ++ -++ -++ ++ ++ ++ ++ -++

Cumulative Binomial Probabilities (n=15, p=0.5) x F(x) 0 0.00003 1 0.00049 2 0.00369 3 0.01758 4 0.05923 5 0.15088 6 0.30362 7 0.50000 8 0.69638 9 0.84912 10 0.94077 11 0.98242 12 0.99631 13 0.99951 14 0.99997 15 1.00000

n = 15 T = 12 α ≈ 0.025 C1 C1=3 C2 = 15-3 = 12 H0 rejected, since 0 T ≥ C2

14-14

**Example 14-1- Using the Template
**

H0:: p = 0.5 H0 p = 0.5 H1:: p ≠ 0.5 H1 p ≠ 0.5 Test Statistic: T = 12 Test Statistic: T = 12 p-value = 0.0352. p-value = 0.0352. For α = 0.05, the null hypothesis For α = 0.05, the null hypothesis is rejected since 0.0352 < 0.05. is rejected since 0.0352 < 0.05. Thus one can conclude that there Thus one can conclude that there is a change in attitude toward a is a change in attitude toward a CEO following the award of an CEO following the award of an MBA degree. MBA degree.

14-15

**14-3 The Runs Test - A Test for Randomness
**

A run is sequence of like elements that are preceded and followed A run is aasequence of like elements that are preceded and followed by different elements or no element at all. by different elements or no element at all.

Case 1: S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E Case 1: S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E|S|E Case 2: SSSSSSSSSS|EEEEEEEEEE Case 2: SSSSSSSSSS|EEEEEEEEEE Case 3: S|EE|SS|EEE|S|E|SS|E|S|EE|SSS|E Case 3: S|EE|SS|EEE|S|E|SS|E|S|EE|SSS|E R = 20 Apparently nonrandom ::R = 20 Apparently nonrandom :R = 2 Apparently nonrandom R = 2 Apparently nonrandom : R = 12 Perhaps random ::R = 12 Perhaps random

A two-tailed hypothesis test for randomness: A two-tailed hypothesis test for randomness: H: Observations are generated randomly H00:Observations are generated randomly H: Observations are not generated randomly H11:Observations are not generated randomly TestStatistic: Statistic: Test R=Number of Runs R=Number of Runs RejectH 0at level α if R ≤ C1 or R ≥ C2, as given in Table 8, with total tail H at level α if R ≤ C1 or R ≥ C2, as given in Table 8, with total tail Reject 0 probability P(R ≤ C) + P(R ≥ C) = α. probability P(R ≤ C11)+ P(R ≥ C22)= α.

14-16

**Runs Test: Examples
**

Table 8: (n1,n2) 1 2 11 12 Number of Runs (r) 13 14 15 16 17 18 19 20

. . .

(10,10)

0.586 0.758 0.872 0.949 0.981 0.996 0.999 1.000 1.000 1.000 0.586 0.758 0.872 0.949 0.981 0.996 0.999 1.000 1.000 1.000

Case 1: n = 10 n = 10 R= 20 p-value≈0 Case 1: n11 = 10 n22= 10 R= 20 p-value≈0 Case 2: n = 10 n = 10 R = 2 p-value ≈0 Case 2: n11 = 10 n22= 10 R = 2 p-value ≈0 Case 3: n = 10 n = 10 R= 12 Case 3: n11 = 10 n22= 10 R= 12 p-value = 2[P(R ≥ 12)] = 2[1−F(11)] p-value = 2[P(R ≥ 12)] = 2[1−F(11)] = (2)(1-0.586) = (2)(0.414) = 0.828 = (2)(1-0.586) = (2)(0.414) = 0.828 H not rejected H00not rejected

14-17

**Large-Sample Runs Test: Using the Normal Approximation
**

The mean of the normal distribution of the number of runs: 2n n E ( R) = +1 n +n

1 2 1 2

The standard deviation:

σ =

R

2n n (2n n − n − n ) ( n + n ) ( n + n − 1)

1 2 1 2 1 2 2 1 2 1 2

The standard normal test statistic: z= R − E ( R)

σ

R

14-18

**Large-Sample Runs Test: Example 14-2
**

Example 14-2: n1 = 27 n2 = 26 R = 15

E ( R) = 2n n 1 2 + 1 = (2)( 27)( 26) + 1 = 26.49 + 1 = 27.49 ( 27 + 26) n +n 1 2 2 n n ( 2n n − n − n ) 1 2 1 2 1 2 = ( 2)(27)(26)((2)( 27)( 26) − 27 − 26)) σ = R ( n + n ) 2 ( n + n − 1) ( 27 + 26) 2 ( 27 + 26 − 1) 1 2 1 2 1896804 = 12.986 = 3.604 146068 R − E ( R ) 15 − 27.49 z= = = −3.47 3.604 σ R =

p - value = 2(1 - .9997) = 0.0006

H0 should be rejected at any common level of significance.

14-19

**Large-Sample Runs Test: Example 14-2 – Using the Template
**

Note: Note: The computed The computed p-value using the p-value using the template is 0.0005 template is 0.0005 as compared to as compared to the manually the manually computed value of computed value of 0.0006. The value 0.0006. The value of 0.0005 is more of 0.0005 is more accurate. accurate. Reject the null Reject the null hypothesis that hypothesis that the residuals are the residuals are random. random.

14-20

**Using the Runs Test to Compare Two Population Distributions (Means): the Wald-Wolfowitz Test
**

The null and alternative hypotheses for the Wald-Wolfowitz test: The null and alternative hypotheses for the Wald-Wolfowitz test: H : The two populations have the same distribution H00:The two populations have the same distribution H : The two populations have different distributions H11:The two populations have different distributions Thetest statistic: test statistic: The R = Number of Runs in the sequence of samples, when R = Number of Runs in the sequence of samples, when the data from both samples have been sorted the data from both samples have been sorted

Example 14-3: 14-

Salesperson A: 35 44 39 50 48 29 60 75 49 66 Salesperson B: 17 23 13 24 33 21 18 16 32

14-21

**The Wald-Wolfowitz Test: Example 14-3
**

Sales Sales 35 35 44 44 39 39 48 48 60 60 75 75 49 49 66 66 17 17 23 23 13 13 24 24 33 33 21 21 18 18 16 16 32 32 Sales Sales Person Person A A A A A A A A A A A A A A A A B B B B B B B B B B B B B B B B B B Sales Sales (Sorted) (Sorted) 13 13 16 16 17 17 21 21 24 24 29 29 32 32 33 33 35 35 39 39 44 44 48 48 49 49 50 50 60 60 66 66 75 75 Sales Sales Person Person (Sorted) (Sorted) B B B B B B B B B B A A B B B B A A A A A A A A A A A A A A A A A A Runs Runs

**n = 10 n = 9 R= 4 n11 = 10 n22= 9 R= 4 p-value = 2[P(R ≤ 4)] = 0.002 p-value = 2[P(R ≤ 4)] = 0.002 H may be rejected H00may be rejected
**

Table (n1,n2) 2

11 22 33

. . .

Number of Runs (r) 3 4 5

(9,10) 0.000 0.000 0.002 0.004 ...

44

14-22

Ranks Tests

Ranks tests •• Ranks tests

Mann-Whitney U Test: Comparing two Mann-Whitney U Test: Comparing two populations populations Wilcoxon Signed-Rank Test: Paired Wilcoxon Signed-Rank Test: Paired comparisons comparisons Comparing several populations: ANOVA with Comparing several populations: ANOVA with ranks ranks Kruskal-Wallis Test •• Kruskal-Wallis Test Friedman Test: Repeated measures •• Friedman Test: Repeated measures

14-23

**14-4 The Mann-Whitney U Test (Comparing Two Populations)
**

The null and alternative hypotheses: H0: The distributions of two populations are identical H1: The two population distributions are not identical The Mann-Whitney U statistic: n ( n + 1) R 1 = ∑ Ranks from sample 1 U = n1 n 2 + 1 1 − R1 2 where n1 is the sample size from population 1 and n2 is the sample size from population 2. nn n n (n + n2 + 1) E [U ] = 1 2 σU = 1 2 1 2 12 U − E [U ] The large - sample test statistic: z =

σU

14-24

**The Mann-Whitney U Test: Example 14-4
**

Model Model A A A A A A A A A A A A B B B B B B B B B B B B Time Time 35 35 38 38 40 40 42 42 41 41 36 36 29 29 27 27 30 30 33 33 39 39 37 37 Rank Rank 55 88 10 10 12 12 11 11 66 22 11 33 44 99 77 Rank Rank Sum Sum

U = n1 n 2 + = (6)(6) + =5 2 n1 ( n1 + 1) 2 (6)(6 + 1) − R1

− 52

52 52

26 26

Cumulative Distribution Function of the MannWhitney U Statistic n2=6 n1=6 u . . . 4 0.0130 P(u≤5) 5 0.0206 6 0.0325 . . .

14-25

**Example 14-5: Large-Sample Mann-Whitney U Test
**

Score Rank Score Rank Score Program Rank Sum Score Program Rank Sum 85 1 20.0 20.0 85 1 20.0 20.0 87 1 21.0 41.0 87 1 21.0 41.0 92 1 27.0 68.0 92 1 27.0 68.0 98 1 30.0 98.0 98 1 30.0 98.0 90 1 26.0 124.0 90 1 26.0 124.0 88 1 23.0 147.0 88 1 23.0 147.0 75 1 17.0 164.0 75 1 17.0 164.0 72 1 13.5 177.5 72 1 13.5 177.5 60 1 6.5 184.0 60 1 6.5 184.0 93 1 28.0 212.0 93 1 28.0 212.0 88 1 23.0 235.0 88 1 23.0 235.0 89 1 25.0 260.0 89 1 25.0 260.0 96 1 29.0 289.0 96 1 29.0 289.0 73 1 15.0 304.0 73 1 15.0 304.0 62 1 8.5 312.5 62 1 8.5 312.5 Score Rank Score Rank Score Program Rank Sum Score Program Rank Sum 65 2 10.0 10.0 65 2 10.0 10.0 57 2 4.0 14.0 57 2 4.0 14.0 74 2 16.0 30.0 74 2 16.0 30.0 43 2 2.0 32.0 43 2 2.0 32.0 39 2 1.0 33.0 39 2 1.0 33.0 88 2 23.0 56.0 88 2 23.0 56.0 62 2 8.5 64.5 62 2 8.5 64.5 69 2 11.0 75.5 69 2 11.0 75.5 70 2 12.0 87.5 70 2 12.0 87.5 72 2 13.5 101.0 72 2 13.5 101.0 59 2 5.0 106.0 59 2 5.0 106.0 60 2 6.5 112.5 60 2 6.5 112.5 80 2 18.0 130.5 80 2 18.0 130.5 83 2 19.0 149.5 83 2 19.0 149.5 50 2 3.0 152.5 50 2 3.0 152.5

Since the test statistic is = -3.32, Since the test statistic is zz= -3.32, the p-value ≈ 0.0005, and H is rejected. the p-value ≈ 0.0005, and H00is rejected.

− R1 2 (15)(15 + 1) = (15)(15) + − 312 .5 = 32 .5 2 n1n2 (15)(15) E [U ] = = = 112.5 2 2 n1n2 ( n1 + n2 + 1) σU = 12 (15)(15)(15 + 15 + 1) = = 24 .109 12 32 .5 − 112 .5 U − E [U ] = −3.32 z = = 24 .109 σU

U = n1n2 +

n1 ( n1 + 1)

14-26

Example 14-5: Large-Sample Mann-Whitney U Test – Using the Template

Since the test Since the test statistic is z = -3.32, statistic is z = -3.32, the p-value ≈ 0.0005, the pp-value ≈ 0.0005, and H0 is rejected. and H0 is rejected. That is, the LC That is, the LC (Learning Curve) (Learning Curve) program is more program is more effective. effective.

14-27

**14-5 The Wilcoxon Signed-Ranks Test (Paired Ranks)
**

The null and alternative hypotheses: The null and alternative hypotheses: H: The median difference between populations are and is zero H00:The median difference between populations are 11and 22is zero H: The median difference between populations are and is not zero H11:The median difference between populations are 11and 22is not zero Find the difference between the ranks for each pair, D = -x2 and then rank the Find the difference between the ranks for each pair, D = xx1-x2, ,and then rank the 1 absolutevalues of the differences. absolute values of the differences. The Wilcoxon T statistic is the smaller of the sums of the positive ranks and the sum The Wilcoxon T statistic is the smaller of the sums of the positive ranks and the sum of the negative ranks: of the negative ranks:

T = min( ∑ ( + ), ∑ ( − ) )

For small samples, left-tailed test is used, using the values in Appendix C, Table 10. For small samples, aaleft-tailed test is used, using the values in Appendix C, Table 10.

E [T ] =

n ( n + 1) 4

z=

σT =

T − E[T ]

n ( n + 1)( 2 n + 1) 24

The large-sample test statistic: The large-sample test statistic:

σT

14-28

Example 14-6

Sold Sold Sold Sold (1) (2) (1) (2) 56 56 48 48 100 100 85 85 22 22 44 44 35 35 28 28 52 52 77 77 89 89 10 10 65 65 90 90 70 70 33 33 40 40 70 70 60 60 70 70 88 40 40 45 45 77 60 60 70 70 90 90 10 10 85 85 61 61 40 40 26 26 Rank Rank Rank Rank Rank Rank D=x1-x ABS(D) ABS(D) (D>0) (D<0) D=x1-x2 2 ABS(D)ABS(D) (D>0) (D<0) 16 16 -22 -22 40 40 15 15 14 14 44 -10 -10 21 21 -8 -8 77 -1 -1 00 -20 -20 29 29 30 30 77 16 16 22 22 40 40 15 15 14 14 44 10 10 21 21 88 77 11 ** 20 20 29 29 30 30 77 9.0 9.0 12.0 12.0 15.0 15.0 8.0 8.0 7.0 7.0 2.0 2.0 6.0 6.0 11.0 11.0 5.0 5.0 3.5 3.5 1.0 1.0 ** 10.0 10.0 13.0 13.0 14.0 14.0 3.5 3.5 Sum: Sum: 9.0 9.0 0.0 0.0 15.0 15.0 8.0 8.0 7.0 7.0 2.0 2.0 0.0 0.0 11.0 11.0 0.0 0.0 3.5 3.5 0.0 0.0 ** 0.0 0.0 13.0 13.0 14.0 14.0 3.5 3.5 86 86 00 12 12 00 00 00 00 66 00 55 00 11 ** 10 10 00 00 00 34 34

T=34 T=34 P=0.05 P=0.05 P=0.025 P=0.025 P=0.01 P=0.01 P=0.005 P=0.005

n=15 n=15 30 30 25 25 20 20 16 16

H is not rejected (Note the H00is not rejected (Note the arithmetic error in the text for arithmetic error in the text for store 13) store 13)

14-29

Example 14-7

Hourly Hourly Messages Messages 151 151 144 144 123 123 178 178 105 105 112 112 140 140 167 167 177 177 185 185 129 129 160 160 110 110 170 170 198 198 165 165 109 109 118 118 155 155 102 102 164 164 180 180 139 139 166 166 82 82 Rank Rank Rank Rank Rank Rank Md D=x1-x2 ABS(D) ABS(D) (D>0) (D<0) Md0 0 D=x1-x2 ABS(D) ABS(D) (D>0) (D<0) 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 2 2 -5 -5 -26 -26 29 29 -44 -44 -37 -37 -9 -9 18 18 28 28 36 36 -20 -20 11 11 -39 -39 21 21 49 49 16 16 -40 -40 -31 -31 6 6 -47 -47 15 15 31 31 -10 -10 17 17 33 33 2 2 5 5 26 26 29 29 44 44 37 37 9 9 18 18 28 28 36 36 20 20 11 11 39 39 21 21 49 49 16 16 40 40 31 31 6 6 47 47 15 15 31 31 10 10 17 17 33 33 1.0 1.0 2.0 2.0 13.0 13.0 15.0 15.0 23.0 23.0 20.0 20.0 4.0 4.0 10.0 10.0 14.0 14.0 19.0 19.0 11.0 11.0 6.0 6.0 21.0 21.0 12.0 12.0 25.0 25.0 8.0 8.0 22.0 22.0 16.5 16.5 3.0 3.0 24.0 24.0 7.0 7.0 16.5 16.5 5.0 5.0 9.0 9.0 18.0 18.0 Sum: Sum: 1.0 1.0 0.0 0.0 0.0 0.0 15.0 15.0 0.0 0.0 0.0 0.0 0.0 0.0 10.0 10.0 14.0 14.0 19.0 19.0 0.0 0.0 6.0 6.0 0.0 0.0 12.0 12.0 25.0 25.0 8.0 8.0 0.0 0.0 0.0 0.0 3.0 3.0 0.0 0.0 7.0 7.0 16.5 16.5 0.0 0.0 9.0 9.0 18.0 18.0 163.5 163.5 0.0 0.0 2.0 2.0 13.0 13.0 0.0 0.0 23.0 23.0 20.0 20.0 4.0 4.0 0.0 0.0 0.0 0.0 0.0 0.0 11.0 11.0 0.0 0.0 21.0 21.0 0.0 0.0 0.0 0.0 0.0 0.0 22.0 22.0 16.5 16.5 0.0 0.0 24.0 24.0 0.0 0.0 0.0 0.0 5.0 5.0 0.0 0.0 0.0 0.0 161.5 161.5

E[T ] =

n ( n + 1)

σT =

= =

(25)(25 + 1) = = 162.5 4 4 n ( n + 1)( 2 n + 1)

24 25( 25 + 1)(( 2 )( 25) + 1) 24 33150

= 37 .165 24 The large - sample test statistic: z = T − E[T ]

= 0.027 37 .165 H 0 cannot be rejected

=

σT 163.5 − 162 .5

14-30

**Example 14-7 using the Template
**

Note 1: You should enter Note 1: You should enter the claimed value of the the claimed value of the mean (median) in every mean (median) in every used row of the second used row of the second column of data. In this case column of data. In this case it is 149. it is 149. Note 2: In order for the Note 2: In order for the large sample large sample approximations to be approximations to be computed you will need to computed you will need to change n > 25 to n >= 25 change n > 25 to n >= 25 in cells M13 and M14. in cells M13 and M14.

14-31

**14-6 The Kruskal-Wallis Test - A Nonparametric Alternative to One-Way ANOVA
**

The Kruskal-Wallis hypothesis test: The Kruskal-Wallis hypothesis test: H : All k populations have the same distribution H00:All k populations have the same distribution H : Not all k populations have the same distribution H11:Not all k populations have the same distribution The Kruskal-Wallis test statistic: The Kruskal-Wallis test statistic:

H=

2 12 ⎛ k Rj ⎞ − 3( n + 1) n( n + 1) ⎜ ∑ n j ⎟ ⎝ j =1 ⎠

If each n > 5, then H is approximately distributed as χ2 If each nj j> 5, then H is approximately distributed as aaχ2..

14-32

**Example 14-8: The Kruskal-Wallis Test
**

Software Time Rank Group RankSum Software Time Rank Group RankSum 45 14 14 11 90 11 45 90 38 10 10 22 56 11 38 56 56 16 16 33 25 11 56 25 60 17 17 11 60 47 15 15 11 47 65 18 18 11 65 30 22 30 88 40 11 11 22 40 28 22 28 77 44 13 13 22 44 25 22 25 55 42 12 12 22 42 22 33 22 44 19 33 19 33 15 33 15 11 31 33 31 99 27 33 27 66 17 33 17 22

**⎛ k R2 ⎞ j H= ⎜ j∑1 ⎟ − 3( n + 1) = nj ⎠ n ( n + 1) ⎝ 12 ⎛ 902 562 252 ⎞ = ⎜ + 6 + 6 ⎟ − 3(18 + 1) 18(18 + 1) ⎝ 6 ⎠ 12 ⎞ ⎛ 11861⎞ ⎛ =⎜ ⎟⎜ ⎟ − 57 ⎝ 342⎠ ⎝ 6 ⎠
**

12 = 12.3625

χ2(2,0.005)=10.5966, so H0 is rejected.

14-33

Example 14-8: The Kruskal-Wallis Test – Using the Template

14-34

**Further Analysis (Pairwise Comparisons of Average Ranks)
**

If the null hypothesis in the Kruskal-Wallis test is rejected, then we may wish, If the null hypothesis in the Kruskal-Wallis test is rejected, then we may wish, in addition, compare each pair of populations to determine which are different in addition, compare each pair of populations to determine which are different and which are the same. and which are the same.

The pairwise comparison test statistic: D = Ri − R j where R i is the mean of the ranks of the observations from population i. The critical point for the paired comparisons: ⎡ n(n + 1) ⎤⎛ 1 1 ⎞ 2 C KW = ( χ α , k −1 ) ⎢ ⎜ + ⎟ ⎣ 12 ⎥⎝ ni n j ⎠ ⎦ Reject if D > C KW

14-35

**Pairwise Comparisons: Example 14-8
**

Critical Point: n(n + 1) ⎤⎛ 1 1 ⎞ 2 = ( χ α ,k −1 ) ⎡ ⎢ 12 ⎥⎜ ni + n j ⎟ ⎠ ⎣ ⎦⎝ 18(18 + 1) ⎛ 1 1⎞ = ( 9.21034) ⎜ + ⎟ 12 ⎝ 6 6⎠ = 87.49823 = 9.35 D1,2 = 15 − 9.33 = 5.67 D1,3 = 15 − 4.17 = 10.83 *** D2,3 = 9.33 − 4.17 = 516 .

C KW

90 = 15 6 56 R2 = = 9.33 6 25 R3 = = 4.17 6 R1 =

14-36

**14-7 The Friedman Test for a Randomized Block Design
**

The Friedman test is a nonparametric version of the randomized block design The Friedman test is a nonparametric version of the randomized block design ANOVA. Sometimes this design is referred to as a two-way ANOVA with one item ANOVA. Sometimes this design is referred to as a two-way ANOVA with one item per cell because it is possible to view the blocks as one factor and the treatment levels per cell because it is possible to view the blocks as one factor and the treatment levels as the other factor. The test is based on ranks. as the other factor. The test is based on ranks.

The Friedman hypothesis test: The Friedman hypothesis test: H: The distributions of the k treatment populations are identical H00:The distributions of the k treatment populations are identical H: Not all k distribution are identical H 1:Not all k distribution are identical

1

The Friedman test statistic: The Friedman test statistic:

χ =

2

12 ∑ R − 3n( k + 1) nk (k + 1)

k 2 j =1 j

The degrees of freedom for the chi-square distribution is (k – 1). The degrees of freedom for the chi-square distribution is (k – 1).

14-37

**Example 14-10 – using the Template
**

Note: The p-value Note: The p-value is small relative to is small relative to a significance level a significance level of α = 0.05, so one of α = 0.05, so one should conclude should conclude that there is that there is evidence that not evidence that not all three lowall three lowbudget cruise lines budget cruise lines are equally are equally preferred by the preferred by the frequent cruiser frequent cruiser population population

14-38

**14-8 The Spearman Rank Correlation Coefficient
**

The Spearman Rank Correlation Coefficient is the simple correlation coefficient The Spearman Rank Correlation Coefficient is the simple correlation coefficient calculated from variables converted to ranks from their original values. calculated from variables converted to ranks from their original values.

The Spearman Rank Correlation Coefficient (assuming no ties): n 2 6 ∑ di rs = 1 − i =1 where d = R(x ) - R(y ) 2 i i i n( n − 1) Null and alternative hypotheses: H 0: ρ s = 0 H1: ρ s ≠ 0 Critical values for small sample tests from Appendix C, Table 11 Large sample test statistic: z = rs ( n − 1)

14-39

**Spearman Rank Correlation Coefficient: Example 14-11
**

MMI S&P100 R-MMI R-S&P MMI S&P100 R-MMI R-S&P 220 151 151 220 77 66 218 150 150 218 55 55 216 148 148 216 33 33 217 149 149 217 44 44 215 147 147 215 22 22 213 146 146 213 11 11 219 152 219 152 66 77 236 165 165 10 236 99 10 237 162 162 10 237 10 99 235 161 161 235 88 88 Diff Diffsq Diff Diffsq 11 11 00 00 00 00 00 00 00 00 00 00 -1 -1 11 -1 -1 11 11 11 00 00 Sum: Sum: 44

Table 11: α=0.005 n . . . 7 -----8 0.881 9 0.833 10 0.794 11 0.818 . . .

n 2 6 ∑ di (6)(4) 24 =1 rs = 1 − i 2 = 1= 1= 0.9758 > 0.794 H rejected 990 0 n ( n − 1) (10)(102 - 1)

14-40

**Spearman Rank Correlation Coefficient: Example 14-11 Using the Template
**

Note: Note: The p-values in The p-values in the range the range J15:J17 will J15:J17 will appear only if appear only if the sample size the sample size is large (n > 30) is large (n > 30)

14-41

**14-9 A Chi-Square Test for Goodness of Fit
**

Steps in a chi-square analysis: Steps in a chi-square analysis:

Formulate null and alternative hypotheses Formulate null and alternative hypotheses Compute frequencies of occurrence that would be expected if the Compute frequencies of occurrence that would be expected if the null hypothesis were true expected cell counts null hypothesis were true --expected cell counts Note actual, observed cell counts Note actual, observed cell counts Use differences between expected and actual cell counts to find chiUse differences between expected and actual cell counts to find chisquare statistic: square statistic: 2 k

χ2 = ∑

i =1

( Oi − Ei ) Ei

Compare chi-statistic with critical values from the chi-square Compare chi-statistic with critical values from the chi-square distribution (with k-1 degrees of freedom) to test the null hypothesis distribution (with k-1 degrees of freedom) to test the null hypothesis

14-42

**Example 14-12: Goodness-of-Fit Test for the Multinomial Distribution
**

The null and alternative hypotheses: The null and alternative hypotheses: H: The probabilities of occurrence of events E, E...,E are given by H00:The probabilities of occurrence of events E11,E22...,Ekare given by k p,p ,...,p p11,p2,...,pk 2 k H: The probabilities of the k events are not as specified in the null H11:The probabilities of the k events are not as specified in the null hypothesis hypothesis

Assuming equal probabilities, p1= p2 = p3 = p4 =0.25 and n=80 Preference Tan Brown Maroon Black Total Observed 12 40 8 20 80 Expected(np) 20 20 20 20 80 (O-E) -8 20 -12 0 0

χ

2 k ( Oi − E i ) = ∑ i =1 Ei 2 = ( −8 ) 20 2 + ( 20 ) 20 2 + ( −12 ) 20 2 + ( 0) 2 = 30.4 > χ 2 ( 0.01, 3) = 11.3449 20

H 0 is rejected at the 0.01 level.

14-43

Example 14-12: Goodness-of-Fit Test for the Multinomial Distribution using the Template

Note: the p-value is 0.0000, so we can reject the null hypothesis at any α level.

14-44

**Goodness-of-Fit for the Normal Distribution: Example 14-13
**

1. Use the table of the standard normal distribution to determine an appropriate partition of the standard normal distribution which gives ranges with approximately equal percentages.

p(z<-1) p(-1<z<-0.44) p(-0.44<z<0) p(0<z<0.44) p(0.44<z<14) p(z>1) = 0.1587 = 0.1713 = 0.1700 = 0.1700 = 0.1713 = 0.1587

Partitioning the Standard Normal Distribution

0.1700

0.4

0.1700 0.1713

0.1713

0.3

f(z)

0.2

0.1587

0.1587

0.1

0.0 -5 -1 0 -0.44 0.44 1 5

z

2. Given z boundaries, x boundaries can be determined from the inverse standard normal transformation: x = µ + σz = 125 + 40z. 3. Compare with the critical value of the χ2 distribution with k-3 degrees of freedom.

14-45

Example 14-13: Solution

O i i Oi i

11 22 33 44 55 66 14 14 20 20 16 16 19 19 16 16 15 15

15.87 15.87 17.13 17.13 17.00 17.00 17.00 17.00 17.13 17.13 15.87 15.87

E Ei i

O E (O Ei 22 (O Ei 22 E Oi i--Ei i (Oi i--Ei)) (Oi i--Ei))//Ei i

-1.87 -1.87 2.87 2.87 -1.00 -1.00 2.00 2.00 -1.13 -1.13 -0.87 -0.87 3.49690 3.49690 8.23691 8.23691 1.00000 1.00000 4.00000 4.00000 1.27690 1.27690 0.75690 0.75690 0.22035 0.22035 0.48085 0.48085 0.05882 0.05882 0.23529 0.23529 0.07454 0.07454 0.04769 0.04769

χ2 χ2::

1.11755 1.11755

χ2(0.10,k-3)= 6.5139 > 1.11755 ⇒ H0 is not rejected at the 0.10 level

14-46

Example 14-13: Solution using the Template

Note: p-value = 0.8002 > 0.01 ⇒ H0 is not rejected at the 0.10 level

14-47

**14-9 Contingency Table Analysis: A Chi-Square Test for Independence
**

First Classification Category

Second Classification Category 1 2 3 4 5 Column Total Row Total R1 R2 R3 R4 R5 n

1 O11 O21 O31 O41 O51 C1

2 O12 O22 O32 O42 O52 C2

3 O13 O23 O33 O43 O53 C3

4 O14 O24 O34 O44 O54 C4

5 O15 O25 O35 O45 O55 C5

14-48

**Contingency Table Analysis: A Chi-Square Test for Independence
**

A and B are independent if:P(A ∩ B) = P(A)×P(B). A and B are independent if:P(A ∩ B) = P(A)×P(B). If the first and second classification categories are independent:E = (Ri)(Cj)/n If the first and second classification categories are independent:Eijij= (Ri)(Cj)/n Null and alternative hypotheses: H0: The two classification variables are independent of each other H1: The two classification variables are not independent Chi-square test statistic for independence:

**( Oij − Eij ) 2 χ = ∑∑ Eij i =1 j =1
**

r c 2

Degrees of freedom: df=(r-1)(c-1) Expected cell count:

Eij =

Ri C j n

14-49

**Contingency Table Analysis: Example 14-14
**

Industry Type

Service Nonservice (Expected) (Expected) Total 42 18 60

(60*48/100)=28.8 (60*52/100)=31.2

χ2(0.01,(2-1)(2-1))=6.63490 H0 is rejected at the 0.01 level and it is concluded that the two variables are not independent.

Profit

(Expected)

Loss

(Expected)

6

(40*48/100)=19.2

34

(40*52/100)=20.8

40 100

Total

ij 11 12 21 22 O 42 18 6 34 E 28.8 31.2 19.2 20.8 O-E 13.2 -13.2 -13.2 13.2

48

(O-E)2 174.24 174.24 174.24 174.24 χ2: 29.0865

52

(O-E)2/E 6.0500 5.5846 9.0750 8.3769

2 Yates corrected χ for a 2x2 table: 2 Oij − Eij − 0.5 2 χ = ∑∑ Eij

(

)

14-50

**Contingency Table Analysis: Example 14-14 using the Template
**

Note: Note: When the When the contingency contingency table is a table is a 2x2, one 2x2, one should use should use the Yates the Yates correction. . correction.

Since p-value = 0.000, H is rejected at the 0.01 level and it is concluded that the two Since p-value = 0.000, H00is rejected at the 0.01 level and it is concluded that the two variables are not independent. variables are not independent.

14-51

**14-11 Chi-Square Test for Equality of Proportions
**

Tests of equality of proportions across several populations are also called Tests of equality of proportions across several populations are also called tests of homogeneity. tests of homogeneity.

In general, when we compare c populations (or r populations if they are arranged as rows rather than columns in the table), then the Null and alternative hypotheses: H0: p1 = p2 = p3 = … = pc H1: Not all pi, I = 1, 2, …, c, are equal Chi-square test statistic for equal proportions:

**( Oij − Eij ) 2 χ = ∑∑ Eij i =1 j =1
**

r c

2

Degrees of freedom: df = (r-1)(c-1) Expected cell count:

Eij =

Ri C j n

14-52

**14-11 Chi-Square Test for Equality of Proportions - Extension
**

The Median Test Here, the Null and alternative hypotheses are: H0: The c populations have the same median 0 H1: Not all c populations have the same median 1

14-53

**Chi-Square Test for the Median: Example 14-16 Using the Template
**

Note: The template was used to help compute the test statistic and the pvalue for the median test. First you must manually compute the number of values that are above the grand median and the number that is less than or equal to the grand median. Use these values in the template. See Table 14-16 in the text.

Since the p-value = 0.6703 is very large there is no evidence to reject the null hypothesis.

Sign up to vote on this title

UsefulNot useful- STATISTICS FOR BUSINESS - CHAP14 - Chi - Square Tests.pdfby Hoang Nguyen
- Extra Notes on Hypothesis Testing_V1-1 (Mike's Extra Notes on Hypothesis Testing [for Those Who Like Mike]Preview the Document)by Vivian Brooklyn Chen
- Inferences Based on a Single Sample Tests of Hypothesisby Anastasia
- Cross Tabsby idayamsuk333

- Non Parametric Test
- Chap 014
- Lecture1(1).pdf
- Hypothesis Test Steps 3
- SPSS Exact Tests
- Chapter 5
- Flowchart 2
- PASW Exact Tests
- Interpreting p Values
- Pertemuan 06 Baru-Uji Hipotesis Satu Populasi.pptx
- Ibm Spss Exact Tests
- 131_hypothesis_review_for_statII (Hypothesis Testing Summary Sheet Found on the Internet (Useful but Jumbled))
- STATISTICS FOR BUSINESS - CHAP14 - Chi - Square Tests.pdf
- Extra Notes on Hypothesis Testing_V1-1 (Mike's Extra Notes on Hypothesis Testing [for Those Who Like Mike]Preview the Document)
- Inferences Based on a Single Sample Tests of Hypothesis
- Cross Tabs
- Chapter 9
- ch2
- [Cyrus R. Mehta and Nitin R. Patel] SPSS Exact Tes(BookZZ.org)
- MIT15_075JF11_chpt14
- Exercise Solutions Wilcoxon
- AP Review Hypothesis Tests
- Hypothesis Testing
- Tutorial Solutions Week 7-2012_2013
- Ap13 Statistics q4
- Mont4e Sm Ch09 Sec07
- STAT2802-3902_Chapter_6
- Comparing Two Proportions
- Hypothesis Testing for Binomial Distribution
- Chapter 11 Study Guide - Chi-square
- Chap014 Non-Parametric and Chi Square

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd