It's been 45 years since I took college statistics, but now I've been asked to help someone to put together descriptive statistics regarding a population with a type of congenital defect. My searches for a similar problem have been in vain, and I would gladly take some help. Here's the problem:

  1. We have collected data on a set of 2,495 patients with a particular type of defect D.
  2. Of the total of 2,495 patients, 1,426 (57.2%) are male.
  3. (Note: we would not have expected the sex distribution to be 50/50. For all we know, the 57.2% male distribution is representative of the universe of patients with Defect D.)
  4. Of the total, 403 (16.2%) have Variant X of Defect D. The remaining 2,092 (83.8%) have variant Y.
  5. Of the 403 with variant X, 215 (53.3%) are male.
  6. Of the 2,092 with variant Y, 1,211 (57.9%) are male.

Question: Is the difference in the male/female makeup for those with Variant X statistically significant when compared to the male/female makeup for those with Variant Y?

Or, stated differently, is 53.3% (males with Variant X) statistically different from 57.9% (males with Variant Y)?

(My understanding is that the result would be expressed as a p-value, but don't take that as a given! I've also been advised that the t-test might be valuable here.)

Thanks -- Pete


2 Answers 2


Thank you for the detailed description. If you are hunting p values, you might have a look at Fisher's exact test or the Chi-squared test of independence. Both test can be used to check for association between two binary variables.

Thus said: at the very beginning, you write "descriptive stats". P values are never descriptive. They are a tool to test hypotheses. Randomly testing ad hoc hypotheses is rarely a good idea. With the reproducibility crisis in mind, I'd advise you to write a short statistical analysis plan before digging into the data. Then you perform the analysis as planned.

  • $\begingroup$ You are absolutely correct in warning about testing ad hoc hypotheses. It is a bad idea for retrospective analysis to be done via a "statistical fishing expedition." Rather, it should be conducted by examining hypotheses that had been decided up-front, following a pre-determined plan for analysis. $\endgroup$ Apr 19, 2020 at 18:07
  • $\begingroup$ In this case the people doing the study are simply asking themselves, "Is this a weird result that that casts doubt on the dataset or merits followup examination?" The real purpose of this study is to look at the relationships of therapies on outcomes for this set of patients, and for this work they've had good input from "real statisticians." $\endgroup$ Apr 19, 2020 at 18:17

Data description. The description is easy: For variant x the sample proportion of men is $\hat p_x = 215/403 = .0.533 = 53.3\%.$ For variant y it's $\hat p_y =1211/2092 = 0.579 = 57.9\%.$

Maybe you could make some sort of bar chart to show the percentages are different, but you should make it clear that you have more variant y's.

Confidence intervals: You could also show 95% confidence intervals for the two population proportions: For $p_x,$ the CI is $(0.485, 0.555)$ and similarly for $p_y.$

px.est = 215/403
CIx = px.est + c(-1.96,1.96)*sqrt(px.est*(1-px.est)/n)
[1] 0.4847912 0.5548768

Test of two proportions. You also mention a hypothesis test to see whether the rates in the population differ significantly. Perhaps $H_0: p_x = p_y$ against $H_a: p_x \ne p_y.$ Alternatively, if you really new from the start that the proportion of men is larger for variant y, and wonder if you data substantiate that, you might do a one-sided (also called 'one-tailed') test: $H_0: p_x = p_y$ against $H_a: p_x < p_y.$

Either way, this is called a test of two proportions

For your data, the version of this test (one-sided) as implemented in R, gives the output below. The P-value 0.0515 shows that that the difference in samples is not quite significant at the 5% level. (But it would be deemed significant at the 6% or 10% levels. Theoretically, there is nothing sacred about the 5% level, but some journals require that level of significance for publication.)

x = c(215, 1211);  n = c(403, 2092)
prop.test(x, n, alt="less")

        2-sample test for equality of proportions 
        with continuity correction

data:  x out of n
X-squared = 2.6585, df = 1, p-value = 0.0515
alternative hypothesis: less
95 percent confidence interval:
 -1.0000000000  0.0006724524
sample estimates:
   prop 1    prop 2 
0.5334988 0.5788719 

Notes: (a) This test assumes that the number of subjects in each group is large enough that the normal distributions can be used to approximate binomial ones. (b) The square of a standard normal distribution is a chi-squared distribution, so the test can be framed as a chi-squared test (as in R). (c) Implementations of the test in various statistical software use slightly different continuity corrections (or none at all), so numerical details can differ slightly among programs.


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.