0
$\begingroup$

I am studying for my machine learning exam and i have problems with basic conditional probability. I have to solve the following exercise:

enter image description here

The formular for conditionally independence is

$P(Y|x) = \prod_{i=1}^{m} P(Y_{i}|x)$ and also

$P(Y|x) = P(Y_{1}|x) \prod_{i=1}^{m} P(Y_{i}|Y_{1},...,Y_{i-1},x)$

So i thought about the problem and came to these conclusions:

$P(Y_{1}|x) = 0.6$ because given an $x$ the probability of $Y_{1}$ being 1 is $0.3$ plus $0.3$. I've done the same for

$P(Y_{2}|x) = 0.4$

$P(Y_{3}|x) = 0.3$

So now i can compute $\prod_{i=1}^{m} P(Y_{i}|x)$, but what is $P(Y|x)$?

I thought that i can get $P(Y|x)$ by the second formula, but for that i require $P(Y_{1}|x)$, $P(Y_{2}|Y_{1},x)$, $P(Y_{3}|Y_{2},Y_{1},x)$.

For $P(Y_{2}|Y_{1},x)$ i came up with this:

$P(Y_{2}|Y_{1},x) = \frac{P(Y_{2}|x)}{P(Y_{1})}$, and $P(Y_{1}) = P(Y_{1}|x) P(X)$

But what is $P(X)$? How can i solve this problem? Are there any mistakes?

$\endgroup$
  • $\begingroup$ Please add the [self-study] tag & read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. $\endgroup$ – gung - Reinstate Monica Aug 8 '18 at 14:43
1
$\begingroup$

You already computed:

$P(y_1=1|x)=0.6$

$P(y_1=0|x)=0.4$

$P(y_2=1|x)=0.4$

$P(y_2=0|x)=0.6$

$P(y_3=1|x)=0.3$

$P(y_3=0|x)=0.7$

The values of $P(Y|x)$ that you are asking about (i.e. the joint probabilities) are actually given to you in the last column of the table as $P(y_1,y_2,y_3|x)$. So the final step is to check if the products are equal to the values of that column.

For example, row 4 of the table says that for $\{y_1=1,y_2=0,y_3=0\}$ we should get a product of $0.3$ if there is indeed conditional independence. So let's check:

$P(y_1=1|x) \times P(y_2=0|x) \times P(y_3=0|x)=0.6 \times 0.6 \times 0.7 = 0.252 \neq 0.3$

It appears that $P(y_1|x)P(y_2|x)P(y_3|x) \neq P(y_1,y_2,y_3|x)$

$\endgroup$
  • $\begingroup$ Ah. That makes sense. I was already wondering why i had $P(Y|x)$, but i indeed calculated it for $P(Y_{1}= 1|x)$ $\endgroup$ – Jens Aug 8 '18 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.