A spaceship has switches inside its cabinet control. 30% of them are red, 70% are blue. You've learned that the probability of a switch not to work is 0.12 if it is red, and 0.2 if it is blue. A switch is randomly pressed. What is the probability of it being a red switch knowing that it worked?
I'm really stuck in what to think here. Probability is not really intuitive to me. This is what I've tried, being $R = "Red"$, $W = "Worked"$:
$P(R | W) = \frac{P(R \cap W)}{P(W)}$, now I have to find each the numerator and denominator, but I can't get there with the info that I have.
from your data you get
$$\mathbb{P}[W|R]=1-0.12=0.88$$
$$\mathbb{P}[W|B]=1-0.20=0.80$$
Thus your solution is
$$\mathbb{P}[R|W]=\frac{0.30\times0.88}{0.30\times0.88+0.70\times0.80}\approx 0.32$$
this is a standard example of Bayes' Theorem