Top Banner
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by Mario F. Triola
146

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Apr 02, 2015

Download

Documents

Izabella Jay
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1

Lecture Slides

Elementary Statistics Eleventh Edition

and the Triola Statistics Series

by Mario F. Triola

Page 2: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 2

Chapter 13Nonparametric Statistics

13-1 Review and Preview

13-2 Sign Test

13-3 Wilcoxon Signed-Ranks Test for Matched Pairs

13-4 Wilcoxon Rank-Sum Test for Two Independent Samples

13-5 Kruskal-Wallis Test

13-6 Rank Correction

13-7 Runs Test for Randomness

Page 3: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 3

Section 13-1 Review and Preview

Page 4: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 4

In the preceding chapters, we presented a variety of different methods of inferential statistics. Many of those methods require normally distributed populations and are based on sampling from a population with specific parameters, such as the mean , standard deviation , or population proportion p.

Review

Page 5: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 5

Definitions

Parametric tests have requirements about the nature or shape of the populations involved.

Nonparametric tests do not require that samples come from populations with normal distributions or have any other particular distributions. Consequently, nonparametric tests are called distribution-free tests.

Preview

Page 6: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 6

Advantages of Nonparametric Methods

1. Nonparametric methods can be applied to a wide variety of situations because they do not have the more rigid requirements of the corresponding parametric methods. In particular, nonparametric methods do not require normally distributed populations.

2. Unlike parametric methods, nonparametric methods can often be applied to categorical data, such as the genders of survey respondents.

Page 7: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 7

Disadvantages of Nonparametric Methods

1. Nonparametric methods tend to waste information because exact numerical data are often reduced to a qualitative form.

2. Nonparametric tests are not as efficient as parametric tests, so with a nonparametric test we generally need stronger evidence (such as a larger sample or greater differences) in order to reject a null hypothesis.

Page 8: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 8

Efficiency of Nonparametric Methods

Page 9: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 9

Definitions

Data are sorted when they are arranged according to some criterion, such as smallest to the largest or best to worst.

A rank is a number assigned to an individual sample item according to its order in the sorted list. The first item is assigned a rank of 1, the second is assigned a rank of 2, and so on.

Page 10: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 10

Handling Ties in Ranks

Find the mean of the ranks involved and assign this mean rank to each of the tied items.

Sorted Data

4

5

5

5

10

11

12

12

Rank

1

3

3

3

5

6

7.5

7.5

Mean is 3.

Mean is 7.5.

Preliminary Ranking

1

2

3

4

5

6

7

8

Page 11: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 11

Section 13-2 Sign Test

Page 12: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 12

Key Concept

The main objective of this section is to understand the sign test procedure, which involves converting data values to plus and minus signs, then testing for disproportionately more of either sign.

Page 13: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 13

Definition

The sign test is a nonparametric (distribution free) test that uses plus and minus signs to test different claims, including:

1) Claims involving matched pairs of sample data;

2) Claims involving nominal data;

3) Claims about the median of a single population.

Page 14: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 14

Basic Concept of the Sign Test

The basic idea underlying the sign test is to analyze the frequencies of the plus and minus signs to determine whether they are significantly different.

Page 15: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 15

Figure 13-1 Sign Test Procedure

Page 16: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 16

Figure 13-1 Sign Test Procedure

Page 17: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 17

Figure 13-1 Sign Test Procedure

Page 18: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 18

Requirements

The sample data have been randomly selected.

Note: There is no requirement that the sample data come from a populationwith a particular distribution, such as a normal distribution.

Page 19: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 19

Notation for Sign Test

x = the number of times the less frequent sign occurs

n = the total number of positive and negative

signs combined

Page 20: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 20

Test Statistic

For n 25: x (the number of times the less frequent sign occurs)

z =For n > 25: n

(x + 0.5) – n

2

2

Page 21: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 21

Critical Values

For n 25, critical x values are in Table A-7.

For n > 25, critical z values are in Table A-2.

Page 22: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 22

Caution

When applying the sign test in a one-tailed test, we need to be very careful to avoid making the wrong conclusion when one sign occurs significantly more often than the other, but the sample data contradict the alternative hypothesis. See the following example.

Page 23: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 23

Claims Involving Matched Pairs

When using the sign test with data that are matched pairs, we convert the raw data to plus and minus signs as follows:

1. Subtract each value of the second variable from the corresponding value of the first variable.

2. Record only the sign of the difference found in step 1.

Exclude ties: that is, any matched pairs in which both values are equal.

Page 24: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 24

Key Concept Underlying This Use of the Sign Test

If the two sets of data have equal medians, the number of positive signs should be approximately equal to the number of negative signs.

Page 25: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 25

Example:

Table 13-3 includes some of the weights listed in Data Set 3 in Appendix B. Those weights were measured from college students in September and April of their freshman year. Use the sample data in Table 13-3 with a 0.05 significance level to test the claim that there is no difference between the September weights and the April weights. Use the sign test.

Page 26: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 26

H0: The median of the differences is equal to 0.

H1: The median of the differences is not equal to 0.

= 0.05 (in two tails)

x = minimum (7, 2) = 2 (From Table 13-3, there are 7 negative signs and 2 positive signs.)

Critical value = 1 (From Table A-7 where n = 9 and = 0.05)

Example:

Page 27: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 27

H0: The median of the differences is equal to 0.

H1: The median of the differences is not equal to 0.

With a test statistic of x = 4 and a critical value of 1, we fail to reject the null hypothesis of no difference.

There is not sufficient evidence to warrant rejection of the claim that the median of the differences is equal to 0.

Example:

Page 28: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 28

We conclude that the September and April weights appear to be about the same. (If we use the parametric t test for matched pairs (Section 9-4), we conclude that the mean difference is not zero, so the September weights and April weights appear to be different.)The conclusion should be qualified with the limitations noted in the article about the study. Only Rutgers students were used, and study subjects were volunteers instead of being a simple random sample.

Example:

Page 29: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 29

Claims Involving Nominal Data

The nature of nominal data limits the calculations that are possible, but we can identify the proportion of the sample data that belong to a particular category.

Then we can test claims about the corresponding population proportion p.

Page 30: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 30

Example:

The Genetics and IVF Institute conducted a clinical trial of its methods for gender selection. As of this writing, 668 of 726 babies born to parents using the XSORT method of gender selection were girls. Use the sign test and a 0.05 significance level to test the claim that this method of gender selection is effective in increasing the likelihood of a baby girl.The procedures are for cases in which n > 25.Note that the only requirement is that the sample data are randomly selected.

H0: p = 0.5 (the proportion of girls is 0.5)

H1: p > 0.5 (girls are more likely)

Page 31: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 31

Example:

Denoting girls by the positive sign (+) and boys by the negative sign (–), we have 668 positive signs and 58 negative signs.

Test statistic x = minimum(668, 58) = 58

Test whether 58 boys is low enough to be significant so it is a left-tailed test.

Page 32: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 32

Example:

Since n = 726 (> 25), the test statistic x = 58 is converted to the test statistic x as follows:

n(x + 0.5) –

z =n

2

2

(58 + 0.5) – z =

726

2

2726

= –22.60

Page 33: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 33

Example:

With = 0.05 in a left-tailed test, the critical value is z = – 1.645.

The test statistic z = –22.60 is in the critical region bounded by z = –1.645.

Page 34: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 34

Example:

We reject the null hypothesis that the proportion of girls is equal to 0.5.

There is sufficient evidence to support the claim that girls are more likely with the XSORT method.

The XSORT method of gender selection does appear to be effective in increasing the likelihood of a girl.

Page 35: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 35

Claims About the Median of a Single Population

The negative and positive signs are based on the claimed value of the median.

Page 36: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 36

Example: Body TemperatureData Set 2 in Appendix B includes measured body temperatures of adults. Use the 106 temperatures listed for 12 A.M. on Day 2 with the sign test to test the claim that the median is less than 98.6ºF. Of the 106 subjects, 68 had temperatures below 98.6ºF, 23 had temperatures above 98.6ºF, and 15 had temperatures equal to 98.6ºF.

H0: Median is equal to 98.6°F.

H1: Median is less than 98.6°F.Since the claim is that the median is less than 98.6°F, the test involves only the left tail.

Page 37: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 37

Example: Body Temperature

Discard the 15 zeros.

Use ( – ) to denote the 68 temperatures below 98.6°F, and use ( + ) to denote the 23 temperatures above 98.6°F.

So n = 91 and x = 23

Page 38: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 38

Example: Body Temperature

(x + 0.5) – z =

n

2

2n

(23 + 0.5) – z =

91

2

291

= – 4.61

Page 39: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 39

Example: Body Temperature

We use Table A-2 to get the critical z value of –1.645.

The test statistic of z = –4.61 falls into the critical region.

We reject the null hypothesis.

We support the claim that the median body temperature of healthy adults is less than 98.6°F.

Page 40: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 40

Example: Body Temperature

Page 41: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 41

Recap

In this section we have discussed:

Sign tests where data are assigned plus or minus signs and then tested to see if the number of plus and minus signs is equal.

Sign tests can be performed on claims involving:

Matched pairs

Nominal data

The median of a single population

Page 42: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 42

Section 13-3 Wilcoxon Signed-Ranks Test for Matched Pairs

Page 43: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 43

Key Concept

The Wilcoxon signed-ranks test involves the conversion of the sample data ranks.

This test can be used for two different applications.

Page 44: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 44

The Wilcoxon signed-ranks test is a nonparametric test that uses ranks for these applications:

Definition

1. Test a null hypothesis that the population of matched pairs has differences with a median equal to zero.

2. Test a null hypothesis that a single population has a claimed value of the median.

Page 45: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 45

Use the Wilcoxon signed-ranks test with matched pairs for the following null and alternative hypotheses:

Objective

H0: The matched pairs have differences that come from a population with a median equal to zero.

H1: The matched pairs have differences that come from a population with a nonzero median.

Page 46: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 46

1. The data consist of matched pairs that have been randomly selected.

2. The population of differences (found from the pairs of data) has a distribution that is approximately symmetric, meaning that the left half of its histogram is roughly a mirror image of its right half. (There is no requirement that the data have a normal distribution.)

Wilcoxon Signed-Ranks TestRequirements

Page 47: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 47

Notation

T = the smaller of the following two sums:

1. The sum of the positive ranks of the nonzero differences d

2. The absolute value of the sum of the negative ranks of the nonzero differences d

Page 48: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 48

Test Statistic for the Wilcoxon Signed-Ranks Test

for Matched Pairs

For n 30, the test statistic is T.

z =For n > 30, the test statistic is 4T – n(n + 1)

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

24

Page 49: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 49

Critical Values for the Wilcoxon Signed-Ranks Test

for Matched Pairs

For n 30, the critical T value is found in Table A-8.

For n > 30, the critical z values are found in Table A-2.

Page 50: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 50

Procedure for Finding the Value of the Test Statistic

Step 1: For each pair of data, find the difference d by subtracting the second value from the first. Keep the signs, but discard any pairs for which d = 0.

Step 2: Ignore the signs of the differences, then sort the differences from lowest to highest and replace the differences by the corresponding rank value. When differences have the same numerical value, assign to them the mean of the ranks involved in the tie.

Page 51: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 51

Procedure for Finding the Value of the Test Statistic

Step 3: Attach to each rank the sign difference from which it came. That is, insert those signs that were ignored in step 2.

Step 4: Find the sum of the absolute values of the negative ranks. Also find the sum of the positive ranks.

Step 5: Let T be the smaller of the two sums found in Step 4. Either sum could be used, but for a simplified procedure we arbitrarily select the smaller of the two sums.

Page 52: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 52

Step 6: Let n be the number of pairs of data for which the difference d is not 0.

Step 7: Determine the test statistic and critical values based on the sample size, as shown above.

Step 8: When forming the conclusion, reject the null hypothesis if the sample data lead to a test statistic that is in the critical region that is, the test statistic is less than or equal to the critical value(s). Otherwise, fail to reject the null hypothesis.

Procedure for Finding the Value of the Test Statistic

Page 53: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 53

Example:

The first two rows of Table 13-4 include some of the weights from Data Set 3 in Appendix B. Those weights were measured from college students in September and April of their freshman year. Use the sample data in the first two rows of Table 13-4 to test the claim that there is no difference between the September weights and the April weights. Use the Wilcoxon signed-ranks test with a 0.05 significance level.

Page 54: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 54

Example:

Requirements are satisfied: subjects volunteered, but proceed as if simple random sample; STATDISK-generated histogram of the differences (3rd row) does not appear symmetric (next slide), but with only 9 differences it is not extreme so consider this requirement to be satisfied

Page 55: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 55

Example:

Page 56: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 56

Example:

H0: There is no difference between the times of the first and second trials.

H1: There is a difference between the times of the first and second trials.

Page 57: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 57

The ranks of differences in row four of the table are found by ranking the absolute differences, handling ties by assigning the mean of the ranks.

The signed ranks in row five of the table are found by attaching the sign of the differences to the ranks.

Example: Freshman Weight Gain

The differences in row three of the table are found by computing the September weight – April weight.

Page 58: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 58

Example: Freshman Weight Gain

Step 1: In Table 13- 4, the row of differences is obtained by computing this difference for each pair of data:

d = September weight – April weight

Step 2: Ignoring their signs, we rank the absolute differences from lowest to highest.

Step 3: The bottom row of Table 13- 4 is created by attaching to each rank the sign of the corresponding differences.

Calculate the Test Statistic

Page 59: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 59

Example: Freshman Weight Gain

If there really is no difference between the weights (as in the null hypothesis), we expect the sum of the positive ranks to be approximately equal to the sum of the absolute values of the negative ranks.

Step 4: We now find the absolute of the sum values of the negative ranks, and we also find the sum of the positive ranks.

Calculate the Test Statistic

Page 60: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 60

Example: Freshman Weight Gain

Absolute value of sum of negative ranks: 40(–7 + –5.5 + –2.5 + –8 + –9 + –5.5 + –2.5)

Sum of positive ranks: 5 (2.5 + 2.5)

Step 5: Let T be the smaller of the two sums found in Step 4, we find that T = 5.

Step 6: Let n be the number of pairs of data for which the difference d is not 0, we have n = 9.

Calculate the Test Statistic

Step 4 (cont.):

Page 61: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 61

Example: Freshman Weight Gain

Step 7: n = 9 (n ≤ 30) test statistic T = 5. From Table A- 8, using n = 9 and = 0.05 in two tails, critical value is 6

Step 8: The test statistic T = 5 is less than or equal to the critical value of 6, so we reject the null hypothesis.

We conclude that the September and April weights do not appear to be about the same.

Calculate the Test Statistic

Page 62: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 62

Recap

In this section we have discussed:

The Wilcoxon signed-ranks test which uses matched pairs.

The hypothesis is that the matched pairs have differences that come from a population with a median equal to zero.

Page 63: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 63

Section 13- 4 Wilcoxon Rank-Sum Test

for Two Independent Samples

Page 64: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 64

Key Concept

The Wilcoxon rank-sum test uses ranks of values from two independent samples to test the null hypothesis that the two populations have equal medians.

Page 65: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 65

Key Concept

The basic idea underlying the Wilcoxon rank-sum test is this: If two samples are drawn from identical populations and the individual values are all ranked as one combined collection of values, then the high and low ranks should fall evenly between the two samples. If the low ranks are found predominantly in one sample and the high ranks are found predominantly in the other sample, we suspect that the two populations have different medians.

Page 66: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 66

Basic Concept

If two samples are drawn from identical populations and the individual values are all ranked as one combined collection of values, then the high and low ranks should fall evenly between the two samples.

Page 67: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 67

Caution

Don’t confuse the Wilcoxon rank-sum test for two independent samples with the Wilcoxon signed-ranks test for matched pairs. Use Internal Revenue Service as the mnemonic for IRS to remind us of “Independent: Rank Sum.”

Page 68: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 68

Definition

The Wilcoxon rank-sum test is a nonparametric test that uses ranks of sample data from two independent populations. It is used to test the null hypothesis that the two independent samples come from populations with equal medians.

H0: The two samples come from populations with equal medians.H1: The two samples come from populations with different medians.

Page 69: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 69

n1 = size of Sample 1

n2 = size of Sample 2

R1 = sum of ranks for Sample 1

R2 = sum of ranks for Sample 2

R = same as R1 (sum of ranks for Sample 1)

R = mean of the sample R values that is expected when the two populations have equal medians

R = standard deviation of the sample R values that is expected when the two populations have equal medians

Notation

Page 70: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 70

Requirements

1. There are two independent simple random samples.

2. Each of the two samples has more than 10 values.

Note: There is no requirement that the two populations have a normal distribution or any other particular distribution.

Page 71: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 71

Test Statistic

R – Rz = R

R = n1 n2 (n1 + n2 + 1)

12

n1 (n1 + n2 + 1)

2=R

where

n1 = size of the sample from which the rank sum R is found

n2 = size of the other sample

R = sum of ranks of the sample with size n1

Page 72: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 72

Critical values can be found in Table A-2 (because the test statistic is based on the normal distribution).

P-Values can be found using the z test statistic and Table A-2.

Critical and P-Values for the Wilcoxon Rank-Sum Test

Page 73: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 73

Procedure for Finding the Value of the Test Statistic

1. Temporarily combine the two samples into one big sample, then replace each sample value with its rank.

2. Find the sum of the ranks for either one of the two samples.

3. Calculate the value of the z test statistic, where either sample can be used as ‘Sample 1’.

Page 74: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 74

Table 13-5 lists the braking distances (in ft) of samples of 4-cylinder cars and 6-cylinder cars Use a 0.05 significance level to test the claim that 4-cylinder cars and 6-cylinder cars have the same median braking distance. The numbers in parentheses are their ranks beginning with a rank of 1 assigned to the lowest value of 122.R1 and R2 at the bottom denote the sum of ranks.

Example:

Page 75: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 75

Example:

The requirements of having two independent and random samples and each having more than 10 values are met.

H0: The braking distances of 4-cylinder cars and 6-cylinder cars have the same median.

H1: The braking distances of 4-cylinder cars and 6-cylinder cars have different medians.

Page 76: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 76

Example:

Procedure

1. Rank all 25 BMI measurements combined. This is done in Table 13-5.

2. Find the sum of the ranks of either one of the samples. For 4-cylinder cars it is

R = 12.5 + 23 + … + 11 = 180.5

Page 77: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 77

Example:

Procedure (cont.)

3. Calculate the value of the z test statistic.

1 1 2( 1) 13(13 12 1)169

2 2R

n n n

1 2 1 2( 1) (13)(12)(13 12 1)18.385

12 12R

n n n n

z

R R

R

180.5 169

18.3850.63

Page 78: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 78

Example:

The test is two-tailed because a large positive value of z would indicate that the higher ranks are found disproportionately in Sample 1, and a large negative value of z would indicate that disproportionately more lower ranks are found in Sample 1.

In either case, we would have strong evidence against the claim that the two samples come from populations with equal medians.

Page 79: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 79

Example:

We have a two tailed test (with = 0.05), so the critical values are 1.96 and –1.96.

The test statistic of z = 0.63 does not fall within the critical region, so we fail to reject the null hypothesis that the braking distance of 4-cylinder cars and 6-cylinder cars have the same median.

It appears that 4-cylinder cars and 6-cylinder cars have braking distances with the same median.

Page 80: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 80

Recap

In this section we have discussed:

The Wilcoxon Rank-Sum Test for Two Independent Samples.

It is used to test the null hypothesis that the two independent samples come from populations with equal medians.

Page 81: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 81

Section 13-5 Kruskal-Wallis Test

Page 82: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 82

Key Concept

This section introduces the Kruskal-Wallis test, which uses ranks of data from three or more independent samples to test the null hypothesis that the samples come from populations with equal medians.

Page 83: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 83

• We compute the test statistic H, which has a distribution that can be approximated by the chi-square (2 ) distribution as long as each sample has at least 5 observations.

• When we use the chi-square distribution in this context, the number of degrees of freedom is k – 1, where k is the number of samples.

Kruskal-Wallis Test

Page 84: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 84

The Kruskal-Wallis test (also called the H test) is a nonparametric test that uses ranks of simple random samples from three or more independent populations.

It is used to test the null hypothesis that the independent samples come from populations with the equal medians.

Definition

H0: The samples come from populations with equal medians.

H1: The samples come from populations with medians that are not all equal.

Page 85: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 85

• N = total number of observations in all observations combined

• k = number of samples

• R1 = sum of ranks for Sample 1

• n1 = number of observations in Sample 1

• For Sample 2, the sum of ranks is R2 and the

number of observations is n2 , and similar notation is used for the other samples.

Kruskal-Wallis Test Notation

Page 86: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 86

1. We have at least three independent random samples.

2. Each sample has at least 5 observations.

Note: There is no requirement that the populations have a normal distribution or any other particular distribution.

Kruskal-Wallis Test Requirements

Page 87: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 87

Kruskal-Wallis Test

Test Statistic

Critical Values1. Test is right-tailed.

2. df = k – 1 (Because the test statistic H can be approximated by the 2 distribution, use Table A- 4).

H

12

N (N 1)

R12

n1

R

22

n2

...R

k2

nk

3(N 1)

Page 88: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 88

Procedure for Finding the Value of the Test Statistic H

1 Temporarily combine all samples into one big sample and assign a rank to each sample value.

2. For each sample, find the sum of the ranks and find the sample size.

3. Calculate H by using the results of Step 2 and the notation and test statistic.

Page 89: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 89

Procedure for Finding the Value of the Test Statistic H

The test statistic H is basically a measure of the variance of the rank sums R1 , R2 , … , R k.

If the ranks are distributed evenly among the sample groups, then H should be a relatively small number.

If the samples are very different, then the ranks will be excessively low in some groups and high in others, with the net effect that H will be large.

Page 90: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 90

Example:

The chest deceleration measurements resulting from car crash tests are listed in Table 13-6. The data are from the Chapter Problem in Chapter 12. Test the claim that the three samples come from populations with medians that are all equal. Use a 0.05 significance level.

Page 91: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 91

Example:

Page 92: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 92

Are requirements met?Each of the three samples is a simple random independent and sample.Each sample size at least 5.

Example:

H0: The populations of chest deceleration measurements from the three categories have the same median.

H1: The populations of chest deceleration measurements from the three categories have medians that are not all the same.

Page 93: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 93

Example:

The following statistics come from Table 13-6:

n1 = 10, n2 = 10, n3 = 10

N = 30

R1 = 203.5, R2 = 152.5, R3 = 109

Page 94: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 94

Evaluate the test statistic.

Example:

22 21 2

1 2

12... 3( 1)

( 1)k

k

RR RH N

N N n n n

12

30(30 1)

203.52

10

152.52

10

1092

10

3(30 1)

5.774

Page 95: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 95

Find the critical value. .

Because each sample has at least five observations, the distribution of H is approximately a chi-square distribution.

Example:

df = k – 1 = 3 – 1 = 2α = 0.05 (right-tail)

From Table A-4 the critical value = 5.991.

Page 96: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 96

Example:

Page 97: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 97

Example:

The test statistic 5.774 is NOT in the critical region bounded by 5.991, so we fail to reject the null hypothesis of equal medians.

There is not sufficient evidence to reject the claim that chest deceleration measurements from small cars, medium cars, and large cars all have equal medians. The medians do not appear to be different.

Page 98: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 98

Recap

In this section we have discussed:

The Kruskal-Wallis Test is the non-parametric equivalent of ANOVA.

It tests the hypothesis that three or more populations have equal means.

The populations do not have to be normally distributed.

Page 99: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 99

Section 13-6 Rank Correlation

Page 100: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 100

Key Concept

This section describes the nonparametric method of the rank correlation test, which uses paired data to test for an association between two variables.

In Chapter 10 we used paired sample data to compute values for the linear correlation coefficient r, but in this section we use ranks as a the basis for computing the rank correlation coefficient rs .

Page 101: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 101

DefinitionThe rank correlation test (or Spearman’s rank correlation test) is a non-parametric test that uses ranks of sample data consisting of matched pairs.

It is used to test for an association between two variables.

Page 102: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 102

1. The nonparametric method of rank correlation can be used in a wider variety of circumstances than the parametric method of linear correlation.  With rank correlation, we can analyze paired data that are ranks or can be converted to ranks.

2. Rank correlation can be used to detect some (not all) relationships that are not linear.

Advantages

Rank correlation has these advantages over the parametric methods discussed in Chapter 10:

Page 103: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 103

ObjectiveCompute the rank correlation coefficient r1 and use it to test for an association between two variables.

H0: ρs = 0 (There is no correlation between the two variables.)

H1: ρs 0 (There is a correlation between the two variables.)

Page 104: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 104

Notation

rs = rank correlation coefficient for sample paired data (rs is a sample statistic)

s = rank correlation coefficient for all the population data(s is a population parameter)

n = number of pairs of sample data

d = difference between ranks for the two values within a pair

Page 105: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 105

Requirements

1. The sample paired data have been randomly selected.

Note: Unlike the parametric methods of Section 10-2, there is no requirement that the sample pairs of data have a bivariate normal distribution. There is no requirement of a normal distribution for any population.

Page 106: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 106

Rank CorrelationTest Statistic

No ties: After converting the data in each sample to ranks, if there are no ties among ranks for either variable, the exact value of the test statistic can be calculated using this formula:

2

2

61

( 1)s

dr

n n

Page 107: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 107

Rank CorrelationTest Statistic

Ties: After converting the data in each sample to ranks, if either variable has ties among its ranks, the exact value of the test statistic rs can be found by using Formula 10-1 with the ranks:

2 2 2 2

( )( )

( ) ( ) ( ) ( )s

n xy x yr

n x x n y y

Page 108: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 108

Critical values:

If n ≤ 30, critical values are found in Table A-9.

If n > 30, use Formula 13-1.

Rank Correlation

1s

zr

n

where the value of z corresponds to the significance level. (For example, if = 0.05,z = 1.96.)

Page 109: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 109

Disadvantages

A disadvantage of rank correlation is its efficiency rating of 0.91, as described in Section 13-1.

This efficiency rating shows that with all other circumstances being equal, the nonparametric approach of rank correlation requires 100 pairs of sample data to achieve the same results as only 91 pairs of sample observations analyzed through parametric methods, assuming that the stricter requirements of the parametric approach are met.

Page 110: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 110

Figure 13-4 Rank Correlation for Testing H0: s = 0

Page 111: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 111

Figure 13-4 Rank Correlation for Testing H0: s = 0

Page 112: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 112

Example:

Table 13-1 lists overall quality scores and selectivity rankings of a sample of national universities (based on data from U.S. News and World Report). Find the value of the rank correlation coefficient and use it to determine whether there is a correlation between the overall quality scores and the selectivity rankings. Use a 0.05 significance level. Based on the result, does it appear that national universities with higher overall quality scores are more difficult to get into?

Page 113: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 113

Example:

Requirement is satisfied: paired data are a simple random sample

The selectivity data consist of ranks that are not normally distributed. So, we use the rank correlation coefficient to test for a relationship between overall quality score and selectivity rank. The null and alternative hypotheses are as follows:

H0: s = 0 H1: s 0

Page 114: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 114

Example:

Since neither variable has ties in the ranks:

r

s1

6d 2

n(n2 1)1

6(156)

8(82 1)

1

936

504 0.857

Page 115: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 115

Example:

From Table A-9, using = 0.05 and n = 8, the critical values are 0.738.

Because the test statistic of rs = –0.857 is not between the critical values of –0.738 and 0.738, we reject the null hypothesis.

There is sufficient evidence to support a claim of a correlation between overall quality score and selectivity ranking. It appears that Universities with higher quality scores are more selective and are more difficult to get into.

Page 116: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 116

An experiment involves a growing population of bacteria. Table 13-8 lists randomly selected times (in hr) after the experiment is begun, and the number of bacteria present. Use a 0.05 significance level to test the claim that there is a correlation between time and population size.

Example: Detecting a Nonlinear Pattern

Page 117: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 117

Requirement is satisfied: date are from a simple random sampleThe hypotheses are:

Example: Detecting a Nonlinear Pattern

H0: s = 0 H1: s 0

We follow the rank correlation procedure summarized in Figure 13-5. The original values are not ranks, so we convert them to ranks and enter the results in Table 13-9.

Page 118: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 118

There are no ties among ranks of either list.

Example: Detecting a Nonlinear Pattern

r

s1

6d 2

n(n2 1)1

6(0)

10(102 1)

1

0

9901

Page 119: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 119

Example: Detecting a Nonlinear Pattern

Since n = 10 is less than 30, use Table A-9

Critical values are ± 0.648

The test statistic rs = 1 is not between –0.648 and 0.648, so we reject the null hypothesis of s = 0 (no correlation).

There is sufficient evidence to conclude there is a correlation between time and population size.

Page 120: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 120

Example: Detecting a Nonlinear Pattern

If this example is done using the methods of Section 10-2, the linear correlation coefficient is r = 0.0621 and critical values of –0.632 and 0.632.

This leads to the conclusion that there is not enough evidence to support the claim of a significant linear correlation, whereas the nonlinear test found that there was enough evidence.

The Minitab scatter diagram shows that there is a non-linear relationship that the parametric method would not have detected.

Page 121: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 121

Recap

In this section we have discussed:

Rank correlation which is the non-parametric equivalent of testing for correlation described in Chapter 10.

It uses ranks of matched pairs to test for association.

Sometimes rank correlation can detect non-linear correlation that the parametric test will not recognize.

Page 122: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 122

Section 13-7 Runs Test for Randomness

Page 123: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 123

Key Concept

This section introduces the runs test for randomness, which can be used to determine whether the sample data in a sequence are in a random order.

This test is based on sample data that have two characteristics, and it analyzes runs of those characteristics to determine whether the runs appear to result from some random process, or whether the runs suggest that the order of the data is not random.

Page 124: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 124

Definition

A run is a sequence of data having the same characteristic; the sequence is preceded and followed by data with a different characteristic or by no data at all.

The runs test uses the number of runs in a sequence of sample data to test for randomness in the order of the data.

Page 125: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 125

Fundamental Principles of the Run Test

Reject randomness if the number of runs is very low or very high.Example: The sequence of genders FFFFFMMMMM is not random because it has only 2 runs, so the number of runs is very low.

Example: The sequence of genders FMFMFMFMFM is not random because there are 10 runs, which is very high.

It is important to note that the runs test for randomness is based on the order in which the data occur; it is not based on the frequency of the data.

Page 126: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 126

Caution

The runs test for randomness is based on the order in which the data occur; it is not based on the frequency of the data. For example, a sequence of 3 men and 20 women might appear to be random, but the issue of whether 3 men and 20 women constitute a biased sample (with disproportionately more women) is not addressed by the runs test.

Page 127: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 127

Figure 13-6 Procedure for Runs Test for Randomness

Page 128: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 128

Figure 13-6 Procedure for Runs Test for Randomness

Page 129: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 129

Objective

Apply the runs test for randomness to a sequence of sample data to test for randomness in the order of the data.

Use the following null and alternative hypotheses.H0: The data are in a random sequence.

H1: The data are in a sequence that is not random.

Page 130: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 130

Notation

n1 = number of elements in the sequence that have one particular characteristic

(The characteristic chosen for n1 is arbitrary.)

n2 = number of elements in the sequence that have the other characteristic

G = number of runs

Page 131: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 131

Requirements

1. The sample data are arranged according to some ordering scheme, such as the order in which the sample values were obtained.

2. Each data value can be categorized into one of two separate categories (such as male/female).

Page 132: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 132

Test Statistic

Test statistic is the number of runs G

Critical Values

Critical values are found in Table A-10.

Runs Test for Randomness

For Small Samples (n1 ≤ 20 and n2 ≤ 20)

and = 0.05:

Page 133: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 133

Decision criteria

Reject randomness if the number of runs G is:

• less than or equal to the smaller critical value found in Table A-10.

• or greater than or equal to the larger critical value found in Table A-10.

Runs Test for Randomness

For Small Samples (n1 ≤ 20 and n2 ≤ 20)

and = 0.05:

Page 134: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 134

Test Statistic

G

G

Gz

1 2

1 2

21G

n n

n n

where

1 2 1 2 1 22

1 2 1 2

(2 )(2 )

( ) ( 1)G

n n n n n n

n n n n

and

For Large Samples (n1 > 20 and n2 > 20)

and = 0.05:

Runs Test for Randomness

Page 135: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 135

Critical Values

Critical values of z: Use Table A-2.

Runs Test for Randomness

For Large Samples (n1 > 20 or n2 > 20) or ≠ 0.05:

Page 136: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 136

Decision criteria

Reject randomness if the test statistic z is:

• less than or equal to the negative critical z score (such as –1.96).

• or greater than or equal to the positive critical z score (such as 1.96).

Runs Test for Randomness

For Large Samples (n1 > 20 and n2 > 20)

and = 0.05:

Page 137: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 137

Example: Small Sample: Genders of Study Participants

Listed below are the genders of the first 15 subjects participating in the “Freshman 15” study with results listed in Data Set 3 in Appendix B. Use a 0.05 significance level to test for randomness in the sequence of genders.

M M M M F M F F F F F M M F FRequirements are satisfied, so separate the runs as shown below.

M M M M F M F F F F F M M F F

2nd run

3rd run

4th run1st run 5th run 6th run

Page 138: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 138

Example: Small Sample: Genders of Study Participants

n1 = total number of males = 7

n2 = total number of females = 8

G = number of runs = 6

Because n1 ≤ 20 and n2 ≤ 20 and = 0.05, the test statistic is G = 6

M M M M F M F F F F F M M F F

2nd run 3rd run 4th run1st run 5th run 6th run

Page 139: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 139

Example: Small Sample: Genders of Study Participants

From Table A-10, the critical values are 4 and 13.

Because G = 6 is neither less than or equal to the critical value of 4, nor is it greater than or equal to the critical value of 13, we do not reject randomness.

It appears the sequence of genders is random.

M M M M F M F F F F F M M F F

2nd run 3rd run 4th run1st run 5th run 6th run

Page 140: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 140

Listed below are the global mean temperatures (in ºC) of the earth’s surface (based on data from the Goddard Institute for Space Studies). The temperatures each represent one year, and they are listed in order by row. Use a 0.05 significance level to test for randomness above and below the mean. What does the result suggest about the earth’s temperature?

Example: Large Sample: Global Warming

Page 141: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 141

Requirements are satisfied. Here are the hypotheses:

H0: The sequence is random. H1: The sequence is not random.

Example: Large Sample: Global Warming

Page 142: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 142

The mean of the 126 temperatures is 13.998ºC. The test statistic is obtained by first finding the number of temperatures below the mean and the number of temperatures above the mean. Examination of the sequence results in these values:

n1 = number of temperatures above mean = 68n2 = number temperatures below mean = 58G = number of runs = 32

Example: Large Sample: Global Warming

Page 143: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 143

Since n1 > 20, calculate z using the formulas:

Example: Large Sample: Global Warming

1 2

1 2

2 2(68)(58)1 1 63.6032

68 58

G

n n

n n

1 2 1 2 1 22

1 2 1 2

(2 )(2 )

( ) ( 1)G

n n n n n n

n n n n

(2)(68)(58)[(2(68)(58) 68 58]

(68 58)2(68 58 1)5.55450

z

G G

G

32 63.6032

5.55450 5.69

Page 144: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 144

With significance level = 0.05 and a two-tailed test, the critical values are z = –1.96 and 1.96.

The test statistic of z = –5.69 falls within the critical region, so we reject the null hypothesis of randomness. The given sequence does appear to be random.

Claims of global warming appear to be supported by the data - see the minitab display.

Example: Large Sample: Global Warming

Page 145: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 145

There appears to be an upward trend:

Example: Large Sample: Global Warming

Page 146: Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 1 Lecture Slides Elementary Statistics Eleventh Edition and the Triola.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. 13.1 - 146

Recap

In this section we have discussed:

The runs test for randomness which can be used to determine whether the sample data in a sequence are in a random order.

We reject randomness if the number of runs is very low or very high.