Tossing 12 different valued coins at the same time

combinatoricsprobability

I toss $3$ dimes, $4$ nickels, and $5$ pennies all at the same time. What is the chance that all of the ones that land heads up is $30$ cents?

This is from a timed competition, fastest answers are the best.

My answer: The denominator should be $2^{12}$ since we are throwing $12$ coins. There are $5$ cases of getting $30$ cents.

  1. $3$ dimes
  2. $2$ dimes, $2$ nickels
  3. $2$ dimes, $1$ nickels, $5$ pennies
  4. $1$ dimes, $4$ nickels
  5. $1$ dimes, $3$ nickels, $5$ pennies

For #1, there is only one option

For #2, there is $3\choose 2$ $\cdot$ $4\choose 2$ $= 18$, since we are picking $2$ out of $3$ dimes and $2$ out of $4$ nickels.

For #3, it would be $ 3 \cdot 4 = 12$, since we are picking $2$ out of $3$ dimes and $1$ out of $4$ nickels.

For #4, it would be be $3$

For #5, it would be $ 3 \cdot 4 = 12$.

My final answer is$\frac{46}{2^{12}}$

I'm not sure this is 100% correct, and this definitely isn't the fastest way. Can anyone check if I'm correct, and if not, tell me what is wrong? Faster answers is greatly appreciated.

Best Answer

Let's see if a simulation gives a close approximation to your answer. A million plays of the game should give probabilities accurate to about 2 or 3 places.

set.seed(2020)
p = rbinom(10^6,5,.5)
n = 5*rbinom(10^6,4,.5)
d = 10*rbinom(10^7,3,.5)
t = p + n + d
mean(t == 30)
[1] 0.0111551    # aprx P(T = 30)
2*sd(t==30)/1000
[1] 0.0002100539 # 95% margin of sim error
46/2^12
[1] 0.01123047   # Your answer
mean(t >= 30)
[1] 0.4125161

The simulated result $P(T = 30) = 0.0112\pm 0.0002$ seems to match your answer. Also, $P(T \ge 30) \approx 0.413.$

Here is a histogram with simulated probabilities of the distribution of $T.$

hist(t, prob=T, br=(0:56)-.5, col="skyblue2")
abline(h=46/2^12, col="orange")

enter image description here

Note: In R the vector t has a million totals. The vector t==30 is a logical vector of a million TRUEs and FALSEs. Its mean is the proportion of its TRUEs.