138Mathematics · Counting and probability

First success without replacement

First success without replacement

N objects include K targets. Draw uniformly without replacement until the first target. For the given t, find both P(T=t) and P(T≤t), where T is the first successful draw.

  • 119 bytes
  • COMP mode
01

Worked examples

Example 1

Original exercise 1. N objects include K targets. Draw uniformly without replacement until the first target. For the given t, find both P(T=t) and P(T≤t), where T is the first successful draw. Data: A=N, total count = 10; B=K, target count = 4; C=t, index = 3.

  1. (a)Calculate all requested quantities in the stated order. Output order: P(T=t); P(T≤t).
Answer
P(T=3)=1/6; P(T≤3)=5/6.
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data. P(T=t)=C(N−t,K−1)/C(N,K).
  2. Written solution: |Ω|=C(10,4)=210.
  3. P(T=3)=C(7,3)/210=1/6.
  4. P(T≤3)=1−C(7,4)/210=1−(1/6)=5/6.
  5. Retain exact fractions in written work; round only the final answer.
Do it on the calculator

Example 2

Original exercise 2. N objects include K targets. Draw uniformly without replacement until the first target. For the given t, find both P(T=t) and P(T≤t), where T is the first successful draw. Data: A=N, total count = 12; B=K, target count = 2; C=t, index = 4.

  1. (a)Calculate all requested quantities in the stated order. Output order: P(T=t); P(T≤t).
Answer
P(T=4)=4/33; P(T≤4)=19/33.
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data. P(T=t)=C(N−t,K−1)/C(N,K).
  2. Written solution: |Ω|=C(12,2)=66.
  3. P(T=4)=C(8,1)/66=4/33.
  4. P(T≤4)=1−C(8,2)/66=1−(14/33)=19/33.
  5. Retain exact fractions in written work; round only the final answer.
Do it on the calculator

Example 3

Original exercise 3. N objects include K targets. Draw uniformly without replacement until the first target. For the given t, find both P(T=t) and P(T≤t), where T is the first successful draw. Data: A=N, total count = 8; B=K, target count = 3; C=t, index = 6.

  1. (a)Calculate all requested quantities in the stated order. Output order: P(T=t); P(T≤t).
Answer
P(T=6)=1/56; P(T≤6)=1.
Standard solution (without a calculator)
  1. Build the mathematical model and substitute the data. P(T=t)=C(N−t,K−1)/C(N,K).
  2. Written solution: |Ω|=C(8,3)=56.
  3. P(T=6)=C(2,2)/56=1/56.
  4. P(T≤6)=1−C(2,3)/56=1−(0)=1.
  5. Retain exact fractions in written work; round only the final answer.
Do it on the calculator
02

When to use it

N objects include K targets. Draw uniformly without replacement until the first target. For the given t, find both P(T=t) and P(T≤t), where T is the first successful draw.

Input order

  • A=N, total count
  • B=K, target count
  • C=t, index
  • Every displayed input is required unless a blank is explicitly specified. Empty EXE keeps a stored value, whereas typing 0 replaces it with zero. The listed domain conditions must be checked even when the program does not test all of them.

Output order

  • P(T=t)
  • P(T≤t)
  • Record the value and press EXE.
  • The program has ended. Press AC to leave; EXE runs it again.

Conditions and limitations

  • N,K,t∈ℤ; 1≤K≤N; 1≤t≤N.
  • t>N−K+1 ⇒ P(T=t)=0; P(T≤t)=1.
  • K=N ⇒ P(T=1)=1.
  • −1: N<1 / K<1 / K>N / t<1 / t>N.
  • Every displayed input is required unless a blank is explicitly specified. Empty EXE keeps a stored value, whereas typing 0 replaces it with zero. The listed domain conditions must be checked even when the program does not test all of them.
  • Use consistent units throughout.
  • 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.