# Correlation between Bernoulli Variables

Say I have two infinite collections of $0/1$ random strings of length $n$ , where each digit is an independent Bernoulli RV, with parameter $p_i$ in the first collection and $q_i$ in the second, $i$:1...$n$.

1. Define $X_i$ to be a Bernoulli RV representing the absolute difference between the digits at location $i$ of a random sample of two strings, each string from a different collection.

2. Define $Y_i$ to be a Bernoulli RV representing the absolute difference between the digits at location $i$ of a random sample of two strings from the combined collection (with prior probability 0.5 for sampling each string from collection 1 and 0.5 from collection 2).

3. Define $Z_i$ to be a Bernoulli RV representing the absolute difference between the digits at location $i$ of a random sample of two strings from the same collection (with prior probability 0.5 for sampling a pair from collection 1 and 0.5 from collection 2).

Are the $X_i$ independent? [I think Yes]

Are the $Y_i$ independent? [I think No]

Are the $Z_i$ independent? [I think No]

If there is dependency in each case, what is the correlation?

-
Please define how the collection is combined? –  Sasha Jun 1 '12 at 20:04
The collections are not explicitly combined, but simply the sampling (in case 2) of each of the two strings is with 0.5 probability from the 1st collection and 0.5 probability from the 2nd collection. –  Omri Jun 1 '12 at 20:19

## 1 Answer

Since the collections are infinite, you need to define a probability measure on them. If your measure gives, for example, 1/2 chance of string #1, 1/4 chance of string #2, 1/8 chance of string #3, etc, then you have a non-zero chance of re-sampling the same string causing dependence. On the other hand, if you invoke the axiom of choice and have "one string per real number over [0,1)", say, then the probability of choosing the same string twice is 0 and so you get independence.

-