Download presentation
Presentation is loading. Please wait.
102
Nonparametric Statistics
Chapter 15 Nonparametric Statistics
103
An Overview of Nonparametric Statistics
Section 15.1 An Overview of Nonparametric Statistics
104
Objective Understand the difference between parametric statistical procedures and nonparametric statistical procedures
105
Parametric statistical procedures are inferential procedures conducted under the assumption that the underlying distribution of the data belongs to some parametric family of distributions (such as the normal distribution).
106
Nonparametric statistical procedures are inferential procedures that do not make any assumptions about the underlying distribution of the data. They do not require that the population belong to any particular parametric family of distributions (such as the normal distribution) and, therefore, are often referred to as distribution-free procedures.
107
Advantages of Nonparametric Statistical Procedures
Most of the tests have very few requirements, so it is unlikely that these tests will be used improperly.
108
Advantages of Nonparametric Statistical Procedures
Most of the tests have very few requirements, so it is unlikely that these tests will be used improperly. For some nonparametric procedures, the computations are fairly easy.
109
Advantages of Nonparametric Statistical Procedures
Most of the tests have very few requirements, so it is unlikely that these tests will be used improperly. For some nonparametric procedures, the computations are fairly easy. The procedures can be used for count data or rank data, so nonparametric methods can be used on data, such as the rankings of a movie as excellent, good, fair, or poor.
110
Disadvantages of Nonparametric Statistical Procedures
Nonparametric procedures are less efficient than parametric procedures. This means that a larger sample size is required when conducting a nonparametric procedure to have the same probability of a Type I error as the equivalent parametric procedure.
111
Disadvantages of Nonparametric Statistical Procedures
Nonparametric procedures often discard useful information. For example, the sign test uses only the sign of the data and rank tests merely preserve order-the magnitude of the actual data values is lost. As a result, nonparametric procedures are typically less powerful. Recall that the power of a test refers to the probability of making a Type II error. A Type II error occurs when a researcher does not reject the null hypothesis when the alternative hypothesis is true.
112
Disadvantages of Nonparametric Statistical Procedures
Because fewer requirements must be satisfied to conduct these tests, researchers sometimes use these procedures when parametric procedures can be used.
113
Nonparametric Test Parametric Test Efficiency Runs test for randomness No corresponding test -- Sign test Single sample z-test or t-test 0.955 (for small samples that come from a normal population) 0.75 (for large samples if data are normal) Wilcoxon matched-pairs test Inference about the difference of two means –dependent samples 0.955 (if the differences are normal) Mann-Whitney test Inference about the difference of two means – independent samples 0.955 (if data are normal) Spearman rank-correlation coefficient Linear correlation 0.912 (if the data are bivariate normal) Kruskal-Wallis Test One-way ANOVA 0.955 (if the data are normal)
114
“In Other Words” The lower the efficiency is, the larger the sample size must be for a nonparametric test to have the probability of a Type I error the same as it would be for its equivalent parametric test.
115
Runs Test for Randomness
Section 15.2 Runs Test for Randomness
116
Objective Perform a runs test for randomness
117
A runs test for randomness is used to test whether data have been obtained or occur randomly. A run is a sequence of similar events, items, or symbols that is followed by an event, item, or symbol that is mutually exclusive from the first event, item, or symbol. The number of events, items, or symbols in a run is called its length.
118
CAUTION! Runs tests are used to test whether it is reasonable to conclude that data occur randomly, not whether the data are collected randomly. For example, we might wonder whether defective parts come off an assembly line randomly or systematically. If broken parts occur systematically (such as every fourth part), we might be led to believe that we have a broken machine. We don’t collect the data randomly; instead, we select 100 consecutive parts. We want to know whether the defective parts in the 100 selected occur randomly.
119
Notation Used in Conducting a Runs Test for Randomness
Let n represent the sample size of which there are two mutually exclusive types. Let n1 represent the number of observations of the first type. Let n2 represent the number of observations of the second type. Let r represent the number of runs.
120
Identify the values of n, n1, n2 and r.
Parallel Example 1: Notation in a Runs Test for Randomness The following data represent the league that won the World Series for the years Let “AL” represent the American League and “NL” represent the National League. AL NL AL AL AL NL AL NL AL AL NL AL Identify the values of n, n1, n2 and r.
121
Solution Let n represent the number of World Series in the sample. Let n1 represent the number of World Series won by the American League and n2 the number of World Series won by the National League. Lastly, let r represent the number of runs. Then, there are n =12 World Series in the sample, n1 = 8 World Series won by the American League, n2 =4 World Series won by the National League and r =9 runs.
122
Test Statistic for a Runs Test for Randomness
Small-Sample Case: If n1≤20 and n2≤20, the test statistic in the runs test for randomness is r, the number of runs. Large-Sample Case: n1>20 or n2>20, the test statistic in the runs test for randomness is
123
Critical Values for a Runs Test for Randomness
Small-Sample Case: To find the critical value at the = 0.05 level of significance for a runs test, we use Table X if n1≤20 and n2≤20. Large-Sample Case: If n1>20 or n2>20, the critical value is found from Table V, the standard normal table.
124
Find the upper and lower critical values if n1=8 and n2=4.
Parallel Example 2: Obtaining Critical Values from Table X Find the upper and lower critical values if n1=8 and n2=4.
125
Solution From Table X, the lower critical value is 3 and the upper critical value is 10.
126
Runs Test for Randomness
To test the randomness of data, we can use the following steps, provided that the sample is a sequence of observations recorded in the order of their occurrence, and the observations can be categorized into two mutually exclusive categories.
127
Step 1: Assume the data are random. This forms
the basis of the null and alternative hypotheses, which are structured as follows: H0: The sequence of data is random H1: The sequence of data is not random
128
Step 2: Determine a level of significance, ,
based on the seriousness of making a Type I error. The level of significance is used to determine the critical value. Note: For the small-sample case, we must use the level of significance =0.05.
129
Step 3: Use the number of runs, r, to compute the test statistic.
Small-Sample Case Large-Sample Case r
130
, reject the null hypothesis
Step 4: Compare the critical value to the test statistic. Small-Sample Case Large-Sample Case If r ≤ lower critical value of r ≥ upper critical value, reject the null hypothesis If or , reject the null hypothesis
131
Step 5: State the conclusion.
132
Parallel Example 3: Testing for Randomness (Small-Sample Case)
The following data represent the league that won the World Series for the years Let “AL” represent the American League and “NL” represent the National League. AL NL AL AL AL NL AL NL AL AL NL AL Test the claim that leagues win the World Series in a non-random way at the = 0.05 level of significance.
133
Solution The sample is a sequence of observations (which league won the World Series in a particular year) recorded in the order of occurrence. The observations are in two mutually exclusive categories, American League or National League. The requirements for the test are satisfied.
134
Solution Step 1: We are testing the hypothesis that the sequence of observations is random. Thus, H0: The sequence of data is random H1: The sequence of data is not random Step 2: The level of significance is = The lower critical value is 3 and the upper critical value is 10 (Parallel Example 2).
135
Solution Step 3: The test statistic is r = 9 (Parallel Example 1). Step 4: Since the test statistic is between the lower and upper critical values, we do not reject the null hypothesis. Step 5: There is insufficient evidence to conclude that the World Series were won by the two leagues in a nonrandom way during the years
136
Inferences About Measures of Central Tendency
Section 15.3 Inferences About Measures of Central Tendency
137
Objective Conduct a one-sample sign test
138
A one-sample sign test is a nonparametric test that uses data, converted to plus and minus signs, to test a hypothesis regarding the median of a population. Data values equal to the assumed value of the median are ignored during the test.
139
Test Statistic for a One-Sample Sign Test
The test statistic will depend on the structure of the hypothesis test and on the sample size. Small-Sample Case: (n ≤ 25) Two-Tailed Left-Tailed Right-Tailed H0: M =M0 H1: M≠ M0 H1: M < M0 H1: M > M0 The test statistic, k, will be the smaller of the number of minus signs or plus signs The test statistic, k, will be the number of plus signs. The test statistic, k, will be the number of minus signs.
140
Large-Sample Case: (n > 25)
The test statistic, z, is where n is the number of minus and plus signs and k is obtained as described in the small-sample case.
141
Critical Values for a One-Sample Sign Test
Small-Sample Case: To find the critical value for a one-sample sign test, we use Table XI if n ≤ 25. Large-Sample Case: If n >25, the critical value is found from Table V, the standard normal table. The critical value is always located in the left tail of the standard normal distribution. For a two-tailed test, the critical value is For a left-tailed or right-tailed test, the critical value is
142
One-Sample Sign Test To test hypotheses regarding the median of a
population, we use the following steps, provided that the sample is a random sample. Step 1: Determine the null and alternative hypotheses. The hypotheses can be structured in one of three ways: Note: M0 is the assumed value of the median. Two-Tailed Left-Tailed Right-Tailed H0: M =M0 H1: M≠ M0 H1: M < M0 H1: M > M0
143
Step 2: Count the number of observations below M0, and assign them minus (-) signs. Count the number of observations above M0, and assign them plus (+) signs.
144
Step 3: Select a level of significance, ,
based on the seriousness of making a Type I error. The level of significance is used to determine the critical value. The critical value for small samples (n ≤ 25) is found from Table XI. The critical value for large samples (n > 25) is found from Table V.
145
Step 4: Obtain the test statistic, k.
Note that k is the smaller of the number of minus signs and plus signs in the two-tailed test, that k is the number of plus signs in the left-tailed test, and that k is the number of minus signs in the right tailed test In addition, n is the total number of plus and minus signs. Small-Sample Case Large-Sample Case k
146
If k ≤ critical value, reject the null hypothesis
Step 5: Compare the critical value to the test statistic. Small-Sample Case Large-Sample Case If k ≤ critical value, reject the null hypothesis Two-tailed: If , reject the null hypothesis. Left-tailed or right-tailed: If , reject the null hypothesis.
147
Step 6: State the conclusion.
148
Test the claim at the =0.05 level of significance.
Parallel Example 1: Conducting a One-Sample Sign Test (Small-Sample Case) According to the United States Bureau of Labor Statistics, in 2000, the median tenure of employees with their current employer is 3.5 years. An economist believes that the median has increased since then. To test this claim, he randomly selects 16 employed individuals, determines their length of employment and obtains the following data. Test the claim at the =0.05 level of significance.
149
Solution The data were obtained from a random sample so the conditions of the test are met. Step 1: We want to know if the median tenure of employees with their current employer is greater than 3.5 years. This is a right-tailed test. H0: M= versus H1: M > 3.5
150
Solution Step 2: There are 7 observations less than 3.5 and 9 observations greater than Thus, we have 7 minus signs and 9 plus signs with n=16. Step 3: Because this is a right-tailed test and n ≤ 25, we find the critical value at the = 0.05 level of significance with n=16 to be 4 (see Table XI). Step 4: The test statistic is the number of minus signs. Thus, k =7.
151
Solution Step 5: Since the test statistic is greater than the critical value, 4, we do not reject the null hypothesis. Step 6: There is insufficient evidence to support the hypothesis that the median tenure of employees with their employer is greater than 3.5 years.
152
Inferences About The Difference Between Two Medians: Dependent Samples
Section 15.4 Inferences About The Difference Between Two Medians: Dependent Samples
153
Objective Test a hypothesis about the difference between the medians of two dependent samples
154
The Wilcoxon Matched-Pairs Signed-Ranks Test is a nonparametric procedure used to test the equality of two population medians by dependent sampling.
155
Test Statistic for the Wilcoxon Matched-Pairs Signed-Ranks Test
The test statistic will depend on the size of the sample and on the alternative hypothesis. Let n represent the number of nonzero differences. Small-Sample Case: (n ≤ 30) Two-Tailed Left-Tailed Right-Tailed H0: MD =0 H1: MD≠ 0 H1: MD < 0 H1: MD > 0 Test Statistic: T is the smaller of T+ or |T-| Test Statistic: T = T+ Test Statistic: T = |T-|
156
Large-Sample Case: (n > 30)
The test statistic is given by where T is the test statistic from the small-sample case.
157
Critical Value for Wilcoxon Matched-Pairs Signed-Ranks Test
Small-Sample Case: (n ≤ 30) Using as the level of significance, the critical value(s) is (are) obtained from Table XII in Appendix A. Two-Tailed Left-Tailed Right-Tailed
158
Large-Sample Case: (n > 30)
Using as the level of significance, the critical value(s) is obtained from Table V in Appendix A. The critical value is always in the left tail of the standard normal distribution. Two-Tailed Left-Tailed Right-Tailed
159
Wilcoxon Matched-Pairs Signed-Ranks Test
If a hypothesis is made regarding the medians of two populations, we can use the following steps to test the hypothesis, provided that the samples are dependent random samples and the distribution of the differences is symmetric. Although tests for verifying the symmetry of data exist, we do not present them in this text. All the data given satisfy the second requirement.
160
Step 1: Determine the null and alternative hypotheses
Step 1: Determine the null and alternative hypotheses. The hypotheses can be structured in one of three ways: Note: MD is the median of the differences of matched pairs. Two-Tailed Left-Tailed Right-Tailed H0: MD = 0 H1: MD≠ 0 H1: MD < 0 H1: MD > 0
161
Step 2: Compute the differences in the matched-pairs observations
Step 2: Compute the differences in the matched-pairs observations. Rank the absolute value of all sample differences from smallest to largest after discarding those differences that equal 0. Handle ties by finding the mean of the ranks for tied values. Assign negative values to the ranks where the differences are negative and positive values to the ranks where the differences are positive. Find the sum of the positive ranks, T+, and the sum of the negative ranks T-.
162
Step 3: Draw a boxplot of the differences to compare the sample data from the two populations. This helps to visualize the difference in the medians.
163
Step 4: Choose a level of significance, ,
based on the seriousness of making a Type I error. The level of significance is used to determine the critical value. The critical value is found from Table XII for small samples (n ≤ 30). The critical value is found from Table V for large samples (n > 30).
164
Step 5: Compute the test statistic. Small-Sample Case (n ≤ 30)
Two-Tailed Left-Tailed Right-Tailed H0: MD =0 H1: MD≠ 0 H1: MD < 0 H1: MD > 0 Test Statistic: T is the smaller of T+ or |T-| Test Statistic: T = T+ Test Statistic: T = |T-|
165
Large-Sample Case (n > 30)
where T is the test statistic from the small-sample case.
166
Step 6: Compare the critical value with the test statistic.
Small-Sample Case Large-Sample Case Two-tailed: If T < , reject H0. Two-tailed: If , reject H0. Left-tailed: If T < , reject H0. Left-tailed: If , reject H0. Right-tailed: If T < , reject H0. Right-tailed: If , reject H0.
167
Step 7: State the conclusion.
168
Parallel Example 1: Wilcoxon Matched-Pairs Signed-Ranks
Parallel Example 1: Wilcoxon Matched-Pairs Signed-Ranks Test (Small-Sample Case) The data on the following slide represent the cost of a one night stay in Hampton Inn Hotels and La Quinta Inn Hotels for a random sample of 10 cities. Test the claim that Hampton Inn Hotels are priced differently than La Quinta Hotels at the =0.05 level of significance.
169
City Hampton Inn La Quinta Dallas 129 105 Tampa Bay 149 96 St. Louis 49 Seattle 189 San Diego 109 119 Chicago 160 89 New Orleans 72 Phoenix 59 Atlanta 90 Orlando 69
170
Solution The data were obtained randomly. We assume that the symmetry requirement is satisfied. Step 1: We want to know if the hotels are priced differently. This is a two-tailed test. H0: MD =0 versus H1: MD ≠ 0
171
Solution Step 2: In order to calculate T+ and T-, we must find the differences, rank them, and then attach the sign of the difference to the ranks. The differences and their signed ranks are given in the next slide.
172
City Hampton Inn La Quinta D=HI-LQ |D| Signed Ranks Dallas 129 105 24 +2 Tampa Bay 149 96 53 +6 St. Louis 49 100 +10 Seattle 189 40 +4 San Diego 109 119 -10 10 -1 Chicago 160 89 71 +8 New Orleans 72 77 +9 Phoenix 59 70 +7 Atlanta 90 39 +3 Orlando 69 50 +5
173
Solution Step 2: From the previous slide, we find that T+=54 and |T-| = 1.
174
Solution Step 3: The figure below shows a boxplot of the differences. The boxplot indicates that the sample-median difference is about 51.
175
Solution Step 4: We are testing the hypothesis at the =0.05 level of significance. Since this is a two-tailed test and the sample size is less than 30, we find the critical value with n=10 by using Table XII and obtain T0.025=8. Step 5: The test statistic is the smaller of T+ and |T-| which is 1.
176
Solution Step 6: The test statistic is less than the critical value (1< 8), so we reject the null hypothesis. Step 7: There is sufficient evidence at the =0.05 level of significance to conclude that the median room price at Hampton Inns is different than the median room price at La Quinta Inns.
177
Section 15.5 Inferences About The Difference Between Two Medians: Independent Samples
178
Objective Test a hypothesis about the difference between the medians of two independent samples
179
The Mann-Whitney Test is a nonparametric procedure that is used to test the equality of two population medians from independent samples.
180
Test Statistic for the Mann-Whitney Test
The test statistic will depend on the size of the samples from each population. Let n1 represent the sample size for population X and n2 represent the sample size for population Y. Small-Sample Case: (n1 ≤ 20 and n2 ≤ 20 ) If S is the sum of the ranks corresponding to the sample from population X, then the test statistic, T, is given by Note: The value of S is always obtained by summing the ranks of the sample data that correspond to Mx, the median of population X, in the hypothesis.
181
Large-Sample Case: (n1 > 20 or n2 > 20 )
From the Central Limit Theorem, the test statistic is given by where T is the test statistic from the small-sample case.
182
Critical Value for Mann-Whitney Test
Small-Sample Case: (n1 ≤ 20 and n2 ≤ 20 ) Using as the level of significance, the critical value(s) is(are) obtained from Table XIII in Appendix A. Two-Tailed Left-Tailed Right-Tailed
183
Large-Sample Case: (n1 > 20 or n2 > 20 )
Using as the level of significance, the critical value(s) is(are) obtained from Table V in Appendix A. Two-Tailed Left-Tailed Right-Tailed
184
Mann-Whitney Test To test hypotheses regarding the medians of two
populations, we can use the following steps provided that the samples are independent random samples and the shape of the distributions are the same. Throughout this section, we will assume that the condition that the shape of the distributions be the same is satisfied.
185
Step 1: Draw a side-by-side boxplot to compare the sample data from the two populations. This helps to visualize the difference in the medians.
186
Step 2: Determine the null and alternative hypotheses
Step 2: Determine the null and alternative hypotheses. The hypotheses are structured as follows: Note: Mx is the median of population X and My is the median of population Y. Two-Tailed Left-Tailed Right-Tailed H0: Mx = My H1: Mx ≠ My H1: Mx < My H1: Mx > My
187
Step 3: Rank all sample observations from smallest to largest
Step 3: Rank all sample observations from smallest to largest. Handle ties by finding the mean of the ranks for tied values. Find the sum of the ranks for the sample from population X.
188
Step 4: Choose a level of significance, ,
to match the seriousness of making a Type I error. The level of significance is used to determine the critical value. The critical value is found from Table XIII for small samples (n1 ≤ 20 and n2 ≤ 20) and from Table V for large samples (n1 > 20 or n2 > 20).
189
Step 5: Compute the test statistic
Step 5: Compute the test statistic. Note that S is the sum of the ranks obtained from the sample observations from population X. In addition, n1 is the size of the sample from population X, and n2 is the size of the sample from population Y. Small-Sample Case Large-Sample Case
190
Step 6: Compare the critical value with the test statistic.
Small-Sample Case Large-Sample Case Two-tailed: If T < , or T > , reject H0. Two-tailed: If or , reject H0. Left-tailed: If T < , reject H0. Left-tailed: If , reject H0. Right-tailed: If T > , reject H0. Right-tailed: If , reject H0.
191
Step 7: State the conclusion.
192
Parallel Example 1: Mann-Whitney Test (Small-Sample Case)
A researcher wanted to know whether “state” quarters had a weight that is more than “traditional” quarters. He randomly selected 18 “state” quarters and 16 “traditional” quarters, weighed each of them and obtained the following data.
194
Parallel Example 1: Mann-Whitney Test (Small-Sample Case)
Test the claim that state quarters have a higher median weight than traditional quarters at the =0.05 level of significance.
195
Solution Step 1:
196
Solution Step 1: Based on the boxplots, the median weight for the state quarters is higher. We want to estimate whether this difference is due to differences in the population medians or to sampling error.
197
H0: MState = MTraditional versus H1: MState > MTraditional
Solution Step 2: We want to know if the median weight for the state quarters is higher than the median weight of the traditional quarters. This is a right-tailed test. H0: MState = MTraditional versus H1: MState > MTraditional
198
Solution Step 3: In order to calculate the test statistic, we combine the two data sets into one data set and arrange the data in ascending order. Ranks are shown on the following slide.
200
Solution Step 3: After ranking the observations, we add up the ranks corresponding to the state quarters to obtain S = =376.5
201
Solution Step 4: Since this is a right-tailed test and both sample sizes are less than 20, we determine the right critical value with n1=18 and n2=16 at the =0.05 level of significance from Table XIII and obtain w0.95 = n1n2-w0.05 = 18(16)-96 = 192.
202
Solution Step 5: The test statistic is
203
Solution Step 6: Since the test statistic is greater than the critical value (205.5 > 192), we reject the null hypothesis. Step 7: There is sufficient evidence at the = 0.05 level of significance to conclude that the median weight of “state” quarters is greater than that of “traditional” quarters.
204
Spearman’s Rank-Correlation Test
Section 15.6 Spearman’s Rank-Correlation Test
205
Objective Perform Spearman’s rank-correlation test
206
The Spearman’s rank-correlation test is a nonparametric procedure that is used to test hypotheses regarding the association between two variables.
207
Test Statistic for Spearman’s Rank-Correlation Test
The test statistic will depend on the size of the sample, n, and on the sum of the squared differences where di = the difference in the ranks of the two observations in the ith ordered pair. The test statistic, rs, is also called Spearman’s rank-correlation coefficient.
208
CAUTION! means to square the differences first and then add up the squared differences.
209
Critical Value for Spearman’s Rank-Correlation Test
Using as the level of significance, the critical value(s) is(are) obtained from Table XIV in Appendix A. For a two-tailed test, be sure to divide the level of significance, , by 2.
210
Spearman’s Rank-Correlation Test
To test hypotheses regarding the association between two variables X and Y, we can use the following steps, provided that the data are a random sample of n ordered pairs and each pair of observations is two measurements taken on the same individual. Notice that there is no requirement about the form of the distribution of the data.
211
Step 1: Determine the null and alternative hypotheses which are structured as follows:
Two-Tailed One-Tailed H0: X and Y are not associated H1: X and Y are associated positively associated negatively associated
212
Step 2: Rank the X-values and rank the Y-values.
Compute the differences between ranks and then square these differences. Compute the sum of the squared differences.
213
Step 3: Choose a level of significance, ,
based on the seriousness of making a Type I error. The level of significance is used to determine the critical value. The critical value is found in Table XIV.
214
Step 4: Compute the test statistic.
where n is the sample size and di is the difference in the ranks of the two observations in the ith ordered pair.
215
Step 5: Compare the critical value with the test statistic. Hypothesis
Decision Rule H0: X and Y are not associated H1: X and Y are associated Reject H0 if rs is greater than the critical value or if rs is less than the negative of the critical value in Table XIV H1: X and Y are positively associated Reject H0 if rs is greater than the critical value in Table XIV H1: X and Y are negatively associated Reject H0 if rs is less than the negative of the critical value in Table XIV
216
Step 6: State the conclusion.
217
Parallel Example 1: Spearman’s Rank-Correlation Test
Is the price of a sport’s car associated with its performance? The following data represent the ranks of the price and performance of 8 sport’s cars. Using Spearman’s Rank Correlation, determine if the two variables are associated at the = 0.05 level of significance.
218
Car Rank of Price Rank of Performance BMW M3 Coupe 5 8 Chevy Corvette Z06 4 Ferrari 360 Modena 1 Lotus Elise 7 2 Mazda MP3 Mitsubishi Lancer Evolution VII 6 3 Porsche Boxster S Porsche 911 Turbo
219
Solution Step 1: We are looking for evidence that price and performance of sport’s cars are associated. Let X represent the price of the sport’s car and Y represent performance. The null and alternative hypotheses are as follows: H0: X and Y are not associated H1: X and Y are associated
220
Solution Step 2: Rank the X-values and rank the Y-values. Compute the differences in ranks and then square the differences. Calculate the sum of the squared differences to obtain Details are on the following slide.
221
Rank of X Rank of Y d = X-Y d2 5 8 -3 9 4 1 7 2 25 6 3
222
Solution Step 3: This is a two-tailed test with n=8 and = From Table XIV we determine the critical value to be
223
Solution Step 4: The test statistic is
224
Solution Step 5: Since the test statistic is less than the critical value and greater than the negative of the critical value ( < < 0.738), we fail to reject the null hypothesis. Step 6: There is insufficient evidence at the = 0.05 level of significance to conclude that the price and performance of sport’s cars are associated.
225
Large-Sample (n > 100) Approximation
If n > 100, the test statistic for Spearman’s Rank-Correlation Test is Compare this test statistic with the critical value obtained from the standard normal table, Table V. For a two- tailed test, the critical values are When testing for positive association, the critical value is When testing for negative association, the critical value is
226
Section 15.7 Kruskal-Wallis Test
227
Objective Test a hypothesis using the Kruskal-Wallis test
228
The Kruskal-Wallis Test is a nonparametric procedure that is used to test whether k independent samples come from populations with the same distribution.
229
Test Statistic for the Kruskal-Wallis Test
The test statistic for the Kruskal-Wallis test is
230
A computational formula for the test statistic is
where Ri is the sum of the ranks of the ith sample is the sum of the ranks squared for the first sample is the sum of the ranks squared for the second sample, and so on n1 is the number of observations in the first sample n2 is the number of observations in the second sample, and so on N is the total number of observations (N=n1+n2+···+nk) k is the number of populations being compared
231
Critical Value for Kruskal-Wallis Test
Small-Sample Case When three populations are being compared and when the sample size from each population is 5 or less, the critical value is obtained from Table XV in Appendix A. Large-Sample Case When four or more populations are being compared or the sample size from one population is more than 5, the critical value is with k-1 degrees of freedom, where k is the number of populations and is the level of significance.
232
Kruskal-Wallis Test To test hypotheses regarding the distribution of three or more populations, we can use the following steps, provided that two requirements are satisfied: The samples are independent random samples The data can be ranked Step 1: Draw side-by-side boxplots to compare the sample data from the populations. Doing so helps to visualize the differences, if any, between the medians.
233
H0: the distributions of the populations are the same
Step 2: State the null and alternative hypotheses, which are structured as follows: H0: the distributions of the populations are the same H1: the distributions of the populations are not the same Step 3: Rank all sample observations from smallest to largest. Handle ties by finding the mean of the ranks for tied values. Find the sum of the ranks for each sample.
234
Step 4: Choose a level of significance, ,
to match the seriousness of making a Type I error. The level of significance is used to determine the critical value. The critical value is found from Table XV for small samples. The critical value is with k-1 degrees of freedom (found in Table VII) for large samples.
235
Step 5: Compute the test statistic.
236
Step 6: Compare the critical value to the test
statistic. We reject the null hypothesis if the test statistic is greater than the critical value.
237
Step 7: State the conclusion.
238
Parallel Example 1: Kruskal-Wallis Test
The following data represent the weight (in grams) of pennies minted at the Denver mint in 1990, 1995, and Test the claim that the distribution of penny weights differs for the three years at the = 0.05 level of significance.
240
Solution The samples are independent random samples that can be ranked. Therefore, the conditions for the Kruskal-Wallis test are met.
241
Solution Step 1: Based on boxplots of the data, the medians do not appear to differ significantly.
242
Solution Step 2: We are interested in determining whether the distribution of penny weights differs for the three years. The null and alternative hypotheses are as follows: H0: the distribution of penny weights are the same for the three years H1: the distribution of penny weights are not the same for the three years
243
Solution Step 3: The ranks of the pennies are given in parentheses.
2.50 (17.5) (26.5) 2.50 (17.5) 2.50 (17.5) (32) (5) 2.49 (10.5) (17.5) 2.49 (10.5) 2.53 (30) (5) (17.5) 2.46 (1) (26.5) 2.48 (5) 2.50 (17.5) (17.5) 2.52 (26.5) 2.47 (2) (10.5) 2.51 (23) 2.53 (30) (30) (10.5) 2.51 (23) (5) (23) 2.49 (10.5) (33) (17.5) 2.48 (5) (10.5) 2.52 (26.5)
244
Solution Step 3: We sum the ranks for each of the three years to obtain the following: Year 1990 1995 2000 Sample size n1=11 n2=11 n3=11 Sum of ranks R1=164.5 R2=214 R3=182.5
245
Solution Step 4: Since the sample sizes for each population are greater than 5, we find the critical value from the chi-square distribution with k-1=3-1=2 degrees of freedom with = Thus, the critical value is
246
Solution Step 5: Note that N= =33. The test statistic is
247
Solution Step 6: Since the test statistic is less than the critical value, we fail to reject the null hypothesis. Step 7: There is insufficient evidence at the = 0.05 level of significance to conclude that the distribution of penny weights differs for the years 1990, 1995 and 2000.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.