I want to do a chi-squared test on data that looks like this:
A B
0 0
1 0
0 1
1 1
8 0
3 4
...
You can think of each pair as one trial with two participants. In each trial, there are a different number of observations for each participant.
I have binned each data pair like so: I counted how many pairs have 0 for both pairs (e.g. 0-0), how many have exactly one 0 (e.g., 0-1, 1-0, 8-0, etc.), and how many have greater than 0 for both (e.g., 1-1, 3-4, etc.). This gives me the following counts:
Two zeroes: 227
One zero: 277
No zeroes: 146
The problem is that I am not sure how to calculate expected values here. Each pair represents the number of times something appears within an arbitrary number of observations; each pair represents a different number of observations, and each element of the pair does too. So, for instance, for a given 0-1 pair the first participant might have given 200 observations (with no hits), and the second might have yielded 150 observations (with 1 hit). Another 0-1 pair might have yielded 100 observations and 50 observations, respectively.
So, in this case, just totaling the overall number of hits and dividing that by the total number of observations won't get me the right expected values...
Am I missing something obvious here? For instance if we know that the relative frequency of hits per observation is 0.01217, and if there are a different number of observations for each trial, is there a simple way to get expected values in a problem like this?
This is what I want to test: whether the hits between participants in each trial are independent. I expect that as the hits of one participant in one pair increases, so will the other. I realize that there might be better ways to test this, but my committee have asked me to use a chi-sq test, if possible. So what I expect to find is that the number of trials in the 0-0 and in the no-zero bins will be higher than would be expected if hits are distributed evenly.