## Wednesday, 11 September 2013

### A non-intuitive example of independent random variables

Consider the variables x,y and z which are related as follows:

->      z = x (XOR) y

Are 'x' and 'z' dependent or independent ?

(  x and y can take the values [0,1]
XOR stands for the eXclusive-OR operator.  )

For all possible ordered pairs (x,y), we get a corresponding z.

x   y       z
( 0 , 0 ) -> 0
( 0 , 1 ) -> 1
( 1 , 0 ) -> 1
( 1 , 1 ) -> 0                     ... (A)

We obtain a certain value of z according to the values of x and y.
So, it might seem intuitive that x and z, or y and z, are DEPENDENT, i.e., z changes when either x or y change.

Now, consider the ordered pairs (x,z).
We have,
(0,0) , (0,1) , (1,1) and (1,0)                  ... (from A)

These are all the possible ordered pairs of (x,z) just like (x,y), and each of them occurs with equal probability.

This means that just like all ordered pairs (x,y), which were independent, all the ordered pairs (x,z) are also independent , and not dependent, unlike what intuition suggests.

Note : The word 'independent' might be deceptive, as such, but what we are looking at here is the Mathematical meaning of it and its usage in proofs et al.