Question #291202

From the past experience of software quality testing, it is known that the probability of the presence of an error in coding is 0.05. If the probability of a tester detecting an error when the error is present is 0.78 and the probability of incorrectly detecting an error when the error is present is 0.78 and the probability of incorrectly detecting an error when the error is not present is 0.06 (a) What is the probability that a code is tested as having an error? (b) What is the probability that a code tested as having an error when the error is present?

1
Expert's answer
2022-01-28T10:02:23-0500

Let CC be the event that a tester correctly detects an error in a code. Also, let PP be the event that an error is present in a code.

We are given that,

p(P)=0.05    p(P)=1p(P)=10.05=0.95p(CP)=0.78p(CP)=0.78p(CP)=0.06    p(CP)=1p(CP)=10.06=0.94p(P)=0.05\implies p(P')=1-p(P)=1-0.05=0.95\\ p(C|P)=0.78\\p(C'|P)=0.78\\p(C'|P')=0.06\implies p(C|P')=1-p(C'|P')=1-0.06=0.94


a))

The probability that a code is tested as having an error is given as,

p(C)=p(CP)×p(P)+p(CP)×p(P)=(0.78×0.05)+(0.94×0.95)=0.932p(C)=p(C|P)\times p(P)+p(C|P')\times p(P')=(0.78\times0.05)+(0.94\times0.95)=0.932

Therefore, the probability that a code is tested as having error is 0.932.


b)b)

 The probability that a code tested as having an error when the error is present is given as,

p(PC)=p(CP)×p(P)p(C)=0.78×0.050.932=0.04185.p(P|C)={p(C|P)\times p(P)\over p(C)}={0.78\times0.05\over0.932}=0.04185.

Thus, the probability that a code tested as having an error when the error is present is 0.04185.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS