friedman's test

Post on 15-Apr-2017

224 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture objective

• Nonparametric tests• Friedman’s test– History– When to uses– Assumptions– Basic idea – Examples– How to run it in SPSS

NON PARAMETRIC TESTSFRIEDMAN’s TEST

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..

Friedman’s test

• Friedman test is a non parametric statistical method developed by Dr. Milton Friedman

Dr. Milton Friedman

Born July 31, 1912Died November 16, 2006 (aged 94)Contributions:• Price theory (monetarism)• Applied macroeconomics• Floating exchange rates• Permanent income hypothesis• Volunteer military. Friedman test

Awards:• National medal of science (1988)• President medal of freedom (1988)• Nobel memorial prize in economic

sciences(1976)• John bates clark medal (1951)

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.

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.

Steps involved in testing

• 1) Formulation of hypothesis• 2) Significance level• 3) Test statistics• 4) Calculations• 5) Critical region• 6) Conclusion

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

• 2) Level of significance:it is selected as given if not given 0.05 is

taken.• 3) Test statistics:

where R.j2 is the square of the rank total for

group j (j = 1, 2, . . . , c)m is the number of independent blocksk is the number of groups or treatment levels

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.

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.

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.

Example 1:The manager of a nationally known real estate agencyhas just completed a training session on appraisals forthree newly hired agents. To evaluate the effectiveness ofhis training, the manager wishes to determine whetherthere is any difference in the appraised values placed onhouses by these three different individuals. A sample of12 houses is selected by the manager, and each agent isassigned the task of placing an appraised value (inthousands of dollars) on the 12 houses. The results aresummarized as follows.

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

Solution:

1) Formulation of hypothesis: H0 : M1=M2=M3

H1 : Not all medians are equal

2) Level of significance:α=0.05

3) Test statistics:

4) Calculation:

k=3 m=12

Q=159.29-144

Q=15.29

Houses Agent1 Agent 2 Agent 3

1 181.0 1 182.0 2 183.5 3

2 179.9 1 180.0 2 182.4 3

3 163.0 2 161.5 1 164.1 3

4 218.0 3 215.0 1 217.3 2

5 213.0 1 216.5 2 218.4 3

6 175.0 1.5 175.0 1.5 216.1 3

7 217.9 1 219.5 2 220.1 3

8 151.0 2 150.0 1 152.4 3

9 164.9 1 165.5 2 166.1 3

10 192.5 1 195.0 2 197.0 3

11 225.0 2 222.7 1 226.4 3

12 177.5 1 178.0 2 179.7 3

Sum of ranks

17.5 19.5 35

(17.52+19.52+352)-3х12(3+1)

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.

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.

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:

4) Calculations:m=12, k=3

Q=8.43

(322+22.52+17.52)-3х12(3+1)

5) Critical region:Reject H0 if Q > critical value at 5% level of significance.Q tab=6.56) Conclusion:

As Qcal ≥ Qtab so we will reject H0, hence conclude that the cleanup procedure has effected the BOD.

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?

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.).

Question 3In 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,8We have to check that whether the pet shop display same number of pets.

SPSS Method

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:

• 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

SPSS methodEnter 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.

The End

top related