Вы находитесь на странице: 1из 59

Nonparametric Statistics for

Business Research Methods


Parametric vs Nonparametric Statistics
• Parametric Statistics are statistical techniques
based on assumptions about the population from
which the sample data are collected.
– Assumption that data being analyzed are randomly
selected from a normally distributed population.
– Requires quantitative measurement that yield interval
or ratio level data.

• Nonparametric Statistics are based on fewer


assumptions about the population and the
parameters.
– Sometimes called “distribution-free” statistics.
– A variety of nonparametric statistics are available for
use with nominal or ordinal data.
Nonparametric Methods
• In short, we can define a nonparametric method
as one that satisfies at least one of the following
criteria.
 The method deals with enumerative data (data that are
frequency counts).
 The method does not deal with specific population
parameters such as µor σ.
 The method does not require assumptions about specific
population distributions (in particular, the assumption of
normality).
When Should we use a Nonparametric Method?

• A nonparametric test should be used instead of its


parametric counterpart whenever
1. data are of the nominal or ordinal scale of
measurement, or
2. data are of the interval or ratio scale of
measurement but one or more other
assumptions, such as the normality of the
underlying population distribution, are not met.
Advantages of Nonparametric Techniques
 Sometimes there is no parametric
alternative to the use of nonparametric
statistics.
 Certain nonparametric test can be used to
analyze nominal data.
 Certain nonparametric test can be used to
analyze ordinal data.
 The computations on nonparametric
statistics are usually less complicated than
those for parametric statistics, particularly
for small samples.
Disadvantages of Nonparametric Statistics
• Compared to a parametric test, the
information in the data is used less
efficiently, and the power of the test © 1984-1994 T/Maker Co.
will be lower.
– If data permit using parametric procedures
– Example: converting data from ratio to ordinal
• Nonparametric tests are usually not as
widely available and well know as
parametric tests.
• For large samples, the calculations for
many nonparametric statistics can be
tedious.
• Tables not widely available
Runs Test – A Test for Randomness
• The one-sample runs test is a nonparametric test of
randomness. The runs test is used to determine whether
the order or sequence of observations in a sample is
random by analyzing the number of runs it contains.
• A run is a sequence of like elements that are preceded
and followed by different elements or no element at all.
• For example, if a sample of people contains both men
and women, one run could be a continuous succession of
women.
• Example with two runs: F, F, F, F, F, F, F, F, M, M, M, M, M, M, M
• Example with fifteen runs: F, M, F, M, F, M, F, M, F, M, F, M, F, M, F
Runs Test: Sample Size Consideration
• The one-sample runs test takes into consideration the size
of the sample, n, the number observations in the sample
having each characteristic, n1, n2 (man, woman, etc.)
• Suppose, sample size: n
• Number of sample member possessing the first
characteristic: n1
• Number of sample members possessing the second
characteristic: n2
n = n1 + n2
• The one-sample runs test is conducted differently for small
samples than it is for large samples.
• If both n1 and n2 are≤ 20, the small sample runs test is
appropriate.
Runs Test: Small Sample
• A two-tailed hypothesis test for randomness:
– H0: Observations are generated randomly
– H1: Observations are not randomly generated
• The test statistic is: R number of runs
• The decision rule is to reject H0 at level α if R ≤ C1 or
R ≥ C2, where C1 and C2 are critical values obtained
from Table, with total tail probability P(R ≤ C1) +
P(R≥C2) = α .
Runs Test: Small Sample Example
• As an example, suppose 26 cola drinkers are sampled
randomly to determine whether they prefer regular cola
or diet cola.
• The random sample contains 18 regular cola drinkers
and eight diet cola drinkers.
• Let C denote regular cola drinkers and D denote diet cola
drinkers. Suppose the sequence of sampled cola drinkers
is
DCCCCDCCDCCCCDCDCCCDDDCCC.
• Is this sequence of cola drinkers evidence that the
sample is not random?
Runs Test: Small Sample Example
H0: The observations in the sample are randomly generated.
Ha: The observations in the sample are not randomly generated.
 = .05
n1 = 18
n2 = 8
If 7  R  17, do not reject H0
Otherwise, reject H0.
1 2 3 4 5 6 7 8 9 10 11 12
D CCCCC D CC D CCCC D C D CCC DDD CCC
R = 12
Since 7  R = 12  17, do not reject H0
Large-Sample Runs Test:
Using the Normal Approximation
• Tables generally do not contain critical values
for n1 and n2 greater than 20.
• As the sample sizes n1 and n2 increase, the
distribution of the number of runs approaches
a normal distribution.
• The sampling distribution of R is
approximately normal with a mean and
standard deviation shown in the next slide.
Runs Test: Large Sample
If either n1 or n2 is > 20, the 2 n1 n2
sampling distribution of R is   1
approximately normal.
R
n1  n2

2 n1 n2 (2 n1 n2  n1  n2)
 
(n1 n2)
R 2
 (n1  n2  1)

The test statistic is a z statistic computed as R 


Z R

 R
Runs Test: Large Sample Example
• Consider the following manufacturing example. A machine
produces parts that are occasionally flawed. When the machine is
working in adjustment, flaws still occur but seem to happen
randomly.
• A quality-control person randomly selects 50 of the parts produced
by the machine today and examines them one at a time in the
order that they were made. The result is 40 parts with no flaws and
10 parts with flaws. The sequence of no flaws (denoted by N) and
flaws (denoted by F ) is shown below.
NNN F NNNNNNN F NN FF NNNNNN F NNNN F NNNNNN FFFF
NNNNNNNNNNNN
• Using an alpha of .05, the quality controller tests to determine
whether the machine is producing randomly (the flaws are
occurring randomly).
Runs Test: Large Sample Example
H0: The observations in the sample are randomly generated.
Ha: The observations in the sample are not randomly generated.
 = .05
n1 = 40
n2 = 10
If -1.96  Z  1.96, do not reject H0
Otherwise, reject H0.
1
1 2 3 4 5 6 7 8 9 0 11
NNN F NNNNNNN F NN FF NNNNNN F NNNN F NNNNN

12 13
FFFF NNNNNNNNNNNN R = 13
Runs Test: Large Sample Example
2 n1 n2 2 n1 n2 (2 n1 n2  n1  n2)
R   1  
n1 n2 (n1 n2)
R 2
 (n1  n2  1)
2(40)(10)
 1 2(40)(10)[2(40)(10)  (40)  (10)]
40  10 
(4010)
2
 17  (40  10  1)
 2.213

R  R 13  17 -1.96  Z = -1.81  1.96,


Z   181
.

do not reject H0

R
2.213
Mann-Whitney U Test

• Nonparametric counterpart of the t test for


independent samples
• Does not require normally distributed
populations
• May be applied to ordinal data
• Assumptions
– Independent Samples
– At Least Ordinal Data
Mann-Whitney U Test
• The null and alternative hypotheses for the Mann-
Whitney U test are
– H0: The distributions of the two populations are identical
– H1: The two population distributions are not identical
• Often, the hypothesis test in equation is written in
terms of equality versus nonequality of two population
means or equality versus nonequality of two population
medians.
• As such, we may also have one-tailed versions of the
test.
Mann-Whitney U Test
The Computational Procedure
 Computation of the U test begins by arbitrarily designating
two samples as group 1 and group 2.
 The data from the two groups are combined into one group,
with each data value retaining a group identifier of its
original group.
 The pooled values are then ranked from 1 to n, with the
smallest value being assigned a rank of 1.
 To any ties we assign the average rank of the tied
observations.
 The sum of the ranks of values from group 1 is computed
and designated as R1 and the sum of the ranks of values
from group 2 is designated as R2.
Mann-Whitney U Test:
Sample Size Consideration
• The Mann-Whitney U test is implemented
differently for small samples than for larges
samples.
• Size of sample one: n1
• Size of sample two: n2
• If both n1 and n2 are ≤ 10, the small sample
procedure is appropriate.
• If either n1 or n2 is greater than 10, the large
sample procedure is appropriate.
Mann-Whitney U Test:
• The null and alternative hypotheses:
H0: The distributions of two populations are identical
H1: The two population distributions are not identical
• With small samples, the next step is to calculate a U
statistic for R1 and for R2 as
• The Mann-Whitney U statistic:

n1 (n1  1)
U1  n1n2   R1 R 1   Ranks from sample 1
2
n 2(n 2  1)
U 2  n1n2   R2 R2   Ranks from sample 2
2
• where n1 is the sample size from population 1 and n2 is
the sample size from population 2.
• The test statistic is the smallest of these two U values.
Mann-Whitney U Test:
Small Sample Example
• Is there a difference between health service workers and
educational service workers in the amount of compensation
employers pay them per hour?
• Suppose a random sample of seven health service workers is taken
along with a random sample of eight educational service workers
from different parts of the country. Each of their employers is
interviewed and figures are obtained on the amount paid per hour
for employee compensation for these workers. The data on the
following page indicate total compensation per hour.
• Use a Mann-Whitney U test to determine whether these two
populations are different in employee compensation.
Mann-Whitney U Test:
Small Sample Example

H0: The health service population is Health Educational


identical to the educational Service Service
service population on employee 20.10 26.19
compensation 19.80 23.88
Ha: The health service population is 22.36 25.50
not identical to the educational 18.75 21.64
service population on employee
21.90 24.85
compensation
22.96 25.30
20.75 24.12
23.45
Mann-Whitney U Test:
Small Sample Example
 = .05 Compensation Rank Group
18.75 1 H
If the final p-value < .05, reject H0. 19.80 2 H
20.10 3 H
20.75 4 H
R1 = 1 + 2 + 3 + 4 + 6 + 7 + 8 21.64 5 E
21.90 6 H
= 31
22.36 7 H
22.96 8 H
R2 = 5 + 9 + 10 + 11 + 12 + 13 + 14 + 15
23.45 9 E
= 89 23.88 10 E
24.12 11 E
24.85 12 E
25.30 13 E
25.50 14 E
26.19 15 E
Mann-Whitney U Test:
Small Sample Example

n (n  1) Since U2 < U1, we use U = 3 as the test


U n n
1 1 2
 1
2
1
 R
1 statistic.

(7)(8)
 (7)(8)   31 Let n1 = 7; n2 = 8.
2
 53 Critical Value ( at α =0.05) = 10

n (n  1) Since Computed Value is less than the


U 2  n1 n2  2
2
2
 R 2
Critical value
(8)(9) reject H0.
 (7)(8) n1 n2   89
2
3
Mann-Whitney U Test:
Formulas for Large Sample Case
For large sample sizes, the value of U is approximately
normally distributed.
A z score can be calculated from U by the following formulas.

n n  1 n n
U  n1 n2  1 1

R1  U
 1
2
2

2
where : n1  number in group 1 n  n n  n 
1
 U

1 2 1

12
2

n  number in group 2
2
U 
R  sum or the ranks of Z U
1  U

values in group 1
Mann-Whitney U Test:
Example
• For example, the Mann-Whitney U test can be used
to determine whether there is a difference in the
average income of families who view PBS television
and families who do not view PBS television.
• Suppose a sample of 14 families that have identified
themselves as PBS television viewers and a sample of
13 families that have identified themselves as non-
PBS television viewers are selected randomly.
Mann-Whitney U Test:
Example PBS Non-PBS
24,500 41,000
39,400 32,500
Ho: The incomes for PBS viewers and 36,800 33,000
non-PBS viewers are identical 44,300 21,000
57,960 40,500
Ha: The incomes for PBS viewers and 32,000 32,400
non-PBS viewers are not 61,000 16,000
identical 34,000 21,500
43,500 39,500
55,000 27,600
n1 = 14
 .05 39,000 43,500
62,500 51,900
If Z  1.96 or Z  1.96, reject Ho
n2 = 13 61,400 27,800
53,000
Mann-Whitney U Test:
Example
Income Rank Group Income Rank Group
16,000 1 Non-PBS 39,500 15 Non-PBS
21,000 2 Non-PBS 40,500 16 Non-PBS
21,500 3 Non-PBS 41,000 17 Non-PBS
24,500 4 PBS 43,000 18 PBS
27,600 5 Non-PBS 43,500 19.5 PBS
27,800 6 Non-PBS 43,500 19.5 Non-PBS
32,000 7 PBS 51,900 21 Non-PBS
32,400 8 Non-PBS 53,000 22 PBS
32,500 9 Non-PBS 55,000 23 PBS
33,000 10 Non-PBS 57,960 24 PBS
34,000 11 PBS 61,000 25 PBS
36,800 12 PBS 61,400 26 PBS
39,000 13 PBS 62,500 27 PBS
39,400 14 PBS
PBS and Non-PBS Viewers: Calculation
of U

R  4  7  11  12  13  14  18  19.5  22  23  24  25  26  27
1

 245.5

U n n  n n  1
1
R
1
1 2 1
2
 1413 
1415  245.5
2
 41.5
PBS and Non-PBS Viewers: Conclusion

n n
U 
 Z U

U
 1 2
2  U
1413 .  91
415
 
2 20.6
 91  2.40
n  n n  n 
1 Because this test is two-tailed with α= .05, the
 U

1 2 1

12
2
critical values are z.025 = 1.96.
If the test statistic is greater than 1.96 or less
1413 28 than -1.96, the decision is to reject the null

12 hypothesis.
 20.6
Z Cal
 2.40  1.96, reject Ho
Wilcoxon Matched-Pairs
Signed Rank Test
 A nonparametric alternative to the t test for
related samples
 Before and After studies
 Studies in which measures are taken on the
same person or object under different
conditions
 Studies or twins or other relatives
Wilcoxon Matched-Pairs
Signed Rank Test
 Differences of the scores of the two matched
samples
 Differences are ranked, ignoring the sign
 Ranks are given the sign of the difference
 Positive ranks are summed
 Negative ranks are summed
 T is the smaller sum of ranks
Wilcoxon Matched-Pairs Signed Rank Test:
Sample Size Consideration
• n is the number of matched pairs
• If n > 15, T is approximately normally distributed, and a
Z test is used.
• If n  15, a special “small sample” procedure is
followed.
• Two assumptions underlie the use of this technique:
– The paired data are randomly selected.
– The underlying distributions are symmetrical.
Wilcoxon Matched-Pairs Signed Rank Test:
Small Sample Example
• As an example, consider the survey by American
Demographics that estimated the average annual household
spending on healthcare.
• The U.S. metropolitan average was $1,800. Suppose six
families in Pittsburgh, Pennsylvania, are matched
demographically with six families in Oakland, California, and
their amounts of household spending on healthcare for last
year are obtained.
• The data follow on the next page.
Wilcoxon Matched-Pairs Signed Rank Test:
Small Sample Example
H0: Md = 0 Family
Ha: Md  0
Pair Pittsburgh Oakland
n=6 1 1,950 1,760
 =0.05
2 1,840 1,870
3 2,015 1,810
If Tobserved  1, reject H0.
4 1,580 1,660
5 1,790 1,340
6 1,925 1,765
Wilcoxon Matched-Pairs Signed Rank Test:
Small Sample Example
Family
Pair Pittsburgh Oakland d Rank
1 1,950 1,760 190 +4
2 1,840 1,870 -30 -1
3 2,015 1,810 205 +5
4 1,580 1,660 -80 -2
5 1,790 1,340 450 +6
6 1,925 1,765 160 +3

T = minimum(T+, T-) T = 3 > Tcrit = 1, do not reject H0.


T+ = 4 + 5 + 6 + 3= 18
T- = 1 + 2 = 3
T=3
Wilcoxon Matched-Pairs Signed Rank Test:
Large Sample Formulas
For large samples, the T statistic is approximately normally
distributed and a z score can be used as the test statistic.

n n  1
 T

4
nn  12n  1
 T

24
T 
Z T

 T

where : n = number of pairs


T = total ranks for either + or - difference s, whichever is less
Wilcoxon Matched-Pairs Signed Rank
Test: Large Sample Example
• This technique can be applied to the airline industry,
where an analyst might want to determine whether
there is a difference in the cost per mile of airfares in
the United States between 1979 and 2009 for various
cities.
• The data in the next slide represent the costs per
mile of airline tickets for a sample of 17 cities for
both 1979 and 2009.
Airline Cost Data for 17 Cities,
1997 and 1999
H0: Md = 0  .05
Ha: Md  0
If Z  1.96 or Z  1.96, reject Ho

City 1979 1999 d Rank City 1979 1999 d Rank


1 20.3 22.8 -2.5 -8 10 20.3 20.9 -0.6 -1
2 19.5 12.7 6.8 17 11 19.2 22.6 -3.4 -11.5
3 18.6 14.1 4.5 13 12 19.5 16.9 2.6 9
4 20.9 16.1 4.8 15 13 18.7 20.6 -1.9 -6.5
5 19.9 25.2 -5.3 -16 14 17.7 18.5 -0.8 -2
6 18.6 20.2 -1.6 -4 15 21.6 23.4 -1.8 -5
7 19.6 14.9 4.7 14 16 22.4 21.3 1.1 3
8 23.2 21.3 1.9 6.5 17 20.8 17.4 3.4 11.5
9 21.8 18.7 3.1 10
Airline Cost: T Calculation
T  min imum(T  , T  )
T 
 17  13  15  14  6.5  10  9  3  115
.
 99
T 
.  6.5  2  5
 8  16  4  1  115
 54
T  min imum(99,54)
 54
Airline Cost: Conclusion
 n n  1 1718
 T

4

4
 76.5

n n  1 2n  1 1718 35


T  24

24
 211
.

T  T 54  76.5
Z   107
.
 T
211.

1.96  Z Cal  1.07  1.96, do not reject Ho


Kruskal-Wallis Test
 A nonparametric alternative to one-way analysis of
variance
 May used to analyze ordinal data
 Not based on any assumption about population shape.
 Assumes that the k groups are independent
 Assumes random selection of individual items
• The hypotheses tested by the Kruskal-Wallis test:
– H0: The k populations are identical.
– H1: At least one of the c populations is different.
Kruskal-Wallis H Statistic
 2

12  k
R j 
 3n  1
H  
nn  1 j 1 n j
 
 
where : k = number of groups
n = total number of items
R j
 total of ranks in a group
n j = number of items in a group
H  χ 2 , with df = k - 1

12  ( R1 ) 2 ( R2 ) 2 ( Rk ) 2 


H   ...   3(n  1)
n(n  1)  n1 n2 nk 
Kruskal-Wallis Test Example

• Suppose a researcher wants to determine whether


the number of physicians in an office produces
significant differences in the number of office
patients seen by each physician per day.
• She takes a random sample of physicians from
practices in which (1) there are only two partners, (2)
there are three or more partners, or (3) the office is a
health maintenance organization (HMO). Next
slideshows the data she obtained.
Number of Patients per Day
per Physician in Three Organizational Categories
Ho: The three populations are identical
Ha: At least one of the three populations is different

Three or
Two More
  0.05 Partners Partners HMO
df  k  1  3  1  2 13 24 26
15 16 22

2
 5.991 20 19 31
.05, 2 18 22 27
If H  5.991, reject Ho. 23 25 28
14 33
17
Patients per Day Data:
Kruskal-Wallis Preliminary Calculations
Three or
Two More
Partners Partners HMO
Patients Rank Patients Rank Patients Rank
13 1 24 12 26 14
15 3 16 4 22 9.5
20 8 19 7 31 17
18 6 22 9.5 27 15
23 11 25 13 28 16
14 2 33 18
17 5
R1 = 29 R2 = 52.5 R3 = 89.5
n1 = 5 n2 = 7 n3 = 6
n = n1 + n2 + n3 = 5 + 7 + 6 = 18
Patients per Day Data: Kruskal-Wallis
Calculations and Conclusion
 2

12  k
R j
 3n  1
H 
nn  1 j 1 n j
 
 
 2 2 2


12  29  52 . 5  89 . 5   318  1
1818  1  5 7 6 


12
1,897   318  1
1818  1
 9.56


2
 5.991
.05, 2

H  9.56  5.991, reject Ho.


Spearman’s Rank Correlation
• Analyze the degree of association of two
variables
• Applicable to ordinal level data (ranks)

6 d
2

 1
r s
n  1
n
2

where: n = number of pairs being correlated


d = the difference in the ranks of each pair
Spearman’s Rank Correlation for Cattle and Lamb
Prices

Rank Rank:
Year Price of X Price of Y X Y d d2
1988 66.60 69.10 6 7 -1 1
1989 69.50 66.10 9 6 3 9
1990 74.60 55.50 13 2 11 121
1991 72.70 52.20 12 1 11 121
1992 71.30 59.50 10 3 7 49
1993 72.60 64.40 11 4 7 49
1994 66.70 65.60 7 5 2 4
1995 61.80 78.20 3 10 -7 49
1996 58.70 82.80 1 12 -11 121
1997 63.10 90.30 4 13 -9 81
1998 59.60 72.30 2 8 -6 36
1999 63.40 74.50 5 9 -4 16
2000 68.60 79.40 8 11 -3 9
666
17-50
Spearman’s Rank Correlation for Cattle and
Lamb Prices

6 d
2

r  1
n(n  1)
s 2

6  666
 1
13(13  1)
2

 .830
The Sign Test
• The sign test is a versatile nonparametric method for
hypothesis testing that uses the binomial distribution
with p .50 as the sampling distribution.
• Its name comes from the fact that it is based on the
direction of the plus or minus signs of observations
in a sample and not on their numerical magnitudes.
• The sign test may be one of the following two types:
– One sample sign test;
– Two sample sign test.
One Sample Sign Test
• The scores obtained by 10 students in a test is
given below:
• 64, 69, 40, 64, 65, 71, 82, 59, 64, 74
• Test whether the population median is equal
to 63

• H0: Popn median = 63


• H1: Popn median ≠63
One Sample Sign Test
• 64, 69, 40, 64, 65, 71, 82, 59, 64, 74
• +, +, -, , +, +, +, +, -, +, +
• +=8
• - =2
• n=10
• Test Statistic S (smallest of + or -) = 2
• Check Binomial table
• S ~ B(10,.05)
One Sample Sign Test
• He critical value for a two tailed alternative at
α=.05 can be fond by:

(n  1)
K (0.98) n
2
(10  1)
K (.98) 10  1.40
2

• H0 can’t be rejected as the S is greater than K.


Two sample sign test
(or the sign test for paired data):
• The sign test has important applications in problems
where we deal with paired data.
• In such problems, each pair of values can be replaced
with a plus (+) sign if the first value of the first
sample (say X) is greater than the first value of the
second sample (say Y) and we take minus (–) sign if
the first value of X is less than the first value of Y.
• In case the two values are equal, the concerning pair
is discarded.
Example: Peanut Butter Taste Test
• Sign Test: Large-Sample Case
As part of a market research study, a sample of 36
consumers were asked to taste two brands of peanut
butter and indicate a preference. Do the data shown
below indicate a significant difference in the consumer
preferences for the two brands?
18 preferred Hoppy Peanut Butter (+ sign recorded)
12 preferred Pokey Peanut Butter (_ sign recorded)
6 had no preference
The analysis is based on a sample size of 18 + 12 = 30.
Example: Peanut Butter Taste Test
• Hypotheses
( X  np)
H0: No preference for one brand Z
over the other exists np(1  p)
Ha: A preference for one brand
over the other exists
Sampling distribution
Sampling Distribution of the number of “+”
values if there is no
brand preference

2.74

 = 15 = .5(30)
Example: Peanut Butter Taste Test
• Rejection Rule
Using .05 level of significance,
Reject H0 if z < -1.96 or z > 1.96
• Test Statistic
z = (18 - 15)/2.74 = 3/2.74 = 1.095
• Conclusion
Do not reject H0. There is insufficient evidence in
the sample to conclude that a difference in preference
exists for the two brands of peanut butter.
Fewer than 10 or more than 20 individuals would
have to have a preference for a particular brand in order
for us to reject H0.

Вам также может понравиться