176Mathematics · Counting and probability

Two Sources: Total Probability and Bayes

Two Sources: Total Probability and Bayes

Use two mutually exclusive, exhaustive sources to find an event probability and the reverse conditional probability.

  • 112 bytes
  • COMP mode
01

Worked examples

Example 1

Two exclusive and exhaustive sources H1,H2 produce an event E. The probabilities are given below. Find P(E) and P(H1|E). Give exact fractions and decimals to four places. P(H1)=2/5; P(E|H1)=3/4; P(E|H2)=1/4.

Answer
P(E)=9/20≈0.4500; P(H1|E)=2/3≈0.6667
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. P(H2)=1−2/5=3/5
  3. P(E)=(2/5)(3/4)+(3/5)(1/4)=9/20
  4. P(H1|E)=(2/5)(3/4)/(9/20)=2/3
  5. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 2

Two exclusive and exhaustive sources H1,H2 produce an event E. The probabilities are given below. Find P(E) and P(H1|E). Give exact fractions and decimals to four places. P(H1)=3/10; P(E|H1)=1/5; P(E|H2)=1/10.

Answer
P(E)=13/100≈0.1300; P(H1|E)=6/13≈0.4615
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. P(H2)=1−3/10=7/10
  3. P(E)=(3/10)(1/5)+(7/10)(1/10)=13/100
  4. P(H1|E)=(3/10)(1/5)/(13/100)=6/13
  5. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 3

Two exclusive and exhaustive sources H1,H2 produce an event E. The probabilities are given below. Find P(E) and P(H1|E). Give exact fractions and decimals to four places. P(H1)=13/20; P(E|H1)=0; P(E|H2)=4/5.

Answer
P(E)=7/25≈0.2800; P(H1|E)=0≈0.0000
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. P(H2)=1−13/20=7/20
  3. P(E)=(13/20)(0)+(7/20)(4/5)=7/25
  4. P(H1|E)=(13/20)(0)/(7/25)=0
  5. Combine the preceding results to obtain the answer.
Do it on the calculator
02

When to use it

Use two mutually exclusive, exhaustive sources to find an event probability and the reverse conditional probability.

Input order

  • A=P(H1)
  • B=P(E|H1)
  • C=P(E|H2)
  • Enter every required value, including 0; blank EXE is not zero. Read each result in order; an error code is not a probability.

Output order

  • P(E)
  • P(H1|E)
  • Record the value and press EXE.
  • The program has ended. Press AC to leave; EXE runs it again.

Conditions and limitations

  • 0<A<1; 0≤B≤1; 0≤C≤1
  • P(E)=0 ⇒ (0,−8)
  • A,B,C←−1
  • The sources must cover the whole population without overlap. Derive the three input probabilities before running the program.
  • Invalid or blank input gives −9. If P(E)=0, the first output is 0 and the second is −8 because the conditional probability is undefined.
  • The angle unit does not affect these calculations; the illustrated runs use Deg.
  • All used registers and Ans may be overwritten. Enter every required value again for each run.
  • Finite precision can lose small differences between large numbers or probabilities extremely near 0 or 1. An error marker is never a valid answer.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.