Artificial intelligent assistant

What is the probability that the person actually has the disease? We are conducting a test on a rare disease. A positive result means that, according to the test, the subject is infected. The following characteristics are known about the test and the disease: If a person is infected, the person has a $95\%$ chance of testing positive. When a healthy person is tested, the test has a $99\%$ chance of giving a negative result. A mere $0.1\%$ of the population is infected with the disease. If a person is tested positive for the disease. What is the probability that the person actually has the disease? I don't understand how to write the conditional probabilities if someone can explain to me than I should know how to solve it, but I'm not sure how to convert the text into the mathematics language.

This involves using the Law of Total Probability and Bayes' Theorem. Let + and - represent positive and negative tests; let D and N represent having the disease and not. Here is an outline to get you started. Try to match each part to formulas in your text.

You seek $P(D|+) = P(D \cap +)/P(+).$

For the numerator, use $P(D \cap +) = P(D)P(+|D),$ where numerical values for both factors are given in the statement of the problem.

For the denominator, start with $P(+) = P(D \cap +) + P(N \cap +).$ You already know the first term from the numerator. Find a similar way to evaluate the second term from information given in the problem.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 90bbba33ffd9039f4ee2846412c42cf4