STAT22209 - Nonparametric Statistics
STAT22209 - Nonparametric Statistics
Nonparametric Statistics
• Such tests are based upon the assumption that the population
being studied has a normal distribution.
08/04/2024 2
• What happens if you want to study a
population that is not normally
distributed?
Ratio or Interval,
Ordinal or Nominal
Advantage of non-parametric tests
Hypothesis
Testing
Procedures
Parametric Nonparametric
10
Example (03):
Marks in statistics of 12 students are as follows.
66 06 74 27 92 95 04 35 26
80 46 78
It is asked to test whether the abilities of student are
same.
08/04/2024 11
The sampling distribution of the r statistic
• A one-sample runs test: based on the idea that too few or too
many runs show that the items were not chosen randomly.
• The mean:
12
Problem- n>20
• A manufacturer of breakfast cereal uses a machine to insert
randomly one of two types of toys in each box. The company
wants randomness so that every child in the neighborhood
does not get the same toy.
• r = 29
14
• Hypothesis:
n2 (n2 1)
U 2 n1n2 R2
2
U 2 number of counts
R2 rank sum of y ' s
08/04/2024 21
• Count number of x values proceed each y values, let
n1 (n1 1)
U1 n1n2 R1
2
U1 number of counts
R1 rank sum of x' s n1
U min(U1 , U 2 )
* U*
p value
Hypothesis:
H0
: The corresponding populations are identical (same)
H1
: The populations are different. 22
Example
• The effectiveness of advertising for two rival products (Brand
X and Brand Y) was compared.
• : 11 + 9 + 5.5 + 12 + 7.5 + 10 = 55
• : = 2 <0.05
• So, our obtained U is less than the critical value of U for a 0.05
significance level.
Example :
The following data show the marks obtained for a question paper
by 10 male students and 10 female students.
Male : 31 25 38 33 42 40 44 26 43 35
Female : 44 30 34 47 35 32 35 47 48 34
08/04/2024 27
Wilcoxon Signed Rank Test
• Another popular nonparametric test for matched or paired data
is called the Wilcoxon Signed Rank Test.
7. Use tables of critical values for the Wilcoxon signed rank sum
test to find the probability of observing a value of W or more
extreme.
Normal approximation
• The test is the non parametric alternative to the One Way ANOVA
and is used when the assumptions for ANOVA aren’t met (like
the assumption of normality).
k 2
12 Ri
H
n(n 1) i 1 ni
3(n 1)
th
Ri
: Sum of ranks occupied by
ni
observations
i
of sample.
2
k 2
12 Ri
H
n(n 1) i 1 ni
3(n 1)
H=6.72
• Step 5: Find the critical chi-square value. With c-1
degrees of freedom.
Step 6: The chi-square value is not less than the test statistic, so
there is not enough evidence to suggest that the means are
unequal.
Example 02:
Does it make any difference to students’ comprehension of
statistics whether the lectures are given in English, Sinhala or
Singlish (both)?
Step 1:
Rank the scores, ignoring which group they belong to.
Lowest score gets lowest rank.
.
Step 3:
Find H.
12 Tc 2
H 3 N 1
N N 1 nc
2 2 2 2
Tc 20 40.5 17.5
586.62
nc 4 4 4
12 (
H 586.62 3 13 ) 6.12
12 * 13
Step 4:
Degrees of freedom are the number of groups minus one. Here, d.f. =
3 - 1 = 2.
Conclusion:
Method A 77 54 67 24 71 66
Method B 66 41 59 65 62 64 52
Method c 49 52 69 47 56
H1
: The populations are different.
08/04/2024 55
Example :
Four different milling machines were being considered for
purchase by a manufacturer. Potentially, the company
would be purchasing hundreds of these machines, so it
wanted to make sure it made the best decision.
Initially, five of each machine were
borrowed, and each was randomly assigned to one of 20
technicians (all technicians were similar in skill).
Each machine was put through a series of
tasks and rated using a standardized test.. The data are:
08/04/2024 56
Machine 2 Machine 3 Machine 4
Machine 1
08/04/2024 57
Friedman test
• This method compares several related samples and can be
used as a non-parametric alternative to the two way ANOVA.
08/04/2024 59
Example
• A randomized block experiment was conducted to evaluate the effect
of a drug treatment on enzyme activity.
• Three different drug therapies were given to four animals, with each
animal belonging to a different litter.
Drug 1 Drug 2 Drug 3
Animal 1
Animal 2
Animal 3
Animal 4
08/04/2024 61
H0 : The treatment effects have identical effects
=
r c (Oij Eij ) 2
We find such that,
i 1 j 1 Eij
Income Level
Tax reform Low Medium High Total
For 182 213 203 598
Against 154 138 110 402
total 336 351 313 1000