# Statistics - Dependence/independence of variables

1. May 26, 2013

### peripatein

Hi,
1. The problem statement, all variables and given/known data
The sample space of the following problem is defined thus: all the possible permutations of {1,2,3} including {1,1,1}, {2,2,2}, {3,3,3}. Suppose all results are equally probable. Let Xi denote the value of the ith coordinate, where i=1,2,3.
I am asked to determine whether, for any i≠j, Xi and Xj are independent and whether {X1,X2,X3} are independent.

2. Relevant equations

3. The attempt at a solution
The sample space is 9, I believe. And the probability of each set is 1/9 (even probability). What perplexes me is how to determine whether Xi and Xj are dependent/independent. A hint indicates that I may prove it for any i and j I choose. Suppose I choose i=1 and j=2. Am I now to check whether P(X1 $\cap$ X2) / P(X2) is equal to P(X1)?

2. May 26, 2013

### I like Serena

From wikipedia:
Two events A and B are independent if and only if their joint probability equals the product of their probabilities:
$$P(A \cap B)=P(A)P(B)$$

So yes, you're on the right track. ;)

3. May 27, 2013

### Ray Vickson

Don't forget that $\{X_1, X_2,X_3\}$ independent also requires that
$$P(X_1=i \:\& \: X_2=j \:\& \: X_3=k) = P(X_1=i) P(X_2=j) P(X_3=k)$$ for all i, j and k.

4. May 27, 2013

### Ray Vickson

Don't forget that $\{X_1, X_2,X_3\}$ independent also requires that
$$P(X_1=i \:\& \: X_2=j \:\& \: X_3=k) = P(X_1=i) P(X_2=j) P(X_3=k)$$ for all i, j and k.

5. May 27, 2013

### peripatein

But what is P(X1)? What does it stand for in this case? Is it the probability that the first coordinate would be 1,2 or 3? Which makes no sense, as wouldn't that be 1?
This is the part I am not sure I am grasping in the question. Could someone please clarify?

6. May 27, 2013

### Ray Vickson

You are confusing yourself by using bad notation: $P(X_1)$ has no meaning! The meaningful statements about $X_1$ are of the form $P(X_1=1) = ?$ (you fill it in), as well as $P(X_1 = 2) = ?$ and $P(X_1 = 3) = ?$ In general, you must determine the values of the probabilities $P(X_i = j)$ for i = 1,2,3 and j = 1,2,3.

7. May 27, 2013

### peripatein

Alright, so suppose I choose i=1 and j=2, would that be the probability P(X1 $\cap$X2 = 1 | X3 = 1 (i.e. the probability of X3 = 1 given that X1 AND X2 = 1) + P(X1 $\cap$X2 = 2 | X3 = 2) + P(X1 $\cap$X2 = 3 | X3 = 3) / P(X2 = 1) $\cup$ P(X2 = 2) $\cup$ P(X2 = 3)?

Last edited: May 27, 2013
8. May 27, 2013

### peripatein

But isn't that P(X1 ∩X2 = 1 | X3 = 1) / P(X2 = 1) + P(X1 ∩X2 = 2 | X3 = 2) / P(X2 = 2) + P(X1 ∩X2 = 3 | X3 = 3) / P(X2 = 3)= 1/3 + 1/3 + 1/3 = 1? What am I doing wrong?

9. May 27, 2013

### peripatein

I'd appreciate if any of you were willing to indicate how I am erring in my approach.

10. May 27, 2013

### I like Serena

You're confusing me, but it doesn't look right.

Can you perhaps fill in the question marks in Ray's last post?

And can you also find $P(X_1=1 \wedge X_2=1)$?

Note that the formula to calculate a probability (assuming equally likely outcomes) is:
$$P(\text{event})=\frac{\text{number of favorable outcomes}}{\text{total number of outcomes}}$$
Can you apply that to find the question marks?

11. May 27, 2013

### peripatein

I'd be happy to try.
P(X1=1) = P(X2=1) = P(X3=1) = 3/9 = 1/3.
Now, P(X1=1∧X2=1) = 1/9.
Is that correct?

12. May 27, 2013

### I like Serena

Yes. Good!

As you can see P(X1=1∧X2=1) = P(X1=1) P(X2=1) suggesting that they are independent.
It is equal to P(X1=1) P(X2=2)?

Or more generally, how about P(X1=1∧X2=j)?
Is it equal to P(X1=1) P(X2=j)?

And P(X1=i∧X2=j)?

Then, we can go to the next stage.
Is it equal to P(X1=1) P(X2=1) P(X3=1)?

13. May 27, 2013

### peripatein

I believe P(X1=1∧X2=j) = 1/3.
P(X1=1) P(X2=j) = 1/3 * 1 = 1/3.
Is that correct?

14. May 27, 2013

### I like Serena

Ah, no.
It appears you are summing the probabilities for each j.
But that is not intended.
It's just the probability for one particular j.

Now we're trying to generalize by saying that P(X1=1∧X2=j) = 1/9 for any j.

15. May 27, 2013

### peripatein

Okay, so P(X1=i∧X2=j) = 1/9, and P(X1=i) = P(X1=j) = 3/9 = 1/3.
Is it correct now?

16. May 27, 2013

### I like Serena

Yes. So in all cases P(X1=i∧X2=j) = P(X1=i) P(X2=j), which implies that X1 and X2 are independent.

17. May 27, 2013

### peripatein

But 1/9 is not equal to 1/27, so the triplet is not independent. Correct?

18. May 27, 2013

Correct.