Artificial intelligent assistant

How do I allocate probabilities to appropriate events? **Que** for detecting a disease, a test gives correct diagnosis with probability $0.99$. It is known that $1\%$ of a population suffers from the disease. If a randomly selected individual from this population tests positive, then the probability that the selected individual actually has the disease is? I assume (what's wrong, I know it's wrong) **A** be the event that the test is positive **B** be the event that the individual is diseased Then a/c to question $P(B)=0.01\ P(A\cap B)=0.99$ and I need to find $P(B|A)=$probability that the individual is actually diseased if it's test is positive. If I am not wrong then I am not able to find the required probability with these values.

Let $S^+$ denote that the test shows positive, $S$ the is accurate, $\bar S$ the test was inaccurate and $T$ person has the disease, $\bar T$ does not have the disease. Then the probability of interest is \begin{align*} P(T|S^+) &= \frac{P(TS^+)}{P(S^+)}\\\ &=\frac{P(S|T)P(T)}{P(ST)+P(\bar S \bar T)}\\\ &=\frac{P(S|T)P(T)}{P(S|T)P(T)+P(\bar S|\bar T)P(\bar T)}\\\ &=\frac{(.99)(.01)}{(.99)(.01)+(.01)(.99)}\\\ &=\frac{1}{2}. \end{align*}

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 683752f0eaa3a96770929f4370a8d369