152M1 · Probability distributions

Bayes: Four-Field Inverse

Bayes: Four-Field Inverse

Bayes: Four-Field Inverse. p=P(A); s=P(B∣A); f=P(B∣A′); r=P(A∣B); q=P(B). Let A and its complement partition all outcomes; B is the observed event. Enter probabilities as decimals, not percentages. Only two complementary categories are supported.

  • 365 bytes
  • COMP mode
01

Worked examples

Example 1

Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); r=P(A∣B); q=P(B). Data: s=0.75; f=0.25; r=0.6. Find: p,q. Retain exact fractions in written work; round only the final answer.

Answer
p=1/3; q=5/12
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. ps(1−r)=(1−p)fr
  3. p=rf/[s(1−r)+rf]=1/3
  4. q=1/3×3/4+(1−1/3)×1/4=5/12
  5. ps/q=1/4÷5/12=3/5
  6. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 2

Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); r=P(A∣B); q=P(B). Data: p=0.4; f=0.2; r=0.75. Find: s,q. Retain exact fractions in written work; round only the final answer.

Answer
s=9/10; q=12/25
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. ps(1−r)=(1−p)fr
  3. s=r(1−p)f/[p(1−r)]=9/10
  4. q=2/5×9/10+(1−2/5)×1/5=12/25
  5. ps/q=9/25÷12/25=3/4
  6. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 3

Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); r=P(A∣B); q=P(B). Data: p=0.3; s=0.8; r=0.6. Find: f,q. Retain exact fractions in written work; round only the final answer.

Answer
f=8/35; q=2/5
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. ps(1−r)=(1−p)fr
  3. f=ps(1−r)/[r(1−p)]=8/35
  4. q=3/10×4/5+(1−3/10)×8/35=2/5
  5. ps/q=6/25÷2/5=3/5
  6. Combine the preceding results to obtain the answer.
Do it on the calculator
02

When to use it

Bayes: Four-Field Inverse. p=P(A); s=P(B∣A); f=P(B∣A′); r=P(A∣B); q=P(B). Let A and its complement partition all outcomes; B is the observed event. Enter probabilities as decimals, not percentages. Only two complementary categories are supported.

Input order

  • A=p=P(A)
  • B=s=P(B∣A)
  • C=f=P(B∣A′)
  • D=r=P(A∣B)
  • Leave exactly one field blank with EXE; enter a known zero explicitly. The first result is the missing probability, then P(B). −1: invalid data; −2: no valid solution; −3: nonunique; −4: undefined posterior because P(B)=0. Literal −1 also acts as a blank.

Output order

  • p / s / f / r
  • q=P(B)
  • Record the value and press EXE.
  • The program has ended. Press AC to leave; EXE runs it again.

Conditions and limitations

  • 0≤p,s,f,r≤1; q>0
  • Let A and its complement partition all outcomes; B is the observed event. Enter probabilities as decimals, not percentages. Only two complementary categories are supported.
  • Leave exactly one field blank with EXE; enter a known zero explicitly. The first result is the missing probability, then P(B). −1: invalid data; −2: no valid solution; −3: nonunique; −4: undefined posterior because P(B)=0. Literal −1 also acts as a blank.
  • 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.