Bayes: Total and Posterior Probability
Bayes: Total and Posterior Probability
Bayes: Total and Posterior Probability. p=P(A); s=P(B∣A); f=P(B∣A′); q=P(B); r=P(A∣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.
- 110 bytes
- COMP mode
Worked examples
Example 1
Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); q=P(B); r=P(A∣B). Data: p=0.35; s=0.8; f=0.2. Find: q,r. 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.
- P(A∩B)=7/20×4/5=7/25
- P(A′∩B)=(1−7/20)×1/5=13/100
- q=7/25+13/100=41/100
- r=7/25÷41/100=28/41≈0.6829
- Combine the preceding results to obtain the answer.
Example 2
Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); q=P(B); r=P(A∣B). Data: p=0.25; s=0.12; f=0.04. Find: q,r. 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.
- P(A∩B)=1/4×3/25=3/100
- P(A′∩B)=(1−1/4)×1/25=3/100
- q=3/100+3/100=3/50
- r=3/100÷3/50=1/2≈0.5000
- Combine the preceding results to obtain the answer.
Example 3
Original exercise. p=P(A); s=P(B∣A); f=P(B∣A′); q=P(B); r=P(A∣B). Data: p=0.7; s=0.3; f=0.6. Find: q,r. 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.
- P(A∩B)=7/10×3/10=21/100
- P(A′∩B)=(1−7/10)×3/5=9/50
- q=21/100+9/50=39/100
- r=21/100÷39/100=7/13≈0.5385
- Combine the preceding results to obtain the answer.
When to use it
Bayes: Total and Posterior Probability. p=P(A); s=P(B∣A); f=P(B∣A′); q=P(B); r=P(A∣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′)
- 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
- q=P(B)
- r=P(A∣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≤1; q>0
- −1⇒p,s,f∉[0,1]; −4⇒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.
- Enter every required value, including 0; blank EXE is not zero. Read each result in order; an error code is not a probability.
- 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…