Respuesta :
Answer:
The answer is below
Step-by-step explanation:
Let S denote syntax errors and L denote logic errors.
Given that P(S) = 36% = 0.36, P(L) = 47% = 0.47, P(S ∪ L) = 56% = 0.56
a) The probability a program contains both error types = P(S ∩ L)
The probability that the programs contains only syntax error = P(S ∩ L') = P(S ∪ L) - P(L) = 56% - 47% = 9%
The probability that the programs contains only logic error = P(S' ∩ L) = P(S ∪ L) - P(S) = 56% - 36% = 20%
P(S ∩ L) = P(S ∪ L) - [P(S ∩ L') + P(S' ∩ L)] =56% - (9% + 20%) = 56% - 29% = 27%
b) Probability a program contains neither error type= P(S ∪ L)' = 1 - P(S ∪ L) = 1 - 0.56 = 0.44
c) The probability a program has logic errors, but not syntax errors = P(S' ∩ L) = P(S ∪ L) - P(S) = 56% - 36% = 20%
d) The probability a program either has no syntax errors or has no logic errors = P(S ∪ L)' = 1 - P(S ∪ L) = 1 - 0.56 = 0.44
Answer:
Kindly check explanation
Step-by-step explanation:
Given the following :
Programs with syntax errors ; n(S) = 36%
Programs with logic errors; n(L) = 47%
Programs with atleast one of the two errors = 56%
P(S) = 0.36 ; p(L) = 0.47
P(SnL) = x
P(S) only + p(L) only + p(SnL) = 0.56
P(S) only = 0.36 - x
P(L) only = 0.47 - x
P(SnL) = 0.36 - x + 0.47 - x + x = 0.56
0.83 - x = 0.56
x = 0.27
B) probability that program contains neither error :
1 - p(program contains atleast one of the two errors)
1 - 0.56 = 0.44
C) probability of logic error but no syntax error :
P(L) - p(SnL)
= 0.47 - 0.27
= 0.20
