I'd like to examine the effect of an attribute on the effect of another attribute on certain behaviour. To explain what I mean:
I tested two groups of 110 people on whether they did x. One of the groups had the attribute A, the other did not have A:
|---------------------|------------------|------------------|
| | did x | didn't do x |
|---------------------|------------------|------------------|
| group 0 | 1 | 109 |
|---------------------|------------------|------------------|
| group A | 8 | 102 |
|---------------------|------------------|------------------|
I also tested x with two more groups, both of which have another attribute B, which is independent from attribute A. Again, one group had A, the other did not.
|---------------------|------------------|------------------|
| | did x | didn't do x |
|---------------------|------------------|------------------|
| group B | 7 | 103 |
|---------------------|------------------|------------------|
| group BA | 2 | 108 |
|---------------------|------------------|------------------|
When the subjects had the attribute B, attribute A appears to have a different (opposite) effect on whether subjects did x. I would like to test whether this difference in the effect is statistically significant. Which test could I use to do that?
In case it's relevant: The significance of each table alone is determined with Fisher's exact test (first is significant with p < 0.05, second is not). Doing x and not doing x is mutually exclusive.
I am new to statistics, simple terms and explanations would be appreciated.