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
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
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- ps(1−r)=(1−p)fr
- p=rf/[s(1−r)+rf]=1/3
- q=1/3×3/4+(1−1/3)×1/4=5/12
- ps/q=1/4÷5/12=3/5
- Combine the preceding results to obtain the answer.
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
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- ps(1−r)=(1−p)fr
- s=r(1−p)f/[p(1−r)]=9/10
- q=2/5×9/10+(1−2/5)×1/5=12/25
- ps/q=9/25÷12/25=3/4
- Combine the preceding results to obtain the answer.
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
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- ps(1−r)=(1−p)fr
- f=ps(1−r)/[r(1−p)]=8/35
- q=3/10×4/5+(1−3/10)×8/35=2/5
- ps/q=6/25÷2/5=3/5
- Combine the preceding results to obtain the answer.
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.
Checking access…