# Gender and Medical Condition - Is a Chi-Square Test of Independence the Correct Test to Use?

Data from our local hospital's Emergency Department suggests that there are certain conditions with which females present more often than males. I wish to determine whether the difference in observations is statistically significant.

The following is the gender breakdown for all Emergency Department patients:

Gender         GenderCount
F              70001
M              55466


Which is about a 5:4 ratio, or 1.26 females for each male.

The following is the gender breakdown for Emergeny Deparment patients who present with the studied condition:

Gender        GenderCount
F              8516
M              3836


Which is about an 11:5 ratio, or 2.22 females for each male.

Is the correct test to use a Chi-Square Test of Independence? My current approach is to view the variables this way:

                       Condition Presented
Studied Condition   |     Any Other Condition
male    |                       |
--------|-----------------------|---------------------------
female  |                       |


Next, I would like to repeat the process for an arbitrary number of other conditions. Is there a good way to perform the same test on a set of independent categorical variables, at once? For example, could I perform a Chi-Square Test of Independence on the following matrix:

                                                  Condition Presented
Condition 01       |       Condition 02        |      ...      |       Condition n
male    |                      |                           |               |
--------|----------------------|---------------------------|---------------|--------------------
female  |                      |                           |               |


My data is in a SQL server, and I can use R.

I actually have data for all hospital departments, so should I be starting with that data as population data and treating the Emergency Department set as a sample?

Is a Chi-Square Test of Independence the right approach?

Bonus Question (not required for accepted answer) - If I get a statistically significant result, what measure of association should I use for this kind of data?

• A chisquare test should be OK. If you have other covariables than sex, yuou should try logistic regression. And, as for Association measure, maybe the odds ratio? – kjetil b halvorsen Apr 6 '17 at 14:54

This Problem (depending on a research task) could be handled by a chi-squared test.

There a 2 ways to use chisq.test() in R:

• chisq.test(vector) tests against a uniform distribution (you could for example test if the distribution of studied condition & research condition differ from a uniform distribution)
• chisq.test(data.frame(vector1, vector2)) tests if the 2 vectors are from the same distribution. (you could compare female vs male patients based on their condition)

"Next, I would like to repeat the process for an arbitrary number of other conditions. Is there a good way to perform the same test on a set of independent categorical variables, at once? For example, could I perform a Chi-Square Test of Independence on the following matrix:"

the length of the vector (no of condition) is not limited -> yes

I actually have data for all hospital departments, so should I be starting with that data as population data and treating the Emergency Department set as a sample?

You can compare the departments but I cannot answer if it is useful to your research.