Skip to main contentSkip to solution

If a computer code is correctly programmed, it gives 90% acceptable results. But if it is not correctly programmed, it gives only 40% acceptable results. From previous experience, it is observed that only 80% of codes are correctly programmed. If after a certain programming, the code gives 2 acceptable results, then the approximate probability that the code is correctly programmed is

Solution

✅ Correct Option: 1

Let CC denote the event that the code is correctly programmed, and AA denote the event that 2 acceptable results are obtained.

Given information:

P(C)=0.8P(C) = 0.8

P(Cc)=0.2P(C^c) = 0.2

P(acceptable result∣C)=0.9P(\text{acceptable result} | C) = 0.9

P(acceptable result∣Cc)=0.4P(\text{acceptable result} | C^c) = 0.4


The probability of getting 2 acceptable results given the code is correctly programmed:

P(A∣C)=0.9×0.9P(A | C) = 0.9 \times 0.9

P(A∣C)=0.81P(A | C) = 0.81


The probability of getting 2 acceptable results given the code is incorrectly programmed:

P(A∣Cc)=0.4×0.4P(A | C^c) = 0.4 \times 0.4

P(A∣Cc)=0.16P(A | C^c) = 0.16


The total probability of getting 2 acceptable results:

P(A)=P(A∣C)×P(C)+P(A∣Cc)×P(Cc)P(A) = P(A | C) \times P(C) + P(A | C^c) \times P(C^c)

P(A)=0.81×0.8+0.16×0.2P(A) = 0.81 \times 0.8 + 0.16 \times 0.2

P(A)=0.648+0.032P(A) = 0.648 + 0.032

P(A)=0.68P(A) = 0.68


Using Bayes' theorem:

P(C∣A)=P(A∣C)×P(C)P(A)P(C | A) = \dfrac{P(A | C) \times P(C)}{P(A)}

P(C∣A)=0.81×0.80.68P(C | A) = \dfrac{0.81 \times 0.8}{0.68}

P(C∣A)=0.6480.68P(C | A) = \dfrac{0.648}{0.68}

P(C∣A)=648680P(C | A) = \dfrac{648}{680}

P(C∣A)=8185P(C | A) = \dfrac{81}{85}

Therefore, the approximate probability that the code is correctly programmed is 8185\dfrac{81}{85}.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question