A particular disease affects 0.1% of the population.
The test is 95% accurate.
You test positive.
What is the chance that you have the disease?
How I approached the problem:
Since I already tested positive, and the question clearly states that the test is 95% accurate, there should be a 95% probability that I have the disease. But, a YouTube video says that the chance I have the disease is 2%. How is my reasoning wrong?
Take a population of $1.000.000$.
This means that $1.000$ people have the disease and $999.000$ don't have the disease. With the test we get groups of false and true positives and false and true negatives. We aim to find the portion that are true positives compared to the false and true positives.
From the $1000$ people that have the disease, $950$ people will get a true positive and $50$ people will get a false negative (they have the disease, but because the test is $95$% accurate, they get a negative result). From the $999.000$ people that don't have the disease, $949.050$ will get a true negative and $49.950$ people will get a false positive.
Now the probability you actually have the disease while being positive is simply:
$\frac{950}{49.950+950}$ = $\frac{950}{50.900}$=0.018664...which is roughly $2$%.