aez-notes

Catching the Cautious Counterfeiter

(a) The king's minter boxes his coins 100 to a box. In each box he puts 1 false coin. The king suspects the minter and from each of 100 boxes draws a random coin and has it tested. What is the chance the minter's peculations go undetected? (b) What if both 100's are replaced by \(n\)?

numCoinsPerBox : n;

probSpotFake : 1 / numCoinsPerBox;

numBoxesChecked : n;

probUndetected : (1 - probSpotFake) ^ numBoxesChecked;

print(probUndetected);
/* (1 - 1/n) ^ n */

print(float(subst(100, n, probUndetected)));
/* approx 0.366 */

Author: Alex Zarebski

Created: 2022-04-15 Fri 12:30

Validate