Chi square test (two-sided vs. one-sided)

  • #1
Agent Smith
333
35
TL;DR Summary
A chi-square test is "always" two-sided, yes/no?
From what I've seen of online comments on math fora, a chi-square test is two-sided. I interpreted that as to mean that if our ##H_0: \mu_1 = \mu_2##, a chi-square test only allows to infer ##\mu_1 \ne \mu_2##. Correct?

If yes, can we use the fact that the computed ##\mu_1 < \mu_2## to make the inference that, given the p-value ##\leq \alpha## (i.e. statistically significant), ##\mu_1 < \mu_2## (essentially converting the chi-square test's two-sided conclusion to a one-sided one?
 
Physics news on Phys.org
  • #2
When would you use chi-square to test equality of means? I don't know of such a case.
If you're doing a chi-square test for independence there is no "one-sided" vs "two-sided" situation to consider.
If you're doing a chi-square test to test equality of proportions the alternative is always two sided: either they are equal (H0 statement) or they are not (Ha statement), but here's where the wording can get a little tricky.

Let me the back up to the case of testing equality of two means (bear with me for this).

If we want to test
$$H_0 \colon \mu_1 = \mu_2$$
versus
$$H_a \colon \mu_1 > \mu_2$$

we say the alternative is one-sided since the values of mu1 that are larger than mu2 are all on the right of mu2 on the number line -- they're all on one side. The rejection region for a t-test looks like
$$t_{\text{Calc}} > t_\alpha$$
and that is a one-sided rejection region.

If you want to test whether two means are different you have (sorry here: for some reason from this point onward I could not get the usual double dollar sign tags to register, so all of the plain text came out as text in math mode).

H_0 : mu_1 = mu_2

versus

H_a : mu_1 != mu_2

which is a two-sided alternative hypothesis (numbers not equal to mu2 fall on two sides of it on the number line).

The rejection region here is
t_{Calc} < -t_{alpha/2}

or

t_{Calc} > t_{alpha/2}

which is two-sided rejection region.

If you are using a chi-square test to compare two proportions the hypotheses are

H_0 : p_1 = p_2

versus

H_a : p_1 != p_2

which is a two-sided alternative. The chi-square rejection region, however,

X^2_{Calc} > X^2_alpha

which is a one sided region. Why? It's impossible for the test statistic here to be negative.

However, this test is still referred to as a two-sided hypothesis test, as the tradition (habit? philosophy? Pick the word you think best fits) is to refer to the test by the form of the hypothesis, not the form of the rejection region, hence these chi-squared tests for comparing proportions are two-sided tests even though the rejection region "only goes on one way".
 
Last edited:
  • Like
Likes WWGD
  • #3
@statdad , gracias for the response. For clarity purposes let's say that I want to check whether there's an association between handedness (lefties & righties) and gender. I can use a chi-square test to check for association. Does the chi-square test only tell us whether there is an association or not, or does it also inform us whether men are more left-handed than women or vice versa? By chi-square test being two-sided I mean that it can only tell us there's an association between gender and handedness but it can't show us whether it's the case that women are more left handed than men or vice versa. In a conversation with another person I said that the proportion (in this case we'd be dealing with proportions) would do that job: If the proportion of left handed women > the proportion of right handed women, we can say that gender and handedness are associated and the association is that women are more left-handed than men (given the chi-square test indicates that there's an association)
Correct?
 
  • #4
The chi-square test can only indicate whether there is or is not an association.

I'm not sure how finding out that a greater percentage of women are left-handed than right-handed would give any information about women being more left-handed than men. Can you expand on how you reached that conclusion.

Note: starting in 15 minutes I will be online with a group of students for about 2 hours, and won't be online after that, so with apologies I'll note that I won't have another response for you anytime soon.
 
  • #5
statdad said:
I'm not sure how finding out that a greater percentage of women are left-handed than right-handed would give any information about women being more left-handed than men. Can you expand on how you reached that conclusion.
Suppose we take a sample of people and find 20% of the women are left-handed and 10% of the men are left-handed. We can do a chi-square test for association. Let the chi-square test show that there's an association between gender and handedness. We already know the proportion of left-handedness in women (20%) > the proportion of left-handedness in men (10%). So we can conclude 1) there's an association between handedness and gender AND 2) women are more left-handed than men.
 
  • #6
🤔
 
  • #7
Are you talking about Contingency Tables here, testing for independence, e.g., of gender vs handedness?
 
  • #8
WWGD said:
Are you talking about Contingency Tables here, testing for independence, e.g., of gender vs handedness?
Yes, I think so, yes actually. There would be a table, yes.
 
  • #9
We could compare 2 proportions for a test of independence. In the initial phases, we could notice that the proportions are not equal e.g. ##p_1 > p_2##. A chi-square test could reveal an association, and then we know the nature of this association from the fact that ##p_1 > p_2##. If ##p_1## proportion of lefties in women and ##p_2## is proportion of lefties in men then we know (?) the more women are lefties than men, no?
 
  • #10
Yes, you compare against a hypothesized indepence, which is your default/null hypothesis. If the results , actual data, deviate too far from that, you conclude theres's no such independence. If you sample 100 women and 100 men on handedness, and the two traits of gender, handedness aren't independent, then you would see a higher proportion of left/right handedness in one group. That's what the test evaluates.
 
  • #11
WWGD said:
Yes, you compare against a hypothesized indepence, which is your default/null hypothesis. If the results , actual data, deviate too far from that, you conclude theres's no such independence. If you sample 100 women and 100 men on handedness, and the two traits of gender, handedness aren't independent, then you would see a higher proportion of left/right handedness in one group. That's what the test evaluates.
Agreed, but can I conclude that a particular gender is more left-handed than the other?
 
  • #12
What does it mean that a chi-square test is two-sided?
 
  • #13
So if we were using a chi-square test for a vaccine trial (placebo group and treatment group), we would only know that there's a difference between the two groups (proportions of sick individuals would differ), but we wouldn't be able to say that the vaccine prevents disease???? 🤔
 
  • #14
Agent Smith said:
Agreed, but can I conclude that a particular gender is more left-handed than the other?
If that's is supported by your data. Did you reject the null assumption of independence? If you did, you conclude there's an association.
 
  • #15
Agent Smith said:
So if we were using a chi-square test for a vaccine trial (placebo group and treatment group), we would only know that there's a difference between the two groups (proportions of sick individuals would differ), but we wouldn't be able to say that the vaccine prevents disease???? 🤔
No, that issue is separate and sort of black-boxed as far as this test goes. Causality requires controlling for certain variables and considering lurking variables, etc. In that sense, the test is somewhat of a blunt instrument.
 
  • #16
WWGD said:
If that's is supported by your data.
Say my data says 0.2 women are left-handed and 0.1 men are left-handed. My chi-square test shows that there is an association (p-value < alpha). Can I say there are more women lefties than men lefties or do I not know the direction of the association? That would mean I would only know either ##p_1 = p_2## (no association) or ##p_1 \ne p_2## (association) but not ##p_1 > p_2## or ##p_1 < p_2##.
 
  • #17
I don't think the Chi-squatlre test itself warrants anything other than saying the two are independent. I believe, but I'm not certain, you need to do a test for equality of proportions to conclude that. Like I said , many of these tests are blunt , and , by themselves just give yes/no answers. Edit: You may need to do more advanced Stats courses for that. But a good question.
Maybe @statdad or @StatGuy2000 can add something here.
 
  • #18
@WWGD , there was a question on the chi-square test on vaccine efficacy. Can't recall well, but what would the hypotheses look like? Possibly ##H_0:## Vaccine not effective vs. ##H_a:## vaccine effective??? 🤔
 
  • #19
I'll look it up to give you a more definitive answer.
 
  • #20
WWGD said:
I'll look it up to give you a more definitive answer.
Most kind of you. I tried but to no avail.
 
  • #21
Agent Smith said:
@WWGD , there was a question on the chi-square test on vaccine efficacy. Can't recall well, but what would the hypotheses look like? Possibly ##H_0:## Vaccine not effective vs. ##H_a:## vaccine effective??? 🤔
The null is always of the type that there is no effect; in this case, the vaccine is not effective. I would need to see the actual problem to give more details.
 
  • #22
I'm heading to sleep now, will follow up tmw if you have more questions.
 
  • #23
Seeking clarification.

I seem to be confused. :biggrin:

A chi-square test is a one-tailed, two-sided test. Correct?
 
  • #24
Agent Smith said:
Seeking clarification.

I seem to be confused. :biggrin:

A chi-square test is a one-tailed, two-sided test. Correct?
There's more than one such test. The test for indepence only tests for precisely that, for whether the two variables are independent. I assume by one- or two-sided you mean information other than the independence of the variables. Then, no, these terms of sidedness just don't apply here.
 

Similar threads

Replies
7
Views
440
Replies
1
Views
1K
Replies
5
Views
352
Replies
2
Views
2K
Replies
5
Views
3K
Replies
4
Views
2K
Replies
2
Views
2K
Replies
20
Views
3K
Replies
2
Views
2K
Back
Top