# Some questions regarding Conditional Probability and hypothesis testing?

I know that P(B|A) = P(A and B) / P(A) by Bayes Rule, but what happens if A can vary across two values such as A = 1 and A = 0? How then would I find P(B|A)? Eg. If I had a scenario where

• P(B) = the probability of my test result where P(B=1) means my test results comes out positive and P(B=0) means my test result is negative
• P(A) = the prevalence of my disease where 1 indicates a prevalence and 0 means no disease

If I want to find the probability that my test results comes out positive given the initial condition of my disease = P(B = 1| A). How would I find this probability when A can take on the values of my disease being positive or negative?

Also if my first test comes out to be positive given the condition of my disease P(first test + | initial condition), would it make sense that the probability of my 2nd testing being positive given the condition of my disease P(2nd test + | initial condition) be the same since the result of the first test should be independent of my 2nd test given my initial condition?

• When we write $P(B|A)$, we mean $A$ is already given, i.e., $A$ is fixed in computing this. Sep 16, 2020 at 7:51

If I want to find the probability that my test results comes out positive given the initial condition of my disease = P(B = 1| A). How would I find this probability when A can take on the values of my disease being positive or negative?

In this case you will have $$P(B=1|A=0)$$ and $$P(B=1|A=1)$$. Conditioning on $$A$$ means that you already know its realization.

Also if my first test comes out to be positive given the condition of my disease P(first test + | initial condition), would it make sense that the probability of my 2nd testing being positive given the condition of my disease P(2nd test + | initial condition) be the same since the result of the first test should be independent of my 2nd test given my initial condition?

Cosider that if they are independent it must hold that, for any realizazion of $$A=\{0,1\}$$:

$$P(\text{1st test+ and 2nd test+} |A=a) = P(\text{1st test+} |A=a)P(\text{2nd test +} |A=a)$$

• so then considering that it holds that they are independent for any realization of A, is there any way I can find P(2nd test + | first test +) without knowing which value A takes on eg. 0 or 1? also thanks, I think this answer helped clear some of my misunderstandings. Sep 16, 2020 at 9:03
• This really depends on the data you have. Consider that $P(\text{1st test +})=P(\text{1st test +} \cap A=0)+P(\text{1st test +} \cap A=1)$.
– Ale
Sep 16, 2020 at 10:07