4. Non Parametric tests
• A nonparametric test is one that is performed
without making any restrictive assumptions
about the form of the population distribution
and associated parameters.
• It provide alternatives to parametric test &
has many advantages and disadvantages..
6. Dr. Milton Friedman
Born July 31, 1912
Died November 16, 2006 (aged 94)
Contributions:
• Price theory (monetarism)
• Applied macroeconomics
• Floating exchange rates
• Permanent income hypothesis
• Volunteer military. Friedman test
7. Awards:
• National medal of science (1988)
• President medal of freedom (1988)
• Nobel memorial prize in economic
sciences(1976)
• John bates clark medal (1951)
8. FRIEDMAN’s TEST
• The Friedman test is a non-parametric alternative to
ANOVA with repeated measures.
• It is used to test for differences between groups
when the dependent variable being measured is
ordinal.
• The Friedman test tests the Null hypothesis of
identical populations for dependent data.
• The test is similar to the Kruskal-Wallis Test.
• It uses only the rank information of the data.
9. Assumptions
• 1. The r blocks are independent so that the
measurements in one block have no influence on
the measurements in any other block.
• 2. The underlying random variable of interest is
continuous (to avoid ties).
• 3. The observed data constitute at least an
ordinal scale of measurement within each of the r
blocks.
• 4. There is no interaction between the m blocks
and the k treatment levels.
• 5. The c populations have the same variability.
• 6. The c populations have the same shape.
10. Steps involved in testing
• 1) Formulation of hypothesis
• 2) Significance level
• 3) Test statistics
• 4) Calculations
• 5) Critical region
• 6) Conclusion
11. 1) Formulation of hypothesis
we check the equality of means of
different treatments as in ANOVA, the null
hypothesis will be stated as:
Ho= M1=M2=……=Mk
H1= not all medians are equal
12. • 2) Level of significance:
it is selected as given if not given 0.05 is
taken.
• 3) Test statistics:
where R.j
2 is the square of the rank total for
group j (j = 1, 2, . . . , c)
m is the number of independent blocks
k is the number of groups or treatment levels
13. 4) Calculations:
• Start with n rows and k columns.
• Rank order the entries of each row
independently of the other rows.
• Sum the ranks for each column.
• Sum the squared column totals.
• Using test statistic calculate the value of Q.
14. 5) Critical region:
Reject H0 if Q ≥ critical value at α= 5%
If the values of k and/or n exceed those given in
tables, the significance of Q may be looked up in
chi-squared (χ2) distribution tables with k-1
degrees of freedom.
15.
16. 6) Conclusion:
• If the value of Q is less than the critical value
then we’ll not reject H0.
• If the value of Q is greater than the critical
value then we’ll reject H0.
17. Example 1:
The manager of a nationally known real estate agency
has just completed a training session on appraisals for
three newly hired agents. To evaluate the effectiveness of
his training, the manager wishes to determine whether
there is any difference in the appraised values placed on
houses by these three different individuals. A sample of
12 houses is selected by the manager, and each agent is
assigned the task of placing an appraised value (in
thousands of dollars) on the 12 houses. The results are
summarized as follows.
18. At the 0.05 level of significance, use the Friedman rank test to
determine whether there is evidence of a difference in the
median appraised value for the three agents. What can you
conclude?
Houses Agent1 Agent 2 Agent 3
1 181.0 182.0 183.5
2 179.9 180.0 182.4
3 163.0 161.5 164.1
4 218.0 215.0 217.3
5 213.0 216.5 218.4
6 175.0 175.0 216.1
7 217.9 219.5 220.1
8 151.0 150.0 152.4
9 164.9 165.5 166.1
10 192.5 195.0 197.0
11 225.0 222.7 226.4
12 177.5 178.0 179.7
19. Solution:
1) Formulation of hypothesis:
H0 : M1=M2=M3
H1 : Not all medians are equal
2) Level of significance:
α=0.05
3) Test statistics:
21. 5) Critical region:
Reject H0 if Q > critical value at 5% level of
significance.
Q tab=6.5
6) Conclusion:
we reject H0, as Qcal ≥ Qtab, and hence conclude
that the appraising ability of three agents are
not the same.
22.
23. Example 2:
A water company sought
evidence the measures
taken to clean up a river
were effective. Biological
Oxygen Demand (BOD) at
12 sites on the river were
compared before clean
up, 1 month later and a
year after clean up.
24. Solution:
1) Formulation of hypothesis:
H0 : The clean up procedure has had no effect on the BOD.
H1 : The clean up procedure has affected the BOD.
2) Level of significance:
α=0.05
3) Test statistics:
26. 5) Critical region:
Reject H0 if Q > critical value at 5% level of
significance.
Q tab=6.5
6) Conclusion:
As Qcal ≥ Qtab so we will reject H0, hence
conclude that the cleanup procedure has
effected the BOD.
27. Question 1:
The following data on amount of food consumed (g) by
eight rats after 0, 24, and 72 hours of food deprivation
appeared in the paper “The Relation Between Differences in
Level of Food Deprivation and Dominance in Food Getting in
the Rat”. Does the data indicate a difference in the true mean
rank of food consumption for the three experimental
conditions?
28. Question 2:
The venerable auction house of Snootly &
Snobs will soon be putting three fine 17th-
and 18th-century violins, A,B, and C, up for
bidding. A certain musical arts foundation,
wishing to determine which of these
instruments to add to its collection, arranges
to have them played by each of 10 concert
violinists. The players are blindfolded, so that
they cannot tell which violin is which; and
each plays the violins in a randomly
determined sequence (BCA, ACB, etc.).
29. Question 3
In this analysis the one variable is the type of animal (fish,
reptiles, or mammals), and the response variable is the
number of animals on display. From our database, we use
three variables reptnum (number of reptiles on display),
fishnum (number of fish on display) and mamlnum
(number of mammals on display). These scores are
shown for the 12 stores below(reptnum, fishnum,
mamlnum ).
• 12,32,34 14,41,38 15,31,45 12,38,32 7,21,12
4,13,11 10,17,22 4,22,9 14,24,20 4,11,8 5,17,19
10,20,8
We have to check that whether the pet shop display same
number of pets.
30.
31. Question
• Suppose for example we want to find out if
students have a preference for one type of soda
over others. They are blindfolded and given a
taste test. They are asked to take a sip of Brand X,
Brand Y and Brand Z sodas and to rank order their
preference for the three sodas where a 1 is the
highest rank, a 2 the next highest and a 3 the
least preferred soda. The data representing the
rankings given by each participant to the three
sodas are:
32. • Participants’ Rankings of the Three Brands of
Soda
Participant Brand X Brand Y Brand Z
1 2 1 3
2 1 3 2
3 1 2 3
4 1 3 2
5 1 3 2
6 1 2 3
7 1 3 2
8 1 2 3
9 1 3 2
10 2 1 3
33. SPSS method
Enter ranks for each sample in different columns and then data
analysis is done.
Data Analysis
• 1. Click on Analyze at top of screen then
• a. Click on Non-Parametric Tests then
• b. Click on K Related Samples
• 2. Highlight Brand x by clicking on it then
• a. Click on arrow > to transfer this name to the Test Variable Box
• 3. Highlight Brand y by clicking on it then
• a. Click on arrow > to transfer this name to the Test Variable Box
• 4. Highlight Brand z by clicking on it then
• a. Click on arrow > to transfer this name to the Test Variable Box
• 5. If one the white square next Friedman is not already checked, click on it to place a check mark
there
• 6. Click on Statistics button at bottom corner of screen
• a. Click on white square next to Descriptive to place a check mark in the box
• b. Click on continue button
• 7. Click OK. Doing this will result in analysis being conducted. These results are below.