Given two continuous variables $x_1$ and $x_2$ in range the range $0$ to $1$, we have a probability density function $p(x_1,x_2|y)$ defined as:
$$p(x_1,x_2|y=1) = \begin{cases}4 &\text{if } x_1\leq 0.5 \text{ and } x_2 \leq 0.5\\0 &\text{otherwise}\end{cases}$$
$$p(x_1,x_2|y=2) = \begin{cases}2 &\text{if } x_1 + x_2 \leq 1\\ 0 &\text{otherwise}\end{cases}$$
$$p(y=1) = p(y=2) = 0.5$$
The question is: are $x_1$ and $x_2$ independent when its given that $y=1$ and when $y=2$? According to the solution discussed in class, the answer is yes when $y=1$ and no when $y=2$. But I do not understand how?
Also, this is a question of classification. The $y=1, y=2$ are the two classes. I also need to find the probability of misclassification when the correct class is $y=2$.