Conditioned probability with Bayes' theorem

37 Views Asked by At

20% of people with a gene called G develops a disease called E, 10% of people have the G gene, and 5% of people develop E. If an individual develops E, what is the probability of who has the G gene?

My attempt

$P(E|G)=\frac{1}{5}$, $P(G)=\frac{1}{10}$, $P(E)=\frac{1}{20}$

Using Bayes' theorem $P(G|E)=\frac{P(E|G) P(G)}{P(E)}=\frac{2}{5}$

Is my reasoning correct? If not, could you help me? Thank you