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
    Dec 5, 2022 at 0:45
  • $\begingroup$ @Henry meant to switch the sex inputs around... $\endgroup$
    – Antonio
    Dec 5, 2022 at 0:53
  • $\begingroup$ OK - so with that edit, part of my comment would switch too $\endgroup$
    – Henry
    Dec 5, 2022 at 0:56

1 Answer 1

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
    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$ Dec 5, 2022 at 2:36
  • $\begingroup$ Ah, it looks like Chi-Squared just measures if there is a statistically significant correlation between two variables in the dataset it is being performed on and not applicable to other, new, data (new patients)-- though it could give clues depending on how many samples it had. Got it. Thanks tons! $\endgroup$
    – Antonio
    Dec 5, 2022 at 3:16
  • 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
    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$ Dec 5, 2022 at 6:10

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.