EXAMPLE 16 Calculating the Kruskal-Wallis test statistic
citybusiness
The U.S. Small Business Administration publishes the number of small businesses in medium-size cities. We are interested in testing whether the population median number of small businesses per city is the same in Florida, North Carolina, and Texas. For the following independent random samples given in the table below, calculate the test statistic for the Kruskal-Wallis test, using these steps:
Florida city | Number of small businesses |
North Carolina city |
Number of small businesses |
Texas city | Number of small businesses |
---|---|---|---|---|---|
Gainesville | 3,718 | Asheville | 4,883 | El Paso | 8,150 |
Tallahassee | 4,948 | Wilmington | 5,825 | Lubbock | 4,403 |
Daytona Beach | 9,489 | Greenville | 2, 153 | Killeen | 3,274 |
Melbourne | 8,771 | Fayetteville | 3,424 | College Station | 2,276 |
Sarasota | 13,729 | Rocky Mount | 2,108 | Laredo | 3,070 |
Lakeland | 6,865 | Amarillo | 3,855 | ||
Naples | 7,184 |
Solution
Combined data | 2,108 | 2,153 | 2,276 | 3,070 | 3,274 | 3,424 | 3,718 | 3,855 | 4,403 |
Rank | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Combined data | 4,883 | 4,948 | 5,825 | 6,865 | 7,184 | 8,150 | 8,771 | 9,489 | 13,729 |
Rank | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
14-38
The sum of the ranks for Florida is
The sum of the ranks for North Carolina is
The sum of the ranks for Texas is
Also, there are 7 cities in the Florida sample, 5 cities in the North Carolina sample, and 6 cities in the Texas sample, so that , , and , and the total sample size is .
Finally, the value of the test statistic is
Later, we will find out if this value for the test statistic warrants rejection of the null hypothesis. But first, we need to learn the hypotheses for the Kruskal-Wallis test.
NOW YOU CAN DO
Exercises 7–14.