# Chi Square Testing - binary outcome analysis

I have formed a contingency table for my binary outcome experiment that has been discussed in my previous question : binary outcome testing

One of my hypothesis says that females are better at identifying cars and I am trying to use chi-square testing.

So I get a table like this where I have summed up all predictions:

                | Bike Predicted (actual 100) |     Car Predicted(actual 100)|
Male      |        50                   |             50               |
Female    |        40                   |             60               |


I have 2 questions regarding the above formulation.

1. Is there any way I can account for what the actual image was? I basically want the hypothesis to say that females are better at identify correct car images.

2. Using Chi-Square testing I can prove that the tyre prediction is independent/dependent of gender. However, if it is dependent, then can the actual number prove that females are better than males ? If not, can someone help me out on this !

• what about an odds ratio? – user20650 Mar 1 '13 at 0:10
• @user20650 can you tell me more about it ? – anon Mar 3 '13 at 18:20

## 1 Answer

1. You could introduce a third variable (the actual image). More generally, you can put all your independent variables - actual image, age group, sex into a model for predicted image (e.g. a logistic regression model) and test various hypotheses.

2. If you reject the null, it's reasonable to look at the source of the difference. e.g. if you conclude that men and women are different, you can (for example) simply point to the sign of a coefficient and say 'it was significant because the women did better'.

However, beware Simpson's paradox!

• Thanks a lot for your answer.... One thing though, is it okay to consider the actual answer as a factor for predicted answer ? I was thinking to make a column ( Actual - Predicted ) so that when the answers are same it becomes 0 else when its different, it would become 1 or -1 and then calculate chi square... – anon Mar 3 '13 at 18:22
• You can certainly look at the error as your response. However, I am not sure I follow what chi-square you intend to calculate. – Glen_b Mar 4 '13 at 0:08
• It would be worthwhile studying the foundations of statistical inference. You will learn that 'prove' is an inappropriate word in this context, for example. – Frank Harrell Sep 27 '13 at 12:14