Chapter 18(1)
Chapter 18(1)
1
Chapter 18 - Nonparametric Tests
2
Confidence Intervals: Class Exercise
The school psychologist is currently busy studying
stress during exam time. She has developed a
questionnaire that she believes measures stress.
A score above 80 indicates stress at a dangerous
level.
A random sample of 16 senior learners revealed an
average stress level of 84.25.
You may assume that stress levels are normally distributed with
standard deviation of 8.
µ = 80
3
Nonparametric Tests (Chapter 18) linked to Parametric Tests (Ch 9 & 10)
Previously: Now:
• Normal distribution or big • Small samples
samples • No assumptions about the specific
• Quantitative data form of the population’s probability
distribution
• Categorical or quantitative data
4
STK110: Chapter 9: Hypothesis Testing
Median: 50% of the values are less than the median and 50% of the
values are more than the median.
450
5
18.1 The Sign Test
6
18.1 The Sign Test Example: The sign of the differences
The following data is weekly sales of a new product and the
manufacturer’s estimate that the median sales should be $450 per
week on a per store basis
Store Weekly Sign Store Weekly Sign
Number sales($) Number sales($)
56 485 + 63 474 +
19 562 + 39 662 +
36 415 - 84 380 -
128 860 + 102 515 +
12 426 - 44 721 +
H0: Median = 450 H0: p = 0.5
Ha: Median ≠ 450 Ha: p ≠ 0.5
Test statistic: The number of plus signs = 7
Decision rule: Go to the Binomial table with n=10 and p = 0.5 (or use
the BINOM.DIST function) to get the p-value = probability to get a
value of 7 or more. 7
18.1 The Sign Test Example: The sign of the differences
The normal approximation to binomial probabilities works well even for moderately
large n as long as p is not close to zero or one
1.5 2.5
Continuity
correction:
9
Normal approximation of the Binomial Distribution: Example Home sales
One year ago the median price of a new home was $236000. Current downturn in
economy has real estates using sample data on recent home sales to determine if the
population median price of a new home is less today than a year ago. A random
sample of 61 recent new home sales was investigated resulting in one price the same
as the hypothesized median (ignore this one) and 22 plus signs. (part of the Excel file
HomeSales is shown.
10
Normal approximation of the Binomial Distribution: Example Home sales
H0: Median ≥ 236 000 H0: p = 0.5 Note that sample size was
reduced by one value that was
Ha: Median < 236 000 Ha: p ≠ 0.5 the same as the median value
12
18.1 The Sign Test: Class exercise
H0: Median ≤ 4
Ha: Median >4
13
14
STK 110 Statistical Inference Concerning (µ1-µ2)
µ = 125 µ = 135
…mmmm, is there a
significant difference
between the 2 population
means?
15
STK 110 Statistical Inference Concerning (µ1-µ2)
16
Nonparametric Tests: two independent samples
17
Nonparametric Tests: two independent samples
H0: µY = µX
Ha: µY > µX
?
The nonparametric analogue tests for equality of medians in the two
distributions.
18
18.3 The Mann-Whitney-Wilcoxon Test: Example
Two fuel additives are being tested to determine their effect on petrol mileage.
Seven cars were tested with additive 1 and nine cars with additive 2. Data shows
miles per gallon obtained with the two additives. Test whether there is a significant
difference between petrol mileage for the two additives.
19
18.3 The Mann-Whitney-Wilcoxon Test, Normal approximation:
Example
Pooled Ranks
Mileage per gallon petrol
16.7 1
Additive 1 Additive 2
17.3 2
17.3 18.7
17.5 3
18.4 17.8
17.8 4
19.1 21.3
18.2 5
16.7 21.0
18.4 6
18.2 22.1
18.6 7
18.6 18.7
18.7 8.5
17.5 19.8
18.7 8.5
20.7
19.1 10
20.2
19.8 11
Step 1: Pool the data from the two groups 20.2 12
and order the values from lowest to highest 20.7 13
Step 2: Assign ranks to the values in 21 14
increasing order. When there are ties, the 21.3 15 20
mean ranks are assigned. 22.1 16
18.3 The Mann-Whitney-Wilcoxon Test, Normal approximation:
Example
Pooled Ranks
Mileage per gallon petrol
16.7 1
Additive 1 Additive 2
17.3 2
17.3 2 18.7 8.5
17.5 3
18.4 6 17.8 4
17.8 4
19.1 10 21.3 15
18.2 5
16.7 1 21.0 14
18.4 6
18.2 5 22.1 16
18.6 7
18.6 7 18.7 8.5
18.7 8.5
17.5 3 19.8 11
18.7 8.5
20.7 13
19.1 10
20.2 12
19.8 11
34 20.2 12
Step 3: Return to the two separate samples
20.7 13
and show ranks.
21 14
Step 4: Use the sum of the ranks for 21.3 15 21
sample 1 as the test statistic W
22.1 16
18.3 The Mann-Whitney-Wilcoxon Test, Normal approximation:
Example
22