I've got two group means and I want to see if the difference is statistically significant.

I'm using US Census data and race. For instance, I'll have one group of 100 people that is 50% white and another group of 50 people that is 70% white.

What test should I use?

Also if I want to compare a median income for two different groups, is there a different test I should use (as it is impossible to calculate the variance)?

  • $\begingroup$ what assumption do you make on the data? $\endgroup$ – Lost1 Nov 25 '13 at 22:42
  • $\begingroup$ It is US Census data. For race, I'm assuming that they counted everyone correctly (in fact they probably missed 0.5-1%). For income, the data comes with an estimated confidence interval. I'm not assuming that the racial distribution of the US population is a normal distribution. The income distribution of the US population might be closer to normal. $\endgroup$ – Aaron Kreider Nov 25 '13 at 22:48

I am assuming you have data from samples of two subsets of the population. With these samples you want to infer something about the population.

Is the mean of two subgroups of the population different?

  1. Given sample sizes of 50 and 100*, you can conduct a two sample (unpaired) t-test. Almost every statistical package can do it; it is often used to compare the mean outcome in experiments between control and treatment group. In your example, it tells you if you can conclude with a given level of confidence that the share of "white" in the first subgroup is larger than in the second subgroup (or vice versa).

  2. Since the data already contains confidence intervals computed by the census office, you can also use those. If the sample share of whites is, say, 50%, then the confidence intervals tell you the population share of this subgroup is in the intervals $[50- CI, 50+CI]$ for $\alpha$ samples drawn, where $\alpha$ is the confidence level (typically 95%). Therefore, if the confidence intervals of the two subgroups do not overlap, then the means are statistically different at least at confidence level $\alpha$. (But a slight overlap of confidence intervals need not imply that they are not statistically different; in that case, conduct the t-test.)

How to compare the median of two subgroups?

The t-test is not suitable to test this hypothesis, because it really tests equality of means. Most people would recommend the Wilcoxon rank sum test here, which is fine, but this is not strictly a test of the equality of median. It tests whether, say, incomes in one group tend to be higher than those in the other group (i.e., it compares ordinal ranks). Indeed, this is usually more interesting than the median. To specifically test equality of medians, you can use the median test.

*for considerably smaller sample sizes, you would have to check whether the data is normally distributed. For large samples, the mean is approximately normally distributed by the central limit theorem.

  • $\begingroup$ What is the "median test"? $\endgroup$ – Aaron Kreider Dec 9 '13 at 19:29
  • $\begingroup$ en.wikipedia.org/wiki/Median_test $\endgroup$ – Nameless Dec 10 '13 at 14:13
  • $\begingroup$ Is it possible to determine whether or not the means are different without any knowledge of either the population or sample standard deviation? My intuition tells me "not really". $\endgroup$ – jim_shook Jun 7 '14 at 17:29
  • $\begingroup$ Typically not, since without a measure of variance you cannot judge whether a difference is statistically "big" or "small". Maybe if you had something else like quantiles of the data instead of sd.. $\endgroup$ – Nameless Jun 9 '14 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.