166M1 · Probability distributions

Binomial Interval by Recurrence

Binomial Interval by Recurrence

Binomial Interval by Recurrence. X∼Bin(n,p); L≤X≤U. Model X as the number of successes in n independent trials with constant success probability p. Bounds are inclusive integers. This version rejects invalid data with Math ERROR, not −1. Values extremely near 0 or 1 may lose accuracy; probabilities below the numerical range may become 0.

  • 136 bytes
  • COMP mode
01

Worked examples

Example 1

Original exercise. X∼Bin(n,p); L≤X≤U. Data: n=6; p=0.4; L=2; U=4. Find: P(2≤X≤4). Retain exact fractions in written work; round only the final answer.

Answer
2268/3125≈0.7258
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. X∼Bin(6,2/5)
  3. P(2≤X≤4)=Σⱼ₌2^4C(6,j)(2/5)ʲ(1−2/5)^(6−j)
  4. 972/3125 + 864/3125 + 432/3125=2268/3125
  5. P=2268/3125≈0.7258
  6. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 2

Original exercise. X∼Bin(n,p); L≤X≤U. Data: n=5; p=0.8; L=4; U=5. Find: P(4≤X≤5). Retain exact fractions in written work; round only the final answer.

Answer
2304/3125≈0.7373
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. X∼Bin(5,4/5)
  3. P(4≤X≤5)=Σⱼ₌4^5C(5,j)(4/5)ʲ(1−4/5)^(5−j)
  4. 256/625 + 1024/3125=2304/3125
  5. P=2304/3125≈0.7373
  6. Combine the preceding results to obtain the answer.
Do it on the calculator

Example 3

Original exercise. X∼Bin(n,p); L≤X≤U. Data: n=7; p=0.25; L=0; U=1. Find: P(0≤X≤1). Retain exact fractions in written work; round only the final answer.

Answer
3645/8192≈0.4449
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data.
  2. X∼Bin(7,1/4)
  3. P(0≤X≤1)=Σⱼ₌0^1C(7,j)(1/4)ʲ(1−1/4)^(7−j)
  4. 2187/16384 + 5103/16384=3645/8192
  5. P=3645/8192≈0.4449
  6. Combine the preceding results to obtain the answer.
Do it on the calculator
02

When to use it

Binomial Interval by Recurrence. X∼Bin(n,p); L≤X≤U. Model X as the number of successes in n independent trials with constant success probability p. Bounds are inclusive integers. This version rejects invalid data with Math ERROR, not −1. Values extremely near 0 or 1 may lose accuracy; probabilities below the numerical range may become 0.

Input order

  • A=n
  • B=p
  • C=L
  • D=U
  • 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(L≤X≤U)
  • Record the value and press EXE.
  • The program has ended. Press AC to leave; EXE runs it again.

Conditions and limitations

  • n,L,U∈ℤ; 0≤L≤U≤n≤100; 0≤p≤1
  • P(X=k): L=U=k; P(X≤k): L=0,U=k; P(X≥k): L=k,U=n
  • Model X as the number of successes in n independent trials with constant success probability p. Bounds are inclusive integers. This version rejects invalid data with Math ERROR, not −1. Values extremely near 0 or 1 may lose accuracy; probabilities below the numerical range may become 0.
  • 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.

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.