Professional Documents
Culture Documents
Figure 16.1
Wilcoxon Signed Rank Test
The paired difference, d is calculated and then ranked
Wilcoxon T statistic is the smaller of the sum of positive ranks, W+ and the sum
of negative ranks, W-
Wilcoxon Signed Rank Test
ASSUMPTIONS:
FORMULAE USED:
Z-score
Wilcoxon Signed Rank Test In Excel
Sample Data
Difference
Calculated
1.Difference is first rank
using the excel RANK
function
Sum of positive
and negative ranks
Why Use Nonparametric Tests?
Parametric Tests
• Parametric hypothesis tests require the estimation
of one or more unknown parameters (e.g.,
population mean or variance).
• Often, unrealistic assumptions are made about the
normality of the underlying population.
• Large sample sizes are often required to invoke the
Central Limit Theorem.
Why Use Nonparametric Tests?
Nonparametric Tests
• Nonparametric or distribution-free tests
- usually focus on the sign or rank of the data
rather than the exact numerical value.
- do not specify the shape of the parent
population.
- can often be used in smaller samples.
- can be used for ordinal data.
Why Use Nonparametric Tests?
Advantages and Disadvantages of
Nonparametric Tests
Table 16.1
Why Use Nonparametric Tests?
Some Common Nonparametric Tests
Figure 16.1
One-Sample Runs Test
Wald-Wolfowitz Runs Test
• The one-sample runs test (Wald-Wolfowitz test)
detects non-randomness.
• Ask – Is each observation in a sequence of binary
events independent of its predecessor?
• A nonrandom pattern suggests that the observations
are not independent.
• The hypotheses are
H0: Events follow a random pattern
H1: Events do not follow a random pattern
16-13
One-Sample Runs Test
Wald-Wolfowitz Runs Test
• To test the hypothesis, first count the number of
outcomes of each type.
n1 = number of outcomes of the first type
n2 = number of outcomes of the second type
n = total sample size = n1 + n2
• A run is a series of consecutive outcomes of the same
type, surrounded by a sequence of outcomes of the
other type.
One-Sample Runs Test
Wald-Wolfowitz Runs Test
• For example, consider the following series representing
44 defective (D) or acceptable (A) computer chips:
DAAAAAAADDDDAAAAAAAADDAAAAAAAADDDDAAAAAA
AAAA
• The grouped sequences are:
calc
One-Sample Runs Test
Wald-Wolfowitz Runs Test
• The test statistic is:
calc
Figure 16.2
Wilcox on Signed-Rank Test
• The Wilcox on signed-rank test compares a single
sample median with a benchmark using only ranks of
the data instead of the original observations.
• It is used to compare paired observations.
• Advantages are
- freedom from the normality assumption,
- robustness to outliers
- applicability to ordinal data.
• The population should be roughly symmetric.
Wilcox on Signed-Rank Test
• To compare the sample median (M) with a
benchmark median (M0), the hypotheses are:
• When evaluating the difference between paired observations, use the median
difference (Md) and zero as the benchmark.
Wilcox on Signed-Rank Test
• Calculate the difference between the paired
observations.
• Rank the differences from smallest to largest by
absolute value.
• Add the ranks of the positive differences to obtain
the rank sum W.
Wilcox on Signed-Rank Test
• For small samples, a special table is required to
obtain critical values.
• For large samples (n > 20), the test statistic is
approximately normal.
calc
• Step 6: For large samples (n1 < 10, n2 > 10), use a z test.
calc
Table 16.7
Kruskal-Wallis Test
for Independent Samples
Performing the Test
• Next, arrange the
data by groups and
sum the ranks to
obtain the Tj’s.
• Remember,
STj = n(n+1)/2.
Table 16.8
Kruskal-Wallis Test
for Independent Samples
Performing the Test
• The hypotheses to be tested are:
H0: All c population medians are the same
H1: Not all the population medians are the same
• For a completely randomized design with c groups, the
tests statistic is
calc
where n = n1 + n2 + … + nc
nj = number of observations in group j
Tj = sum of ranks for group j
Kruskal-Wallis Test
for Independent Samples
Performing the Test
• The H test statistic follows a chi-square distribution
with n = c – 1 degrees of freedom.
• This is a right-tailed test, so reject H0 if H > c2a or if
p-value < a.
Friedman Test for Related Samples
• The Friedman test determines if c treatments have the
same central tendency (medians) when there is a
second factor with r levels and the populations are
assumed to be the same except for centrality.
• This test is analogous to a two-factor ANOVA without
replication (randomized block design) with one
observation per cell.
• The groups must be of the same size.
• Treatments should be randomly assigned within blocks.
• Data should be at least interval scale.
Friedman Test for Related Samples
• In addition to the c treatment levels that define the
columns, the Friedman test also specifies r block factor
levels to define each row of the observation matrix.
• The hypotheses to be tested are:
H0: All c populations have the same median
H1: Not all the populations have the same median
• Unlike the Kruskal-Wallis test, the Friedman ranks are
computed within each block rather than within a pooled
sample.
Friedman Test for Related Samples
Performing the Test
• First, assign a rank to each observation within each row.
For example, within each Trial:
calc
Table 16.11
Spearman Rank Correlation Test
Performing the Test
• The sums of ranks within each column must always
be n(n+1)/2.
• Next, compute the difference in ranks di for each
observation.
• The rank differences should sum to zero.
Spearman Rank Correlation Test
Performing the Test
• Calculate the sample rank correlation coefficient rs.
calc