Multiple conditional variables in probability

64 Views Asked by At

I have trouble understanding, why my solution is wrong.

Given:

$P(A) = 0.5\\ \forall i: P(X_i |A ) = 0.2\\ \quad P(X_i|\neg A) = 0.6$

(And all $X_i$ are dependant on and only on $A$.) This is bad mathematical formulation. There was a graph, with $A$ at top and arrows from $A$ to all $X_i$

Asked: $P(A|X_1 X_2 \neg X_3)$

The solution should be $\approx 0.1818...$ As far as i know my numerator is correct and i don't understand why my denominator isn't.

My Approach:

I use the equation $P(A|B) = P(A B)/P(B)$ over and over.

$P(A|X_1 X_2 \neg X_3) = P(A X_1 X_2 \neg X_3)/P(X_1 X_2 \neg X_3) = \\ \frac{P(\neg X_3 | A X_1 X_2) P(AX_1X_2)}{P(X_1 X_2 \neg X_3)} = \frac{P(\neg X_3 | A X_1 X_2) P(X_2|AX_1) P(AX_1)}{P(X_1 X_2 \neg X_3)} =\\ \frac{P(\neg X_3 | A X_1 X_2) P(X_2|AX_1) P(X_1|A) P(A)}{P(X_1 X_2 \neg X_3)}$

Since $X_i$ is never dependant on any other $X_j$ i can simplify into:

$\frac{P(\neg X_3 | A) P(X_2|A) P(X_1|A) P(A)}{P(X_1 X_2 \neg X_3)}$

All the numbers for the numerator are given: $\frac{0.8\cdot 0.2 \cdot 0.2 \cdot 0.5}{P(X_1 X_2 \neg X_3)} = \frac{0.016}{P(X_1 X_2 \neg X_3)}$

So now i need to find out what $P(X_i)$ is. $P(X_i) = P(X_i|A) P(A) + P(X_i| \neg A) P(\neg A)\\ = 0.2 \cdot 0.5 + 0.6 \cdot 0.5 = 0.4$

Since $X_i$ are indpenendent, $P(X_1 X_2 \neg X_3) = P(X_1) P(X_2) P(\neg X_3)\\ = 0.4 \cdot 0.4 \cdot 0.6 = 0.096$

So $P(A|X_1 X_2 \neg X_3) = \frac{0.016}{P(X_1 X_2 \neg X_3)} = \frac{0.016}{0.096} = 0.166...$ which is not equal to $0.1818...$

What is my mistake with the denominator? Have i expanded incorrectly? Is my understanding of dependant/independant variables wrong?

(I know, no homeworks. This is from a udacity course. Complete solution is available. I just want to know, where i have done a mistake with my approach, because clearly i have difficulties with understanding dependent variables)


Official solution:

Get the numerator: $P'(A|X_1 X_2 \neg X_3) = 0.016$ (as with my solution)

Get the numerator: $P'(\neg A|X_1 X_2 \neg X_3) = 0.072$ (double checking with $ = 0.4 \cdot 0.6 \cdot 0.6 \cdot 0.5$)

Both P's are not weighted and together they should add up to 1. So $0.016 + 0.072 = 0.088$ is the weighting factor.

$\Rightarrow \frac{P'(A|X_1 X_2 \neg X_3)}{P'(A|X_1 X_2 \neg X_3) + P'(\neg A|X_1 X_2 \neg X_3)} = \frac{0.016}{0.016+0.072} = \frac{0.016}{0.088} = 0.1818...$

1

There are 1 best solutions below

6
On BEST ANSWER

Your statements about independence are somewhat lax, and this is also what seems to have caused the error – I think this is a good opportunity to become more clear about what (in)dependence means and doesn't mean.

You write "All $X_i$ are dependent on and only on $A$", and you later conclude that the $X_i$ are independent. It's not entirely clear to me what exactly "being dependent on and only on $A$" means, but from the official solution, it seems that the intended meaning is: The $X_i$ are random variables whose joint distribution is as if you first throw a coin (event $A$) and then independently choose the $X_i$ depending on $A$, with the given conditional probabilities. This does not mean that the $X_i$ are independent; in fact, the fact that they all depend on the same event $A$ makes them dependent.