significance test to compare race-ethnicity among 4 groups I am trying to figure out the right significance test to determine which of my 4 groups are most (1) non-hispanic white (2) non-hispanic black (3) hispanic or (4) other compared to other groups. In each group, I have counts of patients who are (1) non-hispanic white (2) non-hispanic black (3) hispanic or (4) other. For instance, 500 patients non-hisp white, 100 non-hisp black, 30 hispanic, 10 other. I think I first need to compare whether there is any difference among the groups at all for each race-ethnicity, then perform a post-hoc to determine white specific groups differ on race-ethnicity. Can I run ANOVAs to do the first step, or is there another test?
 A: You have 640 subjects in all, with 500, 100, 30, 10 in the four ethnic
categories: Pretty clearly the proportions differ, even without a formal test. There are several possible tests in R, but possibly the most direct is prop.test, which would
go as follows (declining the continuity correction with cor=F on account of the large sample sizes):
prop.test(c(500,100,30,10), rep(640,4), cor=F)

    4-sample test for equality of proportions 
    without continuity correction

data:  c(500, 100, 30, 10) out of rep(640, 4)
X-squared = 1321.7, df = 3, p-value < 2.2e-16
alternative hypothesis: two.sided
sample estimates:
  prop 1   prop 2   prop 3   prop 4 
0.781250 0.156250 0.046875 0.015625 

The null hypothesis $H_0: p_1=p_2=p_3=p_4$ is overwhelming rejected (P-value very near $0)$ in favor of the alternative $H_a:\mathrm{Not\; all\; equal}.$
Then to show ad hoc that "Non-Hispanic White" is larger than the
other three categories combined (not quite so obvious) could use the same procedure, as
follows:
prop.test(c(500,140),c(640,640), alt="g", cor=F) 

        2-sample test for equality of proportions 
        without continuity correction

data:  c(500, 140) out of c(640, 640)
X-squared = 405, df = 1, p-value < 2.2e-16
alternative hypothesis: greater
95 percent confidence interval:
 0.5244879 1.0000000
sample estimates:
  prop 1  prop 2 
 0.78125 0.21875 

Notice that this procedure gives a confidence interval (here one-sided)
when there are only two categories. Other tests are possible, but it seems to me that the ad hoc test needs to be one-sided, and that
variation seems most easily handled with prop.test.
