Probability of a bounded draw count
Probability of a bounded draw count
Probability of a bounded draw count · W,T,p
- 122 bytes
- COMP mode
Worked examples
Example 1
A box holds 5 blue and 7 gold medals, all distinct. A group of 4 medals is chosen uniformly at random without replacement. Find the probability that at least 2 are blue.
Answer
Standard solution (without a calculator)
- Set the target count: Let A=5 blue, B=7 gold and C=4. At least 2 blue means D=2 and X=5; the feasible values are r=2,3,4.
- Count favourable draws: C(5,2)C(7,2)=210, C(5,3)C(7,1)=70 and C(5,4)C(7,0)=5, so W=285.
- Count all draws: T=C(12,4)=495 equally likely four-medal subsets.
- Divide and choose: p=285/495=19/33≈0.575757575, option B.
Example 2
A pool contains 4 special and 9 ordinary tickets, all distinct. A group of 5 tickets is selected uniformly at random without replacement. Find the probability of drawing at most 1 special ticket.
Answer
Standard solution (without a calculator)
- Set the bound: Let A=4 special, B=9 ordinary and C=5. At most 1 special gives D=0, X=1 and cases r=0 or 1.
- Count favourable draws: C(4,0)C(9,5)=126 and C(4,1)C(9,4)=504, so W=630.
- Count all draws: T=C(13,5)=1287 equally likely five-ticket subsets.
- Divide and choose: p=630/1287=70/143≈0.489510489, option B.
Example 3
A club has 6 robotics members and 10 art members, all distinct. A group of 4 members is drawn uniformly at random without replacement. Find the number of groups with exactly 2 robotics members and the probability of this event.
Answer
Standard solution (without a calculator)
- Use an exact target count: Set A=6, B=10 and C=4. Exactly 2 robotics members means D=X=2.
- Count favourable groups: C(6,2)C(10,2)=15×45=675, so W=675.
- Count all groups: T=C(16,4)=1820 equally likely groups.
- Divide: p=675/1820=135/364≈0.37087912. The count and probability use the same favourable event.
When to use it
When every unordered subset of a fixed draw size is equally likely, the probability of a target-category count between the bounds is W/T. Count each valid target count r by C(A,r)C(B,C−r), then divide the sum by T=C(A+B,C).
Enter the population and range
- At A?, enter the number of target-category objects and at B? the number of all other objects. Enter draw size C?, the minimum target count D?, then the maximum X?. Draws are without replacement and each object is distinct.
- For at least L, set D=L and X=A; for at most U, set D=0 and X=U; for exactly r, set D=X=r. Enter every number explicitly. A blank EXE can reuse a stored variable rather than mean zero.
Read counts and probability
- The first display is favourable selections W. Press EXE to see T=C(A+B,C), the count of all equally likely selections, then EXE again for p=W/T. Record the last result and press AC.
- The program clips the target count to feasible values. If the interval contains no valid draw, W=0 and p=0 as long as T is valid. If the total combination count reaches 10¹⁴, it deliberately raises Math ERROR instead of showing an unreliable probability.
Question types
- Original HKDSE Mathematics Compulsory Part probability practice: drawing without replacement with at least, at most or exactly a specified number from one category. Explain why the subsets are equally likely.
Before you start
- Use COMP and an empty P1 with at least 122 bytes; P1–P4 share 680 bytes. The program may overwrite A,B,C,D,X,M,Y and Ans. Save useful stored values first; no special angle mode is needed.
- A,B,C must be nonnegative whole-number counts with C≤A+B. D and X are whole-number count bounds. Invalid combination arguments cause Math ERROR, not a valid probability of 0.
- Each object is distinct, draws are without replacement, and every unordered subset of size C must be equally likely. Other colours can be combined into category B only when the question restricts the count of category A alone.
- The algorithm clips the effective target count to max(0,D,C−B) through min(A,X,C). If D>X or no count is feasible, the favourable event is empty and p=0.
- If T=C(A+B,C) is at least 10¹⁴, the program deliberately causes Math ERROR before summing. Smaller displayed integer counts can still be rounded by the LCD; keep exact combination values in written work.
- The three displays are W, T and p, in that order. This model does not cover draws with replacement, ordered arrangements, waiting-time questions or simultaneous conditions on three separate categories.
Checking access…