First Success: Exact and Cumulative Probabilities
First Success: Exact and Cumulative Probabilities
Enter the marked-token count S and unmarked-token count F separately. For uniform draws without replacement, find the probability of first success exactly at draw k and by draw k.
- 181 bytes
- COMP mode
Worked examples
Example 1
A box contains S marked and F unmarked tokens. Draw uniformly without replacement. T is the draw of the first marked token. Find P(T=k) and P(T≤k); explain any impossible event. Give exact fractions and four-place decimals. S=4; F=7; k=2.
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- P(T=2)=(7/11)(4/10)=14/55
- P(T≤2)=1−C(7,2)/C(11,2)=34/55
- Combine the preceding results to obtain the answer.
Example 2
A box contains S marked and F unmarked tokens. Draw uniformly without replacement. T is the draw of the first marked token. Find P(T=k) and P(T≤k); explain any impossible event. Give exact fractions and four-place decimals. S=3; F=5; k=1.
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- P(T=1)=S/(S+F)=3/8=3/8
- P(T≤1)=P(T=1)=3/8
- Combine the preceding results to obtain the answer.
Example 3
A box contains S marked and F unmarked tokens. Draw uniformly without replacement. T is the draw of the first marked token. Find P(T=k) and P(T≤k); explain any impossible event. Give exact fractions and four-place decimals. S=2; F=2; k=4.
Answer
Standard solution (without a calculator)
- Build the mathematical model and substitute the data.
- T≤F+1=3<4
- P(T=4)=0; P(T≤4)=1
- Combine the preceding results to obtain the answer.
When to use it
Enter the marked-token count S and unmarked-token count F separately. For uniform draws without replacement, find the probability of first success exactly at draw k and by draw k.
Input order
- A=S
- B=F
- C=k
- 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(T=k)
- P(T≤k)
- Record the value and press EXE.
- The program has ended. Press AC to leave; EXE runs it again.
Conditions and limitations
- S,F∈ℤ; 0≤S,F≤99; S+F>0
- k∈ℤ; 1≤k≤S+F
- S=0 ⇒ (0,0); (S>0)∧(k>F+1) ⇒ (0,1)
- k>F ⇒ C(F,k)=0
- All remaining tokens are equally likely at each draw. The target category stays fixed; there is no replacement.
- Invalid, blank or noninteger input gives −9. With no marked token both probabilities are 0. Once k exceeds F+1 and S>0, the outputs are 0 and 1.
- 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…