1 wilcoxon wilcoxon rank sum test 1. wilcoxon with both n 1 and n 2 < 10 2. wilcoxon with both n...

29
1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 10 3. Examples

Upload: emerald-leonard

Post on 13-Jan-2016

243 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

1

Wilcoxon

Wilcoxon Rank Sum Test

1. Wilcoxon with both n1 and n2 < 10

2. Wilcoxon with both n1 and n2 ≥ 10

3. Examples

Page 2: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

2

Wilcoxon

Wilcoxon Rank Sum Test

Recall from last week:

When we test a hypothesis about the difference between two independent population means, we do so using the difference between two sample means. When the two sample variances are tested and found not to be equal

we cannot pool the sample variances thus we cannot use the t-test for independent samples. Instead, we use the Wilcoxon Rank Sum Test.

Page 3: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

3

Wilcoxon

Population 1 Population 2

µ1 µ2

Sample1 Sample2X1 X2

µ tells us about the population

The sample mean tells us about µ

Page 4: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

4

Wilcoxon

Wilcoxon Rank Sum Test

The Z test and the t test are “parametric tests” – that is, they answer a question about the difference between populations by comparing sample statistics (e.g., X1 and X2) and making an inference to the population parameters (μ1 and μ2).

The Wilcoxon, in contrast, allows inferences about whole populations

Page 5: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

5

Wilcoxon

X

X

Distribution B

Distribution A

μ

μ

Note that distribution B is shifted to the right of distribution A

Page 6: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

6

Wilcoxon

1b. Small samples, independent groups

Wilcoxon Rank Sum Test first, combine the two samples and rank order all the observations. smallest number has rank 1, largest number has rank N (= sum of n1 and n2).

separate samples and add up the ranks for the smaller sample. (If n1 = n2, choose either one.)

test statistic : rank sum T for smaller sample.

Page 7: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

7

Wilcoxon

1b. Small samples, independent groups

Wilcoxon – One-tailed Hypotheses

H0: Prob. distributions for 2 sampled populations are identical.

HA: Prob. distribution for Population A shifted to right of distribution for Population B. (Note: could be to the left, but must be one or the other, not both.)

Page 8: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

8

Wilcoxon

1b. Small samples, independent groups

Wilcoxon – Two-tailed Hypotheses

H0: Prob. distributions for 2 sampled populations are identical.

HA: Prob. distribution for Population A shifted to right or left of distribution for Population B.

Page 9: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

9

Wilcoxon

1b. Small samples, independent groups

Wilcoxon – Rejection region:

(With Sample taken from Population A being smaller than sample for Population B) – reject H0 if

TA ≥ TU or TA ≤ TL

Page 10: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

10

Wilcoxon

1b. Small samples, independent groups

Wilcoxon for n1 ≥ 10 and n2 ≥ 10:

Test statistic:

Z = TA – n1(n1 + n2 + 1)

2

n1n2(n1 + n2 + 1)

12

Page 11: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

11

Wilcoxon

Wilcoxon for n1≥ 10 and n2 ≥ 10

Rejection region:

One-tailed Two-tailed

Z > Zα │Z│ > Zα/2

Note: use this only when n1≥ 10 and n2 ≥ 10

Page 12: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

12

Wilcoxon

Example 1

These are small samples, and they are independent (“random samples of Cajun and Creole dishes”). Therefore, we have to begin with the test of equality of variances.

Page 13: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

13

Wilcoxon

Test of hypothesis of equal variances

H0: 12 = 2

2

HA: 12 ≠ 2

2

Test statistic: F = S12

S22

Rej. region: F > Fα/2 = F(6,6,.025) = 5.82or F < (1/5.82) = .172

Page 14: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

14

Wilcoxon

Test of hypothesis of equal variances

S2Cajun = (385.27)2 = 148432.14

S2Creole = (1027.54)2 = 1055833.33

Fobt = 148432.14 = 7.111055833.33

Reject H0 – variances are not equal, so we do the Wilcoxon.

Page 15: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

15

Wilcoxon

Example 1 – Wilcoxon Rank Sum Test

H0: Prob. distributions for Cajun and Creole populations are identical.

HA: Prob. distribution for Cajun is shifted to right of distribution for Creole.

Statistical test: T

Page 16: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

16

Wilcoxon

Example 1 – Wilcoxon Rank Sum Test

Rejection region:

Reject H0 if TCajun > 66 (or if TCreole < 39)

(Note: We shall give lower heat values lower rank values)

Page 17: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

17

Wilcoxon

Example 1 – Wilcoxon Rank Sum Test

Cajun Creole3500 31004200 47004100 27004700 35004200 20003705 31004100 1550 1

2

3

4.5

4.5

6.5

6.5

8

9.5

9.5

11.5

11.5

13.5

13.5

Σ 70 35

Page 18: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

18

Wilcoxon

Example 1 – Wilcoxon Rank Sum Test

Calculation check:

Sum of the ranks should = (n) (n+1)

2

70 + 35 = 105 = (14)(15)

2

Page 19: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

19

Wilcoxon

Example 1 – Wilcoxon Rank Sum Test

TCajun = 70 > 66 (and TCreole = 35 < 39)

Therefore, reject H0 – Cajun dishes are significantly hotter than Creole dishes.

Page 20: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

20

Wilcoxon

Example 2 – Wilcoxon Rank Sum Test

H0: 12 = 2

2

HA: 12 ≠ 2

2

Test statistic: F = S12

S22

Rej. region: F > Fα/2 = F(7,8,.025) = 4.53or F < (1/4.90) = .204

Page 21: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

21

Wilcoxon

Example 2 – Wilcoxon Rank Sum Test

Fobt = 4.316 = 9.38

.46

Reject H0 – do Wilcoxon

Page 22: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

22

Wilcoxon

Example 2 – Wilcoxon Rank Sum Test

H0: Prob. distributions for females and males populations are identical.

HA: Prob. distribution for females is shifted to left of distribution for males.

Statistical test: T

Rejection region: T♂ > TU = 90

(or T♀ < TL = 54)

Page 23: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

23

Wilcoxon

Example 2 – Wilcoxon Rank Sum Test

6.4 16 2.7 31.7 1 3.9 103.2 5 4.6 125.9 15 3.0 42.0 2 3.4 6.53.6 8 4.1 115.4 14 3.4 6.57.2 17 4.7 13

3.8 9Σ 78 75

Page 24: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

24

Wilcoxon

Example 2 – Wilcoxon Rank Sum Test

T♂ = 78 < TU = 90

Therefore, do not reject H0 – no evidence that mean distance in females is less than that in males.

Page 25: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

25

Wilcoxon

Example 3 – Wilcoxon Rank Sum Test

H0: 12 = 2

2

HA: 12 ≠ 2

2

Test statistic: F = S12

S22

Rej. region: F > Fα/2 = F(5,5,.025) = 7.15or F < (1/7.15) = .140

Page 26: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

26

Wilcoxon

Example 3 – Wilcoxon Rank Sum Test

Fobt = (7.563)2 = 57.20

(2.04)2 4.16

= 13.74

Reject H0 – do Wilcoxon

Page 27: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

27

Wilcoxon

Example 3 – Wilcoxon Rank Sum Test

H0: Prob. distributions for Hoodoo and Mukluk populations are identical.

HA: Prob. distribution for Hoodoos is shifted to right or left of distribution for Mukluks.

Statistical test: T

Rejection region: TH > 52 or < 26

Page 28: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

28

Wilcoxon

Example 3 – Wilcoxon Rank Sum Test

Hoodoo Mukluk2 1 6 56 5 8 9.54 2.5 7 7.523 12 10 117 7.5 8 9.56 5 4 2.5Σ 33 45

Page 29: 1 Wilcoxon Wilcoxon Rank Sum Test 1. Wilcoxon with both n 1 and n 2 < 10 2. Wilcoxon with both n 1 and n 2 ≥ 10 3. Examples

29

Wilcoxon

Example 3 – Wilcoxon Rank Sum Test

Check: TH + TM = 78(12)(13) = 78 2

TH = 33 > 26 and < 52

Do not reject H0 – no evidence for a significant difference between teams.