# conditional probability and trial of experiments

#### asif

##### New Member
Consider a medical test for a disease, D. The test mostly gives the right answer, but not always. Say its false-negative rate is 1% and its false-positive rate is 2%, that is,
P(y | D) = 0.99;
P(n | D) = 0.01;
P(y | ¬D) = 0.02;
P(n | ¬D) = 0.98.
Assume that you perform the test 4 times in a trial and get the result "nnyn". How to calculate P(D)?

#### BGM

##### TS Contributor
Assume you means that there is a sequence of events $$Y_1, Y_2, Y_3, \ldots$$ which are mutually independent under the conditional probability $$P(\cdot|D)$$, and $$N_i = Y_i^c, i = 1, 2, 3, \ldots$$

Now you want to calculate $$P(D|N_1 \cap N_2 \cap Y_3 \cap N_4)$$

Next you can use the Baye's Theorem and the independent assumption to get the answer.

#### asif

##### New Member

From given data
total trails = 4
so
P(y) = 1/4
p(n) = 3/4

Now use law of total probability because you get probability of y in both the cases of D and ~D

Thus

p(y) = p(y/D)p(D) + p(y/~D)p(~D)

1/4 = 0.99 p(D) + 0.02 p(~D)....................................................(1)

similarly

p(n) = p(n/D)p(D)+ p(n/~D)p(~D)

3/4 = 0.01 p(D) + 0.98 p(~D)....................................................(2)

multiplying (1) by 49 and subtract (2) from it, we get

49/4 = 48.51 p(D) + 0.98 p(~D)
- 3/4 = -0.01 p(D) - 0.98 p(~D)
46/4 = 48.5 p(D) + 0

0.237 = p(D)