# Data: Dental measurements (in mm) for two groups: # a group of 16-year-old females and another group of 16-year-old males # Of interest is whether the median of the male population is greater than the # median of the female population. # Source: Rao (1998), p. 147. girls <- c(23,25.5,26,26.5,23.5,22.5,25,24,21.5,19.5,28) boys <- c(31,26.5,27.5,27,26,28.5,26.5,25.5,26,31.5,25,28,29.5,26,30,25) hist(boys) hist(girls) # Histograms qqnorm(boys) qqnorm(girls) # Q-Q plot shows non-normality boxplot(boys, girls) # Do spreads for the two groups look roughly equal? ###################################################################### # We are testing whether the true median of boys is greater than # that of girls, so we list boys first, and then the "greater" alternative wilcox.test(boys, girls, alternative="greater", mu=0) # The Wilcoxon Rank Sum test concludes # (at significance level .05) that the true median for boys # is greater than the median for girls. # P-value given as 0.001.