Go to PsychInfo Contents

Non-Paramterics


When our data consists of only the frequencies of various events, the most commonly used statistics is the chi square (X2).  Below are the procedures for doing both one-way and two-way chi square analyses. Other non-parametric statistics are appropriate when the variable being measured is at an ordinal rather than at an interval or ratio level of measurement.  Below are instructions for using SPSS to anlayze data when you have 2 independent samples (Mann-Whitney U test), k independent samples (Kruskal-Wallis test), 2 related samples (Wilcoxon test) and k related samples (Friedman analysis of variance by ranks).

One-Way Chi Square

I just bought a bag of M&Msâ containing 56 candies. The maker of the candy claims to put an equal number of each color of candy in every bag. To test this claim we can use the following data:
 

Color Number
Blue 3
Brown 17
Green 6
Yellow 10
Orange 6
Red 14

We enter the data using the following format.  Note that the colors are given numbers rather than their original names. Use the Define Labels option when you create the variable color to provide value labels for alternative, e.g., 1 = Blue, 2 = Brown, etc.
 
 

Unlike previous procedures, the Chi-Square requires that variables be weighted. From the Data menu, select Weight Cases. This window is shown below.

Select Weight Cases by and highlight the variable number and click the arrow button to the left of the "Frequency Variable" window. The text at the bottom of the window serves as a check for you to see if you weight the variables in the desired way.

Select Analyze/Nonparametric Tests/Chi-Square to see this window:

Highlight the categorical variable and click the arrow to the left of the "Test Variable List" window and then select Options.In the options window, select Descriptive, Exclude cases test-by-test, and click the Continue button.

You should be back to the original window, as shown. Click OK to run the analyses.




The Chi-Square output provides us with descriptive statistics, frequencies, and finally the test statistic.




Two-Way Chi Square

The two-way chi-square statistic is used in those situations where two variables are involved.  For example, research suggests that males prefer more sporty car colors like red or black, while women prefer less flashy car colors such as white or blue. Test the phenomena that there is a sex difference in car color preference in the Allegheny College faculty.
 

   
Sex
    Males Females
  Red 11 9
Car Color Blue 8 5
  Black 7 8
  White 9 10

 However, unlike a one-way chi-square, individual data must be entered, rather than the summary data from the above table. This is done by creating two variables, one called color and the other calledsex.  The first will have values from 1 to 4 (1 = red; 2 = blue; 3 = black; and 4 = white) while the second will have values 1 (for male) and 2 (for female).  Note below that since there are 11 males who have red cars, there are 11 separate entries 1,1 in the table.

After the data are entered, chose the option Analyze/Descriptive/Crosstabs.  Move the variable color to the Row(s) area and the variable sex to the Column(s) section as indicate below.

Press the Statistics option and choose Chi-square.  You may also want some additional statistics such as the Contingency coefficient (a measure of relationship in nominal data). Press Continue to return to the main panel.

Pressing OK will produce the results, including a frequency cross tabulation table, chi-square results, and the contingency coefficient noted below.




Kruskal-Wallis Test
(k independent samples)

Suppose an educational researcher wished to test the hypothesis that school administrators were typically more authoritarian than classroom teachers. He knew, however, that his data for testing this hypothesis may be contaminated by the fact that many classroom teachers were administration-oriented in their professional aspirations. That is, many teachers take administrators as a reference group. To avoid this contamination, he planned to divide his 14 participants into 3 groups: teaching-oriented teachers (classroom teachers who wish to remain in a teaching position). administration-oriented teachers (classroom teachers who aspire to become administrators), and administrators. He administers the F scale (a measure of authoritarianism) to each of the 14 participants. His hypothesis was that the three groups will differ with respect to averages on the F scale. The data are as follows:
 

Teacher-oriented teachers Administration-oriented teachers Administrators
96 82 115
128 124 149
83 132 166
61 135 147
101 109  
As with most personality scales, the F scale is best thought of as an ordinal and not an interval scale. Enter the data by using a strategy much like that for between-subjects ANOVA. That is, use one variable to indicate the group and a second for the dependent variable (F score in this case).
To do the analysis select Analyze/Nonparametric Tests/K Independent Samples to see the following window.

Highlight the dependent variable and click the arrow to the left of the "Test Variable List" window. Then highlight the independent or grouping variable and click the arrow to the left of the "Grouping Variable" window. For the grouping variable, define the range of values by clicking Define Range, entering the minimum and maximum values of the variable, and clicking continue. You should now be back to the above window. Make sure that Kruskall-Wallis H is selected and then select Options.

In the options window, select Descriptive, Exclude cases test-by-test, and click the Continue button.

You should be back to the original window, as shown below. Click OK to run the analyses

The Kruskall-Wallis output provides us with descriptive statistics, cell size, mean rank, and finally the test statistic.



Wilcoxon Test
(2 related samples)

The 207 professors this semester are testing an approach to improve students’ exam scores. We are investigating the amount of notice give about an upcoming exam (date not published on syllabus). The logic is that if students have too long to study, those who are prone to test anxiety are more likely to exhibit it. The data below were from last semester. Students were notified about the first exam 1 week prior to the exam and they were notified about the second exam 1 class prior. The number of points missed are reported below for ten average students.

               1 Week         1 Class

                        8                  13
                      10                  35
                       7                   12
                       3                   11
                     12                   10
                     17                   29
                       8                     9
                     14                   38
                       5                   21
                     13                     9

The dependent variable is probably not normally distributed.

Enter the data in two columns (one for the data where the instructor announced the exam 1 week before and one for the data when he announced the exam just one class before.

Select Analyze/Nonparametric Tests/2 Related Samples to see the following window:

Highlight each condition and click the arrow to the left of the "Test Pair(s) List" window. You should see in the "Test Pair(s) List" window the way the comparison between conditions will be made. Make sure that Wilcoxon is selected and then select Options.

In the options window, select Descriptive, Exclude cases test-by-test, and click the Continue button.

You should be back to the original window, as shown. Click OK to run the analyses.

The Wilcoxon output provides us with descriptive statistics, information about ranks, and finally the test statistic.




Mann-Whitney U Test
(2 independent samples)

Lepley compared the serial learning of 9 seventh-grade students with the serial learning of 10 eleventh-grade students. His hypothesis was that the primacy effect should be less prominent in the learning of the younger participants. (The primacy effect is the tendency for the material learned early in a series to be remembered more efficiently than the material learned later in a series.) He tested this hypothesis by comparing the percentage of errors made by the two groups in the first half of the series of learned material. The data are as follows.

    Eleventh-Grade Students: 32.2, 39.2, 40.9, 38.1, 34.4, 29.1, 41.8, 24.3, 32.4, 34.6

    Seventh-Grade Students: 39.1, 41.2, 45.2, 46.2, 48.4, 48.7, 55.0, 40.6, 52.1

Just as is often the case with time, percentage of correct responses is rarely normally distributed. In situations such as serial learning, the underlying distribution is definitely not normal.

Enter your data using the same format that you have used for other between analyses (i.e., one variable for the group (1 = 11th graders; 2 = 7th graders) and a second variable for the error scores).

Select Analyze/Nonparametric Tests/2 Independent Samples and follow the same process that you used for the Kruskall-Wallis.



Friedman Analysis of Variance by Ranks
(k related samples)

In a bottle cap factory there are three identical machines for making bottle caps. On several days selected at random, their output is recorded.
 
 
Machine
  A B C
Day 1 340 339 347
Day 2 345 333 343
Day 3 330 344 349
Day 4 342 348 355
Day 5 338 351 321
Day 6 320 347 344
Day 7 331 345 314
Day 8 328 359 342
Day 9 313 352 345
Day 10 321 358 349

Given the size of the sample and the potential range of numbers, the daily output of machines in this factory is not normally distributed.

Enter your data using the same format that you have used for other within analyses, that is, there should be one column for each of the three machines (day data need not be entered unless you want to use it much like an ID number). Select Analyze/Nonparametric Tests/k Related Samples and follow the same process that you used for the Wilcoxon with one exception. After you put the variables in the "Test Variables" window, click on Statistics. In this window, select Descriptives and then Continue, which will return you to the original window and click OK.

Back to SPSS Contents


Contents  |  Psychology   |  Allegheny
6/23/99