1. ## Probability chance Qn

A software company employs 3 programmers in one of their subsidiaries. The percentage of code written by each programmer and the percentage of errors in their code are shown in the following table:
Programmer
Percentage of
Code Written
Percentage of
Errors in Code
A
55%
2%
B
35%
3%
C
10%
5%

i) Suppose a programmer is selected at random. Before the code is examined, what is the chance that it was written by:
Programmer A?
Programmer B?
Programmer C?

ii) Suppose that the code is examined and found to contain errors.
After this examination, what is the chance that it was written by:
Programmer A?
Programmer B?
Programmer C?

2. Originally Posted by matty888
A software company employs 3 programmers in one of their subsidiaries. The percentage of code written by each programmer and the percentage of errors in their code are shown in the following table:
Programmer
Percentage of
Code Written
Percentage of
Errors in Code
A
55%
2%
B
35%
3%
C
10%
5%

i) Suppose a programmer is selected at random. Before the code is examined, what is the chance that it was written by:
Programmer A?
Programmer B?
Programmer C?

ii) Suppose that the code is examined and found to contain errors.
After this examination, what is the chance that it was written by:
Programmer A?
Programmer B?
Programmer C?
i) Surely you can do this!

ii) You need the concept of conditional probability. I'll do one of them:

Pr(A | Error) = Pr(A and Error)/Pr(Error).

Pr(A and Error) = Pr(Error | A) Pr(A) = (0.02)(0.55) = .....

Pr(Error) = Pr(Error | A) Pr(A) + Pr(Error | B) Pr(B) + Pr(Error | C) Pr(C) = (0.02)(0.55) + (0.03)(0.35) + (0.05)(0.1) = ....

Therefore Pr(A | Error) = ......