Chapter 6 Test For K Independent Samples

Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

TESTS FOR k

INDEPENDENT SAMPLES
STAT 323
Nonparametric Statistics

Department of Mathematics & Statistics


College of Arts & Sciences
University of Southeastern Philippines
k INDEPENDENT SAMPLES
- Tests included in this chapter are used if we
are interested to determine whether there is a
significant difference among three or more
independent groups or samples.

- These tests are used if assumptions of


parametric tests are not satisfied; or if the
measurement of data is weaker than interval; or if
the researcher wishes to avoid making restrictive
assumptions of the F test and thus to increase the
generality of his findings.

Tests for k Independent


Samples Page 2
Extension of Median Test

Median Test
- is deigned to examine whether several samples
came from populations having the same median.

Note: The notation c is simply the number of samples thus c = k.


Tests for k Independent
Samples Page 3
Extension of Median Test

Let a equal the total number of observations above


the grand median in all samples and let b equal the
total number of values less than or equal to the grand
median. The a + b = N, the total number of
observations.

Tests for k Independent


Samples Page 4
Extension of Median Test

Tests for k Independent


Samples Page 5
Extension of Median Test

Ho: All c (or k) populations have the same median.

Ha: At least two of the populations have different


medians

Tests for k Independent


Samples Page 6
Extension of Median Test

Tests for k Independent


Samples Page 7
Extension of Median Test

Tests for k Independent


Samples Page 8
Extension of Median Test

Null Distribution

The exact distribution of T is difficult to


tabulate, so large sample approximation is used to
approximate the distribution of T. The approximate
null distribution is the chi-squared distribution with
c – 1 degrees of freedom.

Tests for k Independent


Samples Page 9
Extension of Median Test

Tests for k Independent


Samples Page 10
Extension of Median Test

Tests for k Independent


Samples Page 11
Extension of Median Test

Tests for k Independent


Samples Page 12
Extension of Median Test

Power-Efficiency

Mood (1954) has shown that when the median


test is applied to data measured in at least an
interval scale from normal distributions with
common variance (i.e., data that might properly be
analyzed by the parametric t test), it has the same
power-efficiency as the sign test. That is, its power-
efficiency is about 95% per cent for n1 + n2 as low as
6. This power-efficiency decreases as the sample
size increases, reaching an asymptotic efficiency of
2/𝜋 = 63 per cent.
Tests for k Independent
Samples Page 13
Extension of Median Test

Example.

Four different methods of growing corn were


randomly assigned to a large number of different
plots of land and the yield per acre was computed
for each plot. In order to determine whether there is
a difference in yields as a result of the method used,
use median test procedure.

Tests for k Independent


Samples Page 14
Extension of Median Test

Tests for k Independent


Samples Page 15
Extension of Median Test

Solution.

1) Ho: All methods have the same median yield per


acre.

Ha: At least two of the methods differ with respect to


the median yield per acre.

2) ∝ = 0.05

Tests for k Independent


Samples Page 16
Extension of Median Test

3) Median Test for c (or k) independent samples

4) Computations (using SPSS with computations from


the book)

Tests for k Independent


Samples Page 17
Extension of Median Test
Computation (Con’t.)

Tests for k Independent


Samples Page 18
Extension of Median Test

5) Critical Region: Reject Ho if 𝒳 2 > 𝒳 2 0.05,3 = 7.815.

Tests for k Independent


Samples Page 19
Extension of Median Test

6) Decision/Conclusion: Since 17.6 > 7.815 or the p-


value associated to the 17.6 is less than 0.01, we
reject Ho and conclude that there is a difference in the
yield of the four methods.

Thus a multiple comparison test is needed.

Tests for k Independent


Samples Page 20
Extension of Median Test

Comparison of Method 1 versus Method 2


(Not significant)

Tests for k Independent


Samples Page 21
Extension of Median Test

Comparison of Method 1 versus Method 3


(Significant)

Tests for k Independent


Samples Page 22
Extension of Median Test

Comparison of Method 1 versus Method 4


(Significant)

Tests for k Independent


Samples Page 23
Extension of Median Test

Comparison of Method 2 versus Method 3


(Significant)

Tests for k Independent


Samples Page 24
Extension of Median Test

Comparison of Method 2 versus Method 4


(Significant)

Tests for k Independent


Samples Page 25
Extension of Median Test

Comparison of Method 3 versus Method 4


(Significant)

Tests for k Independent


Samples Page 26
Extension of Median Test

It can be observed that only in Method 1 and


Method 2 that the p-value is less than 0.05, the rest
of the comparisons have p-values less than 0.05.
This result is the same if tabulated value is
used 𝒳 2 0.05,1 = 3.841.

Tests for k Independent


Samples Page 27
Extension of Median Test

Note: Such repeated testing procedures are for


one’s satisfaction or for use as an objective
“yardstick” for separating the various population but
they cannot receive the same interpretation as may
legitimate to the first test, overall test since multiple
comparison distorts the true level of significance.

Refer to the work of Gabriel (1966) and Knoke (1976).

Note: The implementation of the extension of Median


Test is similar with the process in median test with two
independent samples.
Tests for k Independent
Samples Page 28
Extension of Median Test

Multiple Comparison:

Tests for k Independent


Samples Page 29
Extension of Median Test

Tests for k Independent


Samples Page 30
Extension of Median Test

Procedure in SPSS:

Tests for k Independent


Samples Page 31
Extension of Median Test

Tests for k Independent


Samples Page 32
Kruskal-Wallis Test

Kruskal-Wallis Test

- It is a rank-based nonparametric test that


can be used to determine if there are statistically
significant differences between two or more groups
of an independent variable on a continuous or
ordinal dependent variable.

- It is considered the nonparametric


alternative to the one-way ANOVA (sometimes also
called the "one-way ANOVA on ranks"), and an
extension of the Mann-Whitney U test to allow the
comparison of more than two independent groups.
Tests for k Independent
Samples Page 33
Kruskal-Wallis Test

Tests for k Independent


Samples Page 34
Kruskal-Wallis Test

Tests for k Independent


Samples Page 35
Kruskal-Wallis Test

Tests for k Independent


Samples Page 36
Kruskal-Wallis Test

Tests for k Independent


Samples Page 37
Kruskal-Wallis Test

Tests for k Independent


Samples Page 38
Kruskal-Wallis Test

Tests for k Independent


Samples Page 39
Kruskal-Wallis Test

Tests for k Independent


Samples Page 40
Kruskal-Wallis Test

Tests for k Independent


Samples Page 41
Kruskal-Wallis Test

Example.

Four different methods of growing corn were


randomly assigned to a large number of different
plots of land and the yield per acre was computed
for each plot. In order to determine whether there is
a difference in yields as a result of the method used,
use Kruskal-Wallis test procedure.

Tests for k Independent


Samples Page 42
Kruskal-Wallis Test

Tests for k Independent


Samples Page 43
Kruskal-Wallis Test

Sol’n.

1. Ho: The four methods are equivalent


Ha: Some methods of growing corn tend to
furnish higher yields than other.

2. ∝= 0.05

3. Kruskal-Wallis Tesr

Tests for k Independent


Samples Page 44
Kruskal-Wallis Test

4. Computation:

Tests for k Independent


Samples Page 45
Kruskal-Wallis Test

Tests for k Independent


Samples Page 46
Kruskal-Wallis Test

5) Critical Region: Reject Ho if 𝒳 2 0.05,3 = 7.815

6) Decision/Conclusion:

Since 𝒳 2 = 25.46 > 𝒳 2 0.05,1 = 7.815, we


reject Ho and conclude that some methods of
growing corn tend to furnish higher yields than
other.

Tests for k Independent


Samples Page 47
Kruskal-Wallis Test

Multiple Comparison:

Tests for k Independent


Samples Page 48
Kruskal-Wallis Test

Tests for k Independent


Samples Page 49
Kruskal-Wallis Test

Using SPSS:

Tests for k Independent


Samples Page 50
Kruskal-Wallis Test

Tests for k Independent


Samples Page 51
Kruskal-Wallis Test

Procedure in SPSS:

Tests for k Independent


Samples Page 52
Kruskal-Wallis Test

Tests for k Independent


Samples Page 53
Jonckheere-Terpstra Test

Jonckheere-Terpstra Test

- is
a rank-based nonparametric test that can be
used to determine if there is a statistically significant
trend between an ordinal independent variable and a
continuous or ordinal dependent variable.

- It tests for an ordered difference in medians


where you need to state the direction of this order.

- It is also known as the Jonckheere-Terpstra test


for ordered alternatives.
Tests for k Independent
Samples Page 54
Jonckheere-Terpstra Test
Note:

The Jonckheere-Terpstra test is similar to the Kruskal-


Wallis Test, which can be used to determine if there are
statistically significant differences between two or more
groups of an independent variable on a continuous or
ordinal dependent variable. However, unlike the
Jonckheere-Terpstra test, the Kruskal-Wallis H test does
not predict how the differences in the scores of the
dependent variable will depend on the ordinal nature of
the groups of the independent variable

Tests for k Independent


Samples Page 55
Jonckheere-Terpstra Test
Examples

Use a Jonckheere-Terpstra test to understand whether


test scores, measured on a continuous scale from 0-
100, differed based on time spent revising. We expect
that median test scores increases with increasing hours
spent revising

Use Jonckheere-Terpstra test to understand whether


job satisfaction, measured on an ordinal scale, differed
based on job position. We expect job satisfaction to
increase with higher job position.

Tests for k Independent


Samples Page 56
Jonckheere-Terpstra Test
Assumptions:

1. The dependent variable should be measured at


the ordinal or continuous level.

2. The independent variable should consist of two or


more ordinal, independent groups. Typically, a
Jonckheere-Terpstra test is used when there are three
or more ordinal, independent groups, but it can be used
for just two groups.

3. There should be independence of observations,


which means that there is no relationship between the
observations in each group or between the groups
themselves.
Tests for k Independent
Samples Page 57
Jonckheere-Terpstra Test
4. In order to know how to interpret the results from a
Jonckheere-Terpstra test, you have to determine
whether the distributions in each group (i.e., the
distribution of scores for each group of the independent
variable) have the same shape and the same
variability.

5. You need to predict, a priori, the order of the groups


of the independent variable when running the
Jonckheere-Terpstra test (i.e., the term, "a priori", simply
means that you have to predict this order "before" you
collect your data, typically when you set the research
questions/hypotheses for your study).

Tests for k Independent


Samples Page 58
Jonckheere-Terpstra Test
6. You need to predict, "a priori", the direction of the
alternative hypothesis. The term "a priori" simply means
that you need to predict the direction of the alternative
hypothesis without looking at your data (i.e., "before"
looking at your data)..

Tests for k Independent


Samples Page 59
Jonckheere-Terpstra Test

Note: Kruskal-Wallis test is sensitive against any differences in


means, while this usage of Spearman’s 𝜌 or Kendall’s 𝜏 is sensitive
against only the ordering specified in the H1 given above. When
Kendall’s 𝜏 is used, this test is equivalent to the Jonckheere-
Terpstra test.
Tests for k Independent
Samples Page 60
Jonckheere-Terpstra Test
Procedure:

1. If there are k samples, calculate the sum, U, of all


Mann-Whitney statistics Urs relevant to the rth
sample (r = 1, 2, … , k – 1) and any sample s for
which s > r.

2. Add all Urs to give a total of U.

3. Calculate the probability associated to the observed


sum Urs. Then compare the p-value to the level of
significance to determine whether to reject or accept
Ho.
Tests for k Independent
Samples Page 61
Jonckheere-Terpstra Test
4. For large N and the ni not too small the distribution of
𝑈−𝐸(𝑈)
Z=
𝑉𝑎𝑟(𝑈)

is approximately standard normal where

1
𝐸 𝑈 = 𝑁 2 − σ𝑖 𝑛𝑖2 and
4
1
𝑉𝑎𝑟 𝑈 = 72 𝑁 2 2𝑁 + 3 − σ𝑖 𝑛𝑖2 (2𝑛𝑖 + 3)

Note: The expression for Var(U) needs adjustment for ties


but the adjustment is trivial for few ties. For many ties,
Var (U) is given by Lehmann (1975, p. 235)
Tests for k Independent
Samples
Page 62
Jonckheere-Terpstra Test
Example. Hinkley (1989) gives breaking distances taken
by motorists to stop when travelling at various speeds. A of
subset of this data is:

Speed (mph) Breaking distances (feet)


20 48
25 33 59 48 56
30 60 101 67
35 85 107

Use the Jonckheere-Terpstra test to assess the evidence


for a tendency for braking distance to increase as speed
increases.
Tests for k Independent
Samples Page 63
Jonckheere-Terpstra Test
Sol’n.

1) Ho: F1(x) = F2(x) = F3(x) = F4(x)


Ha: F1(x) ≥ F2(x) ≥ F3(x) ≥ F4(x) with at least one
inequality

2) 𝛼 = 0.05

3) Jonckheere-Terpstra test

Tests for k Independent


Samples Page 64
Jonckheere-Terpstra Test
4) Computations:

Speed (mph) Breaking distances (feet)


20 48
25 33 59 48 56
30 60 101 67
35 85 107 This refers to the number of
data in sample 2 that is
U12 = 1 + 0.5 + 1 = 2.5 greater than or equal to the
data in sample 1. In this
U13 = 1 + 1 + 1 = 3 case U12 = 2.5 since there is
U14 = 1 + 1 = 2 one tie {48} and two data
{59, 56} are greater than 48.
U23 = 3 + 3 + 3 + 3 = 12
U24 = 2 + 2 + 2 + 2 = 8
U34 = 2 + 1 + 2 = 5
U = 32.5
Tests for k Independent
Samples Page 65
Jonckheere-Terpstra Test
5) Decision/Conclusion: Since p-value for both one-tailed
and two-tailed test is less than 0,05, we reject Ho. Thus,
we conclude that increasing speed increases braking
distance.

Tests for k Independent


Samples Page 66
Jonckheere-Terpstra Test

Procedure in SPSS:

Tests for k Independent


Samples Page 67
Jonckheere-Terpstra Test

Tests for k Independent


Samples Page 68

You might also like