How to Calculate the Probability of Picking 12 Different Colors from 16 Marbles

  • Context: Undergrad 
  • Thread starter Thread starter davee123
  • Start date Start date
  • Tags Tags
    Calculation Probability
Click For Summary
SUMMARY

The probability of selecting 12 different colors from 16 marbles when picking 16 marbles at random is calculated using combinatorial methods. The formula for this probability is p = \frac{\binom{16}{12} n}{16^{16}}, where n represents the number of ways to order the selected colors. The calculated probability is approximately 0.13029987, aligning closely with the rough estimate of 13.04%. This calculation can be adapted for different numbers of picks or colors by adjusting the parameters in the combinatorial formula.

PREREQUISITES
  • Understanding of combinatorial mathematics, specifically binomial coefficients.
  • Familiarity with exponential generating functions.
  • Basic probability theory, particularly in the context of random selections.
  • Experience with programming for simulation and verification of mathematical concepts.
NEXT STEPS
  • Study the application of binomial coefficients in probability calculations.
  • Learn about exponential generating functions and their use in combinatorial problems.
  • Explore variations of the problem by changing the number of picks or colors and recalculating probabilities.
  • Implement a simulation in Python or R to visualize the distribution of colors in random selections.
USEFUL FOR

Mathematicians, statisticians, computer scientists, and anyone interested in advanced probability theory and combinatorial analysis.

davee123
Messages
671
Reaction score
4
Suppose I have an infinite mix of marbles, each of which can be one of 16 colors. You pick 16 marbles at random. How do you calculate the probability of receiving, say, 12 different colors within the 16 you picked?

The probability of getting 1 color is pretty easy: 16/16^16

And the probability of getting all 16 colors is also easy: 16!/16^16

But the probability of getting something in the middle, I'm fuzzy on how to calculate. I wrote a script to test, so I know the rough probability of getting 12 colors is 13.04%, but I can't quite wrap my brain around how to calculate the more accurate probability, if (say) the number of picks changed, or if the number of colors changed.

DaveE
 
Physics news on Phys.org
davee123 said:
Suppose I have an infinite mix of marbles, each of which can be one of 16 colors. You pick 16 marbles at random. How do you calculate the probability of receiving, say, 12 different colors within the 16 you picked?

The probability of getting 1 color is pretty easy: 16/16^16

And the probability of getting all 16 colors is also easy: 16!/16^16

But the probability of getting something in the middle, I'm fuzzy on how to calculate. I wrote a script to test, so I know the rough probability of getting 12 colors is 13.04%, but I can't quite wrap my brain around how to calculate the more accurate probability, if (say) the number of picks changed, or if the number of colors changed.

DaveE
Hi DaveE,

I get a probability of 0.13029987, which is pretty close to your value of 0.1304.

You can possibly draw any of 16^16 sequences of colors, each of which we assume is equally likely.

There are [tex]\binom{16}{12}[/tex] ways to select 12 colors out of the 16.

Let's say there are n ways of ordering 16 colors, 12 of which are distinct; then the probability we seek is
[tex]p = \frac{\binom{16}{12} n}{16^{16}}[/tex]

It remains only to find n. I used an exponential generating function for this, but there are sure to be other ways. Let's say [tex]a_r[/tex] is the number of ways to order a selection of r colors drawn from a pallet of 12. Let
[tex]f(x) = \sum_{r=0}^{\infty} \frac{1}{r!} a_r x^r[/tex]
Then (it's easy when you know how!) we see
[tex]f(x) = (x + (1/2) x^2 + (1/3!) x^3 + \dots)^{12}[/tex]
[tex]= (e^x -1)^{12}[/tex]
[tex]= \sum_{i=0}^{12} (-1)^i \binom{12}{i} e^{ix}[/tex]

From this we can see that
[tex]n = a_{16} = -\binom{12}{1} + \binom{12}{2} 2^{16} - \binom{12}{3} 3^{16} + \dots + \binom{12}{12} 12^{16}[/tex]
which is approximately 1.3206639 x 10^15. Substituting this value for n in the equation for p above, we find p is approximately 0.13029987, as claimed.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 83 ·
3
Replies
83
Views
22K