5
$\begingroup$

enter image description here

Sex DiabetesNOTPresent DiabetesYESPresent
Female 50 55
Male 124 70

So I have this chi-squared test that I performed. My result was statistically significant. The data relates to heart failure in patients at a certain hospital. How would I interpret this? Please correct me if I'm wrong but...

My finding is that the proportion of women that have diabetes is expected to be higher than the proportion in that of men, correct? Is this true for all patients coming into that hospital? Is it true for only the amount of patients similar to that of those found in my dataset, and this just repeats for every new "group" of patients? Would saying that "the proportion of men having diabetes is smaller than the proportion of women with diabetes" be just as valid?

Also, just because it is significant, does that mean that it's actually helpful? Or is the proportion difference just too small? Wouldn't the proportion difference be just as large whether I have 100 samples vs 10,000 samples... increasing as I have more patients?

Please nitpick everything I've spoken. This is probably one of the first chi-squared tests I've performed.

$\endgroup$
3
  • 2
    $\begingroup$ What it tells it that in the sample you selected, the probability of seeing the result you saw or one as or more extreme would have been unlikely if males and females were equally likely to have diabetes present. We do not know how you selected the sample (e.g. why are there more females than males in total?), and so whether this is suggestive about others going in to the hospital. Nor do we know whether the difference between male and female proportions is helpful in taking decisions, as we do not know what decisions you might make. $\endgroup$
    – Henry
    Commented Dec 5, 2022 at 0:45
  • $\begingroup$ @Henry meant to switch the sex inputs around... $\endgroup$
    – Antonio
    Commented Dec 5, 2022 at 0:53
  • $\begingroup$ OK - so with that edit, part of my comment would switch too $\endgroup$
    – Henry
    Commented Dec 5, 2022 at 0:56

2 Answers 2

10
$\begingroup$

The chi-square test of a 2x2 contingency table such as this basically tests the following null hypothesis: gender should produce no difference in diabetes rates. Essentially, your chi-square test poses the following question: "Is the difference in diabetes rates by gender more than we would expect?".

In this case, you have a lot of males that do not have diabetes. Because this number is disproportionate, your chi square is consequently 6.78, giving a significant value. However, you don't know the strength of this association yet, so it may also help to also obtain Yule's Q coefficient. You can get this by using the psych package in R, using the Yule function. I demonstrate with your data below:

#### Construct Contingency Table ####
diabetes <- matrix(c(50,55,124,70),
                   ncol=2,
                   byrow=TRUE)
rownames(diabetes) <- c("Female","Male")
colnames(diabetes) <- c("No Diabetes","Diabetes")
diabetes

#### Test Table ####
chisq.test(diabetes) # chi square
psych::Yule(diabetes) # Yule's Q coefficient

The association is moderate, as shown by the result:

[1] -0.3217054

So to summarize, your test is significant, indicating that you can say with some level of certainty that we cannot support the null hypothesis: gender seems to be associated with diabetes rates. Your Yule coefficient explains that this association is moderate.

To answer some of your additional questions, this test only relates to the sample size you have, so it is not generalizable to all hospitals. This should make sense intuitively, as 1) your sample size isn't extremely large and 2) hospitals can vary a lot, such as how doctors are trained, access to resources, etc. Is this helpful? Certainly. While we would want more people to test and more sophisticated ways of tackling this question, this at least informs us that at the very minimum there is in fact a trend at this hospital, and it may (with caveats) indicate that this could be the case elsewhere. To your question about proportionality, there is no way of knowing whether or not this would hold for larger samples, but theoretically if the effect is consistent, the underlying assertion of the test would still hold. Only more testing in more settings can answer how generalizable your findings actually are.

To see what is going on under the hood, this video shows how to calculate both chi-square and Yule's coefficient by hand. This video is also an accessible summary of what chi-square tests do.

$\endgroup$
8
  • $\begingroup$ This is rad. So just to be crazy clear, the finding of women holding a higher number of diabetes patients compared to men, is only true if a new --same number-- set of patients were to come into this same hospital, correct? $\endgroup$
    – Antonio
    Commented Dec 5, 2022 at 2:07
  • $\begingroup$ If you mean an additional number of patents, the exact amount doesn't really matter. More participants means more data, which means more precision of your test. So whatever your previous result would be, the result with more data would be more powerful and potentially more generalizable. But given you are testing in one hospital, its of course difficult to say if its true across the broad spectrum of hospitals. So many environmental factors can be potentially confounding the results. $\endgroup$ Commented Dec 5, 2022 at 2:36
  • 1
    $\begingroup$ I'm wondering whether the first paragraph might be a bit misleading? I refer to "tries to refute this hypothesis with an alternative" and later on "you can say with some level of certainty that the alternative hypothesis is true". In NHST the statistic is computed assuming the null hypothesis is true. So we can decide to reject or not reject the null, but not accept the alternative. $\endgroup$
    – dipetkov
    Commented Dec 5, 2022 at 6:08
  • 1
    $\begingroup$ I think I see your point. I've amended my answer, though I'm not sure if that is any better worded. $\endgroup$ Commented Dec 5, 2022 at 6:10
  • 1
    $\begingroup$ Expressing what the results of a statistical test tells us can be tricky. Take a look at this paper: Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. And perhaps this recent crash of a CV thread which exemplifies how hard it can be to say it right, let alone to do in an intuitive way: Why can't we accept the null hypothesis.... Note that the title of the question makes a wrong statement. $\endgroup$
    – dipetkov
    Commented Dec 5, 2022 at 6:44
0
$\begingroup$

I'm responding to this post for future reference and to expand on a potentially interesting aspect that has not been fully covered in previous answers (i.e., the selection of an appropriate coefficient to measure this association).

A look at the proportions in the contingency table is essential to understand the "unilateral" nature of the association between gender and diabetes. The lack of "bilateral" association is evident when we analyse the cell proportions.

Your data displays:

  • Female: 50 without diabetes, 55 with diabetes
  • Male: 124 without diabetes, 70 with diabetes

From these counts, we calculate:

  • Proportion of females without diabetes relative to all without diabetes = 50 / (50 + 124) = 0.287
  • Proportion of males with diabetes relative to all with diabetes = 70 / (55 + 70) = 0.560

In a scenario of bilateral association, we would expect the proportions of cell 'a' (females without diabetes) and cell 'd' (males with diabetes) to be similar. The discrepancy between these proportions suggests an asymmetric association, primarily driven by the lower likelihood of males having diabetes.

In fact, we observe:

  • A near-even split in the diabetic condition among females, with the odds being roughly 1.1
  • A sizeable skew towards non-diabetes among males, with considerably lower odds of having diabetes (0.565)

This discrepancy highlights that the association is unidirectional; it is mainly driven by the lower likelihood of males having diabetes (OR 0.513) rather than an equally strong association for both genders.

The use of Yule's Q, suggested in the previous answer, is thus very appropriate here as it quantifies the strength of the asymmetry in the association, unlike symmetric measures such as the phi coefficient, which might misrepresent the true nature of the relationship by suggesting a mutual influence that is not really there.

By emphasising these proportions and their implications, one can provide a clearer and more precise explanation of why specific statistical measures are preferred and how they contribute to one's understanding of the data.

The following references might be helpful:

Mueller, J. H., & Schuessler, K. F. (1961). Statistical Reasoning in Sociology. Oxford & IBH Publishing Co. Google Books

Alberti, G. (2024). From Data to Insights: A Beginner’s Guide to Cross-Tabulation Analysis. Routledge - CRC Press. Google Books

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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