Volume 9, Issue 4
Tricks of the Trade
In and Out
Download This Issue
Staff and Contributors
Applications of Generating Functions in Nonparametric Tests
An Introductory Example
We start our investigation with an example, which is used in the Statistica  manual to explain the Kruskal-Wallis analysis of variance with tied observations.
small children who were randomly assigned to one of experimental groups (treatments) of equal size, . Each child was shown a series of pairs of stimuli. Their task was to choose one of those stimuli, and, if it was the "correct" one, they received a reward. The relevant dimensions that the children had to detect to make correct choices were form (group 1), color (group 2), and size (group 3). The dependent variable was the number of trials the children required to detect the dimension that was being rewarded. The following table shows the data set.
We have to test if the distributions of the groups' performances (the numbers of trials required to detect the relevant dimensions) differ significantly from each other. Because there is no reason to assume that the performances are normally distributed, we can not apply the usual analysis of variance. Following , we have to use the Kruskal-Wallis analysis of variance with tied observations (the values 8, 9, 10, 11, 12, and 15 occur several times and are called ties).
Therefore, we determine the different performances, their frequencies, and their midranks
and calculate the sum (, , ) of the midranks. We have to reject the null hypothesis (the performances of the three groups are equally distributed) and accept the alternative hypothesis (the performances of these three groups are not equally distributed) if the Kruskal-Wallis statistic with tied observations
is greater than or equal to a certain value, . In this formula, denotes the frequency of the -th performance. (the so-called quantile of the Kruskal-Wallis statistic with tied observations) is the greatest real number with
The aim of this article is to show how to calculate the distribution and especially the quantiles of such nonparametric test statistics using Mathematica. Applying these methods to this introductory example, we find . Thus, because of
we conclude that the distributions of the performances of the different groups differ significantly (with a level of significance of ) from each other.
About Mathematica | Download Mathematica Player
© Wolfram Media, Inc. All rights reserved.