[Math] Probability of exactly one student failing

probability

I have the following problem:

If the probability that student A will fail a certain statis- tics
examination is 0.5, the probability that student B will fail the
examination is 0.2, and the probability that both student A and
student B will fail the examination is 0.1, what is the probability
and that exactly one of the two students will fail the examina- tion?

I came up with the following solution:
$$P(A) = 0.5; P(B) = 0.2$$
'exactly one' means either A only fails or B only fails.

Event $X_1$: 'A only fails'$$ P(X_1) = P(A) *P(B)^c = 0.5*0.8 = 0.4 $$
Event $X_2$: 'B only fails' $$P(X_2) = P(A)^c * P(B) = 0.5*0.2 = 0.1 $$
And therefore:
$$P(X_1\lor X_2) = P(X_1)+P(X_2)-P(X_1\land X_2) = 0.4+0.1-0 = 0.5 $$
My thoughts behind $P(X_1 \land X_2) = 0$ were that it is not possible that both only happens at the same time. I'm not fully sure whether that is correct. Should these logical thought be correct is the value of $0.5$ correct?

Best Answer

You need to find $P(A, \neg B) + P(\neg A, B)$. We know $P(A)$, $P(B)$ and $P(A, B)$.

We also know that $P(A,B)+P(A,\neg B)=P(A)$. You can get the value $P(A, \neg B)$ from here. Likewise, we also know that $P(A, B)+P(\neg A, B)=P(B)$ and thus you can also get the value $P(\neg A, B)$.