Mann WHitney U Test

You might also like

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

DISCUSSANT: KARLA MARIE S. D.

ROJO
MAED - MATHEMATICS
Introduction
Statistical tests, such as the z, t, and F tests, are called
parametric tests.

Parametric tests are statistical tests for population parameters


such as means, variances, and proportions that involve
assumptions about the populations from which the samples
were selected.
Parametric Test
1.) T-test
a. One sample T-test
b. Two sample T-Test
c. Two sample paired T-test
2.) Pearson Correlation
3.) Analysis of Variance
a. One-way Analysis of Variance
b. Two-way Analysis of Variance
Statisticians have developed a branch of statistics
known as Nonparametric statistics or
distribution-free statistics to use when the
population from which the samples are selected is
not normally distributed or is distributed in any
other particular way.

Nonparametric statistics can also be used to test


hypotheses that do not involve specific population
parameters, such as μ, σ, or p.
Nonparametric Test
1.) Mann-Whitney U test
2.) Wilcoxon Signed-Rank Test
3.) Spearman Correlation
4.) Kruskall-Wallis Test
5.) Chi-Square Test
Nonparametric Statistics
Nonparametric statistical tests are used to test hypotheses about
population parameters when the assumption about normality cannot
be met.
For example, a sportswriter may wish to know whether there is a
relationship between the rankings of two judges on the diving abilities
of 10 Olympic swimmers.
In another situation, a sociologist may wish to determine whether
men and women enroll at random for a specific drug rehabilitation
program.
of
1. They can be used to test population parameters when the
variable is not normally distributed.
2. They can be used when the data are nominal or ordinal.
3. They can be used to test hypotheses that do not involve
population parameters.
4. In some cases, the computations are easier than those for
the parametric counterparts.
5. They are easy to understand.
6. There are fewer assumptions that have to be met, and the
assumptions are easier to verify.
1. They are less sensitive than their parametric counterparts
when the assumptions of the parametric methods are met.
Therefore, larger differences are needed before the null
hypothesis can be rejected.
2. They tend to use less information than the parametric tests.
For example, the sign test requires the researcher to
determine only whether the data values are above or below
the median, not how much above or below the median each
value is.
3. They are less efficient than their parametric counterparts
when the assumptions of the parametric methods are met.
That is, larger sample sizes are needed to overcome the loss of
information. For example, the nonparametric sign test is about
60% as efficient as its parametric counterpart, the z test. Thus,
a sample size of 100 is needed for use of the sign test,
compared with a sample size of 60 for use of the z test to
obtain the same results.
Assumptions for Nonparametric Statistics
1. The sample or samples are randomly selected.
2. If two or more samples are used, they must be
independent of each other unless otherwise
stated.
To conduct nonparametric tests, we again follow the five-step
approach outlined in the modules on hypothesis testing.
1. Set up hypotheses and select the level of significance α.
Analogous to parametric testing, the research hypothesis can be
one- or two- sided (one- or two-tailed), depending on the
research question of interest.
2. Select the appropriate test statistic. The test statistic is a single
number that summarizes the sample information. In
nonparametric tests, the observed data is converted into ranks
and then the ranks are summarized into a test statistic.
3. Set up decision rule. The decision rule is a statement that tells
under what circumstances to reject the null hypothesis. Note
that in some nonparametric tests we reject H0 if the test statistic
is large, while in others we reject H0 if the test statistic is small.
We make the distinction as we describe the different tests.
4. Compute the test statistic. Here we compute the test statistic by
summarizing the ranks into the test statistic identified in Step 2.
5. Conclusion. The final conclusion is made by comparing the test
statistic (which is a summary of the information observed in the
sample) to the decision rule. The final conclusion is either to
reject the null hypothesis (because it is very unlikely to observe
the sample data if the null hypothesis is true) or not to reject the
null hypothesis (because the sample data are not very unlikely if
the null hypothesis is true).
Mann-Whitney U Test
-a popular nonparametric test to compare outcomes between
two independent groups.
-sometimes called the MANN WHITNEY WILCOXON TEST or
the WILCOXON Rank Sum Test.
-used to test whether two samples are likely to derive from the
same population (i.e. that the two populations have the same
shape)
-counterpart of the parametric t-test for Independent samples.
-used for small samples (𝑛 < 30) or when the distribution is not
normal
The null and two-sided research hypotheses for
the nonparametric test are stated as follows:

H0: The two populations are equal


H1: The two populations are not equal.
Assumptions for Wilcoxon Rank Sum Test
1. The samples are random and independent of
one another.
2. The size of each sample must be greater than or
equal to 10.
Test Statistic for the Mann Whitney U Test
is denoted U and is the smaller of U1 and U2, defined below.

𝑁1 (𝑁1 + 1)
𝑈1 = 𝑁1 𝑁2 + − ෍ 𝑅𝑥
2

𝑁2 (𝑁2 + 1)
𝑈2 = 𝑁1 𝑁2 + − ෍ 𝑅𝑦
2
The smaller of the two is the 𝑈 statistic

Where 𝑁1 = number of cases in X σ 𝑅𝑥 = sum of the ranks of scores in X


𝑁2 = number of cases in Y σ 𝑅𝑦 = sum of the ranks of scores in Y
Example
Two groups of students were given a 20-item test in Algebra.
Their scores are reflected in Table below that follows:
Scores of 16 students in Algebra
Group X Group Y
15 19
Is there a significant
12 18
14 16
difference between the
10 15 mean scores of the two
8 20 groups?
7 8
5 9
7
4
1. Set up hypotheses and determine the level of significance
𝐻0 : There is no significant difference between the mean scores of the two groups.
𝐻a : There is a significant difference between the mean scores of the two groups.
𝛼=0.05
2. Test Statistic
Mann-Whitney 𝑈 Test
The Mann-Whitney 𝑈 is appropriate test for comparing means of two groups when
the distribution is not normal or when the sample size is smaller (𝑛 < 30).
3. Set up decision rule
To determine the critical value we need the sample sizes (𝑁1 = 7 and 𝑁2 = 9)
and our two-sided level of significance (𝛼 = 0.05). The critical value is 12
Decision Rule: Reject 𝐻0 if 𝑈 ≤ 12
4. Computation:
a) Combine the scores and rank them giving the lowest score a rank of 1.
b) Find the sum of ranks for each group.
c) Compute 𝑈 using the formula for Mann-Whitney 𝑈
Score Rank
𝑁1 (𝑁1 + 1)
20 16 Group X Group Y 𝑈1 = 𝑁1 𝑁2 + − ෍ 𝑅𝑥
𝑅𝑥 𝑅𝑦 2
19 15
15 11.5 19 15 7 7+1
18 14 𝑈1 = (7)(9) + − 49.5
12 9 18 14 2
16 13
14 10 16 13 = 63 + 28 − 49.5
15 12
} 11.5 10 8 15 11.5 𝑈1 = 41.5
15 11
8 5.5 20 16
14 10
7 3.5 8 5.5
12 9 𝑁2 (𝑁2 + 1)
5 2 9 7 𝑈2 = 𝑁1 𝑁2 + − ෍ 𝑅𝑦
2
10 8
7 3.5 9 9+1
9 7 𝑈2 = (7)(9) + − 86.5
4 1 2
8 6
} 5.5 𝑁1 = 7 σ 𝑅𝑥 =49.5 𝑁2 = 9 σ 𝑅𝑦 =86.5 = 63 + 45 − 86.5
8 5 𝑈2 = 21.5
7 4
} 3.5
7 3
5 2 The test statistic 𝑈 is the smaller of 𝑈1 and 𝑈2 , hence 𝑈 = 21.5
4 1
5. Conclusion:
The table of critical values of 𝑈 in the Mann-Whitney Test shows that at 0.05
level the value of 𝑈 should be 12 or less to be significant. Since the obtained 𝑈
of 21.5 is greater than this table value, the null hypothesis is accepted.
Formula for the Wilcoxon Rank Sum Test
𝑅 − 𝜇𝑅
𝑧=
𝜎𝑅
𝑛1 (𝑛1 +𝑛2 +1)
Where 𝜇𝑅 =
2
𝑛1 𝑛2 (𝑛1 +𝑛2 +1)
𝜎𝑅 =
12

𝑅 = sum of ranks for smaller sample size 𝑛1


𝑛1 = smaller of sample sizes
𝑛2 = larger of sample sizes
𝑛1 ≥ 10 and 𝑛2 ≥ 10

Note that if both samples are the same size, either size can be used as 𝑛1
Procedure for Wilcoxon Rank Sum Test
Step 1: State the hypotheses and identify the claim.
Step 2: Find the critical value(s). Use z-table
Step 3: Compute the test statistic.
a. Combine the data from the two samples, arrange
the combined data in order, rank each value.
b. Sum the ranks of the group with the smaller
sample size. (Note: If both groups have the same
sample size, either one can be used.)
c. Use these formulas to find the test statistic.
𝑛1 (𝑛1 +𝑛2 +1) 𝑛1 𝑛2 (𝑛1 +𝑛2 +1)
𝜇𝑅 = 𝜎𝑅 =
2 12
𝑅−𝜇𝑅
𝑧=
𝜎𝑅
where R is the sum of the ranks of the data in the smaller
sample and 𝑛1 and 𝑛2 are each greater than or equal to 10
Step 4:Make the decision.
Step 5: Summarize the results
Example: Times to Complete an Obstacle Course
Two independent random samples of Army and Marine recruits are selected, and the
time in minutes it takes each recruit to complete an obstacle course is recorded, as
shown in the table. At 𝛼 = 0.05, is there a difference in the time it takes the recruits to
complete the course?

Army 15 18 16 17 13 22 24 17 19 21 26 28
Marines 14 9 16 19 10 12 11 8 15 18 25

Solution:
1. State the hypotheses and identify the claim
𝐻0 : There is no difference in the times it takes the recruits to complete the obstacle course.
𝐻a : There is a difference in the times it takes the recruits to complete the obstacle course (claim).
2. Find the critical value. Since 𝛼 = 0.05 and this test is two-tailed test, use the critical values of +1.96
and -1.96 from z-table
3. Compute the test statistic.
a. Combine the data from two samples, arrange the combined data in ascending order, and rank each
value.
Time 8 9 10 11 12 13 14 15 15 16 16 17 17 18 18 19 19 21 22 24 25 26 28
Group M M M M M A M A M A M A A M A A M A A A M A A
Rank 1 2 3 4 5 6 7 8.5 8.5 10.5 10.5 12.5 12.5 14.5 14.5 16.5 16.5 18 19 20 21 22 23

b. Sum the ranks of the group with the smaller sample size. In this case, the sample size for the
marines is smaller.
𝑅 = 1 + 2 + 3 + 4 + 5 + 7 + 8.5 + 10.5 + 14.5 + 16.5 + 21 = 93
c. Substitute in the formulas to find the test statistic.
𝑛1 (𝑛1 + 𝑛2 + 1) (11)(11 + 12 + 1)
𝜇𝑅 = = = 132
2 2
𝜇𝑅 = 132
𝑛1 𝑛2 (𝑛1 + 𝑛2 + 1) (11)(12)(11 + 12 + 1)
𝜎𝑅 = = = 264 = 16.2
12 12

𝑅 − 𝜇𝑅 93 − 132
𝑧= = = −2.41
𝜎𝑅 16.2

4. Make decision. The decision is to reject the null hypothesis, since −2.41 < −1.96
See Figure below.

5. Summarize the result. There are enough evidence to support the claim that there is a
difference in the times it takes the recruits to complete the course
Level of Significance 𝒛𝜶 for 1-Tailed Tests 𝒛𝜶 for 2-Tailed Tests
(𝜶)
0.01 - 2.33 or 2.33 - 2.58 and 2.58
0.05 -1.645 or 1.645 -1.96 and 1.96
0.10 -1.28 or 1.28 -1.645 and 1.645
WORKSHEET:
A nutritionist decided to see if there was a difference in the number of calories
served for lunch in elementary and secondary schools. She selected a random
sample of eight elementary schools and another random sample of eight secondary
schools in Pennsylvania. The data are shown.
Elementary Secondary
648 694
589 730
625 750
595 810
789 860
727 702
703 657
564 761
501 650
568 704

You might also like