The chi-squared test is essentially always a one-sided test. Here is a loose way to think about it: the chi-squared test is basically a 'goodness of fit' test. Sometimes it is explicitly referred to as such, but even when it's not, it is still often in essence a goodness of fit. For example, the chi-squared test of independence on a 2 x 2 frequency table is (sort of) a test of goodness of fit of the first row (column) to the distribution specified by the second row (column), and vice versa, simultaneously. Thus, when the realized chi-squared value is way out on the right tail of it's distribution, it indicates a poor fit, and if it is far enough, relative to some pre-specified threshold, we might conclude that it is so poor that we don't believe the data are from that reference distribution.
If we were to use the chi-squared test as a two-sided test, we would also be worried if the statistic were too far into the left side of the chi-squared distribution. This would mean that we are worried the fit might be too good. This is simply not something we are typically worried about. (As a historical side-note, this is related to the controversy of whether Mendel fudged his data. The idea was that his data were too good to be true. See here for more info if you're curious.)
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.
Best Answer
It seems you are using the relationship $$\frac{(n-1)S^2}{\sigma^2}\sim\mathsf{Chisq}(\nu=n-1),$$ where $S^2$ is the variance of a sample of size $n=64$ from a normal distribution with variance $\sigma^2,$ for your test of $H_0:\sigma^2 = 4.2$ against $H_a:\sigma^2\ne 4.2$ at the 5% level of significance.
The statistic $Q \sim \mathsf{Chisq}(63)$ has $$P(42.95 < Q < 86.83) = 0.95,$$ so you reject $H_0$ at the 5% level if $Q \le 42.95$ or $Q \ge 86.83.$ For your data $Q = 63/75,$ which lies between the two critical values $42.95$ and $86.83,$ so you do not reject $H_0.$ In R,
In your problem the test statistic is $$63S^2/4.2 = 63(4.25)/4.2 = 63.75$$ The probability of a more extreme result is the probability in the right tail of $\mathsf{Chisq}(63)$ beyond $63.75,$ which is $0.45.$ This is the P-value for a one-sided test (alternative $H_a: \sigma^2 > 4.2).$
It is customary to double that for a two-sided test (alternative $H_a: \sigma^2 \ne 4.2),$ reporting P-value $0.90.$
Notes: (1) A second reference is here. See the P-value for the aquarium example, which is consistent with doubling the P-value of a one-sided test to get the P-value of a two-sided test.
(2) I do not find a test in the core of R for a single variance. Here is output for such a test from a recent version of Minitab (output edited for relevance).