# How to compare two sequences of binary data?

I have two differing-length sequences of binary values. In each sequence, each value corresponds to an observation which is either right or wrong.

I'm looking for a statistical test that addresses the question "are there significantly more right answers in one sequence?"

Which test is most appropriate?

I'm looking at Fisher's chi-squared test and Fisher's exact test, but I'm not exactly sure how to use each one.

EDIT: More details The study consisted of a 2-alternative forced choice recognition task. Two videos were displayed, then a third. Subjects had to match the third video with one of the first two, and the binary result collected was set to 1 if they were correct.

Trials were in random order, so shuffling the response vectors has no effect.

Thanks,

Louise

• Does the sequence part of your question matter?
– John
Nov 30, 2012 at 15:57
• If you are determining right from wrong from continuous variables, you may be better served in using errors between your observed value and "actual" value. Nov 30, 2012 at 18:40

dat <- matrix( c(numCorrectA, numWrongA, numCorrectB, numWrongB), ncol = 2 )