4

Here's the question: Suppose there's a bag filled with balls numbered one through fifty. You reach in and grab three at random, put them to the side, and then replace the ones you took so that the bag is once again filled with fifty distinctly numbered balls. Do this five times, so you have 5 groups of 3 numbered balls such that within each group every number is distinct from the other, but across groups, the numbers may not necessarily be distinct.

What is the probability that you have some three-of-a-kind in your five groups? That is to say, what is the probability that some number appears at least three times among the selected balls?

Now I'm not very good at probability, but I'm pretty sure I know how I would brute-force calculate the probability of this situation, but it would take a ridiculously long time. Does anyone know a particularly elegant method for solving something like this? Also, more generally, are there problems of this sort that are fundamentally messy, which require long case-by-case calculations and there's no tidy and pleasing way to answer them?

Hope my question makes sense, let me know if there is any clarification needed. Cheers friends!

Edit: It appears I need to share more context and more of my own work so far. Briefly, I came up with this question, it's not for a class, just my own curiosity. It's actually related to character selection in the video game Heroes of the Storm, where each of five players is given a selection of three characters at random. I was just trying to calculate some probabilities, like - What is the chance you get a particular character you want to play? What is the chance the character you want to play appears somewhere among the five players? What is the chance that some character appears twice or more among the five players? Etc.

For the latter question - What is the chance that some character appears twice or more - I managed a fairly straightforward solution that I hope is correct, here is my process:

Characters are represented as the numbers 1-50. Five groups are selected represented as ${(X_1, Y_1, Z_1), (X_2, Y_2, Z_2), ..., (X_5, Y_5, Z_5)}$ s.t $X_n \neq Y_n \neq Z_n$
Let's also call the character set $C_n = (X_n, Y_n, Z_n)$

The probability that some character appears twice or more is the same as 1 minus the probability that all characters are distinct. So we want to find

$ P(C_1, C_2, ..., C_5 $ are distinct $) = P(C_1 $ is distinct$) * P(C_2 $ is distinct$ | C_1 $ is distinct$) * ... * P(C_5 $ is distinct$ | C_1, C_2, C_3, C_4 $ are distinct$) $

$X_1 \neq Y_1 \neq Z_1$ therefore $C_1$ is distinct always.

$P(C_2$ is distict | $C_1$ is distinct) $= (\frac{47}{50})(\frac{46}{49})(\frac{45}{48}) $ since there are three choices that can no longer be taken if distinction is going to be preserved. Since $X_2 \neq Y_2 \neq Z_2$, the denominator must decrease by one each time.

Similarly, $P(C_3$ is distinct | $C_1, C_2$ are distinct) $= (\frac{44}{50})(\frac{43}{49})(\frac{42}{48})$

$P(C_4$ is distinct | $C_1, C_2, C_3$ are distinct) $= (\frac{41}{50})(\frac{40}{49})(\frac{39}{48})$

$P(C_5$ is distinct | $C_1, C_2, C_3, C_4$ are distinct) $= (\frac{38}{50})(\frac{37}{49})(\frac{36}{48})$

The probability that every character is distinct is the product of all the above terms, so: $(\frac{50}{50})(\frac{49}{49})(\frac{48}{48})(\frac{47}{50})(\frac{46}{49})(\frac{45}{48})(\frac{44}{50})(\frac{43}{49})(\frac{42}{48})(\frac{41}{50})(\frac{40}{49})(\frac{39}{48})(\frac{38}{50})(\frac{37}{49})(\frac{36}{48})$

Or more succinctly, $\frac{50!}{35!*50^5*49^5*48^5} \approx 13.1\%$

It follows then that the probability of having one character appear at least twice would be approximately 86.9%. I feel fairly confident in this answer but I'm always prone to think I'm right and then be miles off, so if someone sees a mistake in my reasoning (if it's even readable) let me know!

I am having a hard time figuring out a solution to the more specific problem of - what is the probability of having one character appear at least three times? I would approach it a similar way, but it seems to require ridiculous amounts of calculations that I don't really care to do, I'd just rather code a quick simulation to find the answer, haha. I am interested in the mathematics of it though, and wonder if anyone has any advice on a more elegant way than brute-forcing every conditional case, I would love to hear it! Hope this clears things up a bit.

Jotak
  • 53
  • 2

    are there problems of this sort that are fundamentally messy, which require long case-by-case calculations and there's no tidy and pleasing way to answer them?

    Yes.

    – Rohit Pandey Nov 13 '21 at 01:58
  • 1
    See my comment following the answer of Rohit Pandey. – user2661923 Nov 13 '21 at 02:14
  • 1
    @Jotaj Is the following correct? You're asking for the probability that among all fifteen elements of $(X_1,Y_1,Z_1,...,X_{5},Y_{5},Z_{5})$ there are at least three that are equal, where the triples $(X_i,Y_i,Z_i)$ are mutually independent and each triple is a random sample without replacement from ${1,..,50}$ (so any three of the fifty values are possible in each triple). – r.e.s. Nov 13 '21 at 02:25
  • @r.e.s. Yeah that's precisely the question! – Jotak Nov 13 '21 at 02:27
  • @r.e.s. No guarantee, but that is the way that I interpret the problem. As you stated, $X_1$ can not equal $Y_1$ or $Z_1$, but could equal one or more of the other $12$ variables. However, if (for example) $X_1 = X_2$, then $X_1$ can not equal either $Y_2$ or $Z_2$. Actually, your interpretation already covered this, but I thought it worthwhile to emphasize the point. – user2661923 Nov 13 '21 at 02:28
  • 1
    What have you tried? Show your effort and you will most likely see many elegant solutions. A good question receives interest of many. I would have liked to answer too. Here, how to ask a good question: https://math.meta.stackexchange.com/questions/9959/how-to-ask-a-good-question – Math Lover Nov 13 '21 at 02:38
  • 1
    @MathLover Hey thanks! Yeah, I should give more context and current work, this is my first post ever on this site. Writing up some more stuff right now <3 – Jotak Nov 13 '21 at 02:49
  • It seems this is equivalent to “draw with replacement”. – gnasher729 Nov 13 '21 at 20:59

2 Answers2

4

Addendum of clarifications added in response to the comment/questions of Jotak.


$\underline{\text{First Problem : General Considerations and Choice of Denominator}}$

In this section, I discuss the specific problem that the OP (i.e. original poster) tackled - what is the probability of at least one character occurring two or more times?

I like the OP's approach here. In effect, he computed

$P = $ the probability of having $15$ distinct numbers chosen, with no repetitions.

Then, he reasoned that the probability that some repetition occurred is $(1 - P)$. I used a different strategy to compute $P$, and arrived at the same answer that the OP did.

I used the approach of

$$P = \frac{N\text{(umerator)}}{D\text{(enominator)}}$$

where I set

$$D = \frac{(50!)^5}{(47!)^5}.\tag1$$

The employment of this denominator presumes that the order that the numbers are assigned to each of the $(15)$ slots is important. For example, assigning the numbers $(X_1 = 1, Y_1 = 2, Z_1 = 3)$ will be regarded as distinct from the assignment of $(X_1 = 2, Y_1 = 3, Z_1 = 1)$.

When this denominator is employed, the computation of $N$ must be done in a consistent manner.


$\underline{\text{First Problem : Computation of Numerator}}$

The $15$ slots may be regarded as separate units that have to be filled. Since the order that these units are filled is relevant, there are $50$ choices for the first slot, then $49$ choices for the second slot, and so forth.

Therefore, the numerator is computed as

$$N = \frac{(50!)}{(50 - 15)!}.\tag2$$

Putting (1) and (2) together yields

$$P = \frac{50!}{35!} \times \left(\frac{47!}{50!}\right)^5 \tag3$$

which matches the OP's computation.


$\underline{\text{Pending Question : Overview}}$

The pending question is:

What is the probability that there is at least one occurrence of a character being repeated $3$ or more times. Generally, there are $3$ approaches to such a problem:

I have decided to use the direct approach, with some shortcuts. Ironically, within the (overall) direct approach, there will be a (nested) use of Inclusion-Exclusion. ...(to be explained later).

Let $P$ denote the probability that all characters are distinct.
$P$ has already been calculated, both by the OP and at the start of my answer.

Let $Q$ denote the probability that there is at least one character that is repeated, while at the same time, no character occurs more than twice.

Then, the desired probability will be

$$1 - P - Q.$$

Therefore, the problem has been reduced to calculating $(Q)$.


$\underline{\text{Pending Question : Partitioning the Numerator}}$

Similar to the start of my answer, I am going to use the approach that

$$Q = \frac{N\text{(umerator)}}{D\text{(enominator)}}$$

where $D$ will again be as specified in (1) above.

So, as with the first problem, the pending problem has been completely reduced to computing $(N)$, the numerator that will be used when computing $(Q)$.

Since there are only $(5)$ grabs (i.e. $5 \times 3$ individual selections), it is impossible for there to be more than $(7)$ numbers repeated.

For $k \in \{1,2,3,4,5,6,7\}$, let $f(k)$ denote the number of ways that $k$ distinct numbers each occurred exactly twice, with all of the other $(15 - 2k)$ numbers distinct.

Then $\displaystyle N = \sum_{k=1}^7 f(k).$


$\underline{\text{Pending Question : Combining Slots Into Units}}$

The overall (direct approach) to computing $f(k)$ will be

  • Enumerating the number of acceptable ways of pairing up slots. Each time that $(2)$ of the $(15)$ slots are paired up, the number of units decreases by $(1)$.

As an illustrative example, suppose that when computing $f(4)$, you conclude that there are $g$ (acceptable) ways of creating $(4)$ pairs. Here, the term acceptable refers to (for example) none of the pairs being formed from $(2)$ elements in the set $\{X_1, Y_1, Z_1\}$.

With $(4)$ pairs formed, the number of units has been reduced from $(15)$ to $(15 - 4 = 11)$. Then, in computing $f(4)$ you would reason that there are $(50)$ numbers that could be assigned to the first (of the $11$) units, then $(49)$ numbers that could be assigned to the next unit, and so on.

Therefore, in this hypothetical,
$\displaystyle f(4) = g \times \frac{(50!)}{[(50 - 11)!]}.$


$\underline{\text{Pending Question : Inclusion-Exclusion}}$

From the previous section, it is clear that the only challenge is to compute the number of acceptable ways of creating $(k)$ pairs $~: ~k \in \{1,2,\cdots, 7\}$, which will convert the number of units from $(15)$ to $(15 - k)$. Inclusion-Exclusion will be used here. In this section, the Inclusion-Exclusion nomenclature will be described and an overview of the Inclusion-Exclusion algorithm will be given.

For any set $S$ with a finite number of elements, let $|S|$ denote the number of elements in the set $S$.

Assume that the number of acceptable pairings is to be calculated for a specific (fixed) value of $k$.

Let $T_0$ denote the enumeration of all of the possible ways of creating $k$ pairings, without any regard for whether any of these pairings are not acceptable.

For $r \in \{1,2,3,4,5\}$, let $A_r$ denote the set of $k$ pairings, where one of the pairings uses $(2)$ of the elements in $\{X_r, Y_r, Z_r\}$. Thus, $A_r$ represents the set of pairings where (in effect) the prohibition against pairing on row $r$ is violated.

Let $T_1$ denote $\displaystyle \sum_{r = 1}^5 |A_r|.$
By symmetry, you will have that $|A_1| = |A_2| = \cdots = |A_5|.$

When $k \geq 2$, let $T_2$ denote
$\displaystyle \sum_{1 \leq i_1 < i_2 \leq 5} \left[A_{i_1} \cap A_{i_2}\right].$
That is, $T_2$ involves the summation of $\displaystyle \binom{5}{2}$ terms.
By symmetry, you will have that each of these $\displaystyle \binom{5}{2}$ terms equals $|A_1 \cap A_2|.$

When $k \geq 3$, let $T_3$ denote
$\displaystyle \sum_{1 \leq i_1 < i_2 < i_3 \leq 5} \left[A_{i_1} \cap A_{i_2} \cap A_{i_3}\right].$
That is, $T_3$ involves the summation of $\displaystyle \binom{5}{3}$ terms.
By symmetry, you will have that each of these $\displaystyle \binom{5}{3}$ terms equals $|A_1 \cap A_2 \cap A_3|.$

When $k \geq 4$, let $T_4$ denote
$\displaystyle \sum_{1 \leq i_1 < i_2 < i_3 < i_4 \leq 5} \left[A_{i_1} \cap A_{i_2} \cap A_{i_3} \cap A_{i_4}\right].$
That is, $T_4$ involves the summation of $\displaystyle \binom{5}{4}$ terms.
By symmetry, you will have that each of these $\displaystyle \binom{5}{4}$ terms equals $|A_1 \cap A_2 \cap A_3 \cap A_4|.$

When $k \geq 5$, let $T_5$ denote
$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4 \cap A_5|.$

Note
When $k < 5$, you can not have more than $k$ rows violated simultaneously, because you are only creating $k$ pairings.

In accordance with Inclusion-Exclusion, for $k \geq 5$, the number of acceptable pairings will be computed as

$$T_0 - |A_1 \cup A_2 \cup \cdots \cup A_5| = \sum_{j = 0}^5 \left[ (-1)^j T_j\right]. \tag4 $$

Thus, the computation in the line above will represent a scalar that will be applied to $\displaystyle \frac{(50!)}{[(50 - 15 + k)!]}.$

When $k < 5$, the only change to the summation in (4) above, will be that the upper bound of the summation will be $(k)$, rather than $(5)$.


$\underline{\text{Computation of } ~f(1):}$

$(1)$ pairing will be created.

$\displaystyle T_0 = \binom{15}{2} = 105.$

$\displaystyle |A_1| = \binom{3}{2} = 3.$

Therefore, $\displaystyle T_1 = (5 \times 3) = 15.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 = 105 - 15 = 90.$$

Therefore,

$$f(1) = 90 \times \frac{(50!)}{(50 - 14)!} = 90 \times \frac{(50)!}{(36!)}. \tag5$$


$\underline{\text{Computation of } ~f(2):}$

$(2)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2}}{2!} = 4095.$
The denominator of $(2!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(2!)$ times.

$\displaystyle |A_1| = \binom{3}{2} \times \binom{13}{2} = 234.$

$\displaystyle T_1 = (5 \times 234) = 1170.$

$\displaystyle |A_1 \cap A_2| = \binom{3}{2}^2 = 9.$

$\displaystyle T_2 = (10 \times 9) = 90.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 = 4095 - 1170 + 90 = 3015.$$

Therefore,

$$f(2) = 3015 \times \frac{(50!)}{(50 - 13)!} = 3015 \times \frac{(50)!}{(37!)}. \tag6$$


$\underline{\text{Computation of } ~f(3):}$

$(3)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2} \times \binom{11}{2}}{3!} = 75075.$
The denominator of $(3!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(3!)$ times.

$\displaystyle |A_1| = \frac{\binom{3}{2} \times \binom{13}{2} \times \binom{11}{2}}{2!} = 6435.$

$\displaystyle T_1 = (5 \times 6435) = 32175.$

$\displaystyle |A_1 \cap A_2| = \binom{3}{2}^2 \times \binom{11}{2} = 495.$

$\displaystyle T_2 = (10 \times 495) = 4950.$

$\displaystyle |A_1 \cap A_2 \cap A_3| = \binom{3}{2}^3 = 27.$

$\displaystyle T_3 = (10 \times 27) = 270.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 - T_3 = 75075 - 32175 + 4950 - 270 = 47580.$$

Therefore,

$$f(3) = 47580 \times \frac{(50!)}{(50 - 12)!} = 47580 \times \frac{(50)!}{(38!)}. \tag7 $$


$\underline{\text{Computation of } ~f(4):}$

$(4)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2}}{4!} = 675675.$
The denominator of $(4!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(4!)$ times.

$\displaystyle |A_1| = \frac{\binom{3}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2}}{3!} = 77220.$

$\displaystyle T_1 = (5 \times 77220) = 386100.$

$\displaystyle |A_1 \cap A_2| = \frac{\binom{3}{2}^2 \times \binom{11}{2} \times \binom{9}{2}}{2!} = 8910.$

$\displaystyle T_2 = (10 \times 8910) = 89100.$

$\displaystyle |A_1 \cap A_2 \cap A_3| = \binom{3}{2}^3 \times \binom{9}{2} = 972.$

$\displaystyle T_3 = (10 \times 972) = 9720.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4| = \binom{3}{2}^4 = 81.$

$\displaystyle T_4 = (5 \times 81) = 405.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 - T_3 + T_4 \\= 675675 - 386100 + 89100 - 9720 + 405 = 369360.$$

Therefore,

$$f(4) = 369360 \times \frac{(50!)}{(50 - 11)!} = 369360 \times \frac{(50)!}{(39!)}. \tag8 $$


$\underline{\text{Computation of } ~f(5):}$

$(5)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2}}{5!} = 2837835.$
The denominator of $(5!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(5!)$ times.

$\displaystyle |A_1| = \frac{\binom{3}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2}}{4!} = 405405.$

$\displaystyle T_1 = (5 \times 405405) = 2027025.$

$\displaystyle |A_1 \cap A_2| = \frac{\binom{3}{2}^2 \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2}}{3!} = 62370.$

$\displaystyle T_2 = (10 \times 62370) = 623700.$

$\displaystyle |A_1 \cap A_2 \cap A_3| = \frac{\binom{3}{2}^3 \times \binom{9}{2} \times \binom{7}{2}}{2!} = 10206.$

$\displaystyle T_3 = (10 \times 10206) = 102060.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4| = \binom{3}{2}^4 \times \binom{7}{2} = 1701.$

$\displaystyle T_4 = (5 \times 1701) = 8505.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4 \cap A_5| = \binom{3}{2}^5 = 243.$

$\displaystyle T_5 = 243.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 - T_3 + T_4 - T_5 \\= 2837835 - 2027025 + 623700 - 102060 + 8505 - 243 = 1340712.$$

Therefore,

$$f(5) = 1340712 \times \frac{(50!)}{(50 - 10)!} = 1340712 \times \frac{(50)!}{(40!)}. \tag{9} $$


$\underline{\text{Computation of } ~f(6):}$

$(6)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}}{6!} = 4729725.$
The denominator of $(6!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(6!)$ times.

$\displaystyle |A_1| = \frac{\binom{3}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}}{5!} = 810810.$

$\displaystyle T_1 = (5 \times 810810) = 4054050.$

$\displaystyle |A_1 \cap A_2| = \frac{\binom{3}{2}^2 \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}}{4!} = 155925.$

$\displaystyle T_2 = (10 \times 155925) = 1559250.$

$\displaystyle |A_1 \cap A_2 \cap A_3| = \frac{\binom{3}{2}^3 \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}}{3!} = 34020.$

$\displaystyle T_3 = (10 \times 34020) = 340200.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4| = \frac{\binom{3}{2}^4 \times \binom{7}{2} \times \binom{5}{2}}{2!} = 8505.$

$\displaystyle T_4 = (5 \times 8505) = 42525.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4 \cap A_5| = \binom{3}{2}^5 \times \binom{5}{2} = 2430.$

$\displaystyle T_5 = 2430.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 - T_3 + T_4 - T_5 \\= 4729725 - 4054050 + 1559250 - 340200 + 42525 - 2430 = 1934820.$$

Therefore,

$$f(6) = 1934820 \times \frac{(50!)}{(50 - 9)!} = 1934820 \times \frac{(50)!}{(41!)}. \tag{10} $$


$\underline{\text{Computation of } ~f(7):}$

$(7)$ pairings will be created.

$\displaystyle T_0 = \frac{\binom{15}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2} \times \binom{3}{2}}{7!} = 2027025.$
The denominator of $(7!)$ represents an overcounting adjustment that reflects that the product in the numerator causes each pairing to be counted $(7!)$ times.

$\displaystyle |A_1| = \frac{\binom{3}{2} \times \binom{13}{2} \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}\times \binom{3}{2}}{6!} = 405405.$

$\displaystyle T_1 = (5 \times 405405) = 2027025.$

$\displaystyle |A_1 \cap A_2| = \frac{\binom{3}{2}^2 \times \binom{11}{2} \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}\times \binom{3}{2}}{5!} = 93555.$

$\displaystyle T_2 = (10 \times 93555) = 935550.$

$\displaystyle |A_1 \cap A_2 \cap A_3| = \frac{\binom{3}{2}^3 \times \binom{9}{2} \times \binom{7}{2} \times \binom{5}{2}\times \binom{3}{2}}{4!} = 25515.$

$\displaystyle T_3 = (10 \times 25515) = 255150.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4| = \frac{\binom{3}{2}^4 \times \binom{7}{2} \times \binom{5}{2}\times \binom{3}{2}}{3!} = 8505.$

$\displaystyle T_4 = (5 \times 8505) = 42525.$

$\displaystyle |A_1 \cap A_2 \cap A_3 \cap A_4 \cap A_5| = \frac{\binom{3}{2}^5 \times \binom{5}{2}\times \binom{3}{2}}{2!} = 3645.$

$\displaystyle T_5 = 3645.$

Therefore, the number of acceptable pairings is

$$T_0 - T_1 + T_2 - T_3 + T_4 - T_5 \\= 2027025 - 2027025 + 935550 - 255150 + 42525 - 3645 \\= 719280.$$

Therefore,

$$f(7) = 719280 \times \frac{(50!)}{(50 - 8)!} = 719280 \times \frac{(50)!}{(42!)}. \tag{11} $$


$\underline{\text{Final Answer}}$

Using the results stored on (5) through (11) above:

$\displaystyle N = \sum_{k=1}^7 f(k) = $

$\displaystyle \left[90 \times \frac{(50)!}{(36!)}\right] + \left[3015 \times \frac{(50)!}{(37!)}\right] + \left[47580 \times \frac{(50)!}{(38!)}\right] $

$\displaystyle + \left[369360 \times \frac{(50)!}{(39!)}\right] + \left[1340712 \times \frac{(50)!}{(40!)}\right] + \left[1934820 \times \frac{(50)!}{(41!)}\right] $

$\displaystyle + \left[719280 \times \frac{(50)!}{(42!)}\right].$

$$Q = \frac{N \times (47!)^5}{(50!)^5}.$$

Probability of at least one occurrence of a character occurring $3$ or more times equals

$$1 - P - Q ~: P = \frac{50!}{35!} \times \left(\frac{47!}{50!}\right)^5.$$




Addendum
Clarifications added in response to the comment/questions of Jotak.

  1. Assuming that the methodology is accurate, I double-check/verfied the $\displaystyle f(6) = \left[1934820 \times \frac{(50)!}{(41!)}\right]$ computation that was reported in the $\underline{\text{Final Answer}}$ section. There was a typo in one of the displays of the $(1934820)$ computation in the $\underline{\text{Computation of } ~f(6)}$ section. I have corrected that typo.

  2. Normally, for a problem like this, since the analysis is so long and complicated, and since there are so many opportunities for a variety of mistakes, I would never post the final answer without first sanity-checking the work via software (e.g. my personal choice would be to write a Java program).

    In the present case, this would entail having the Java program cycle through the $\displaystyle \left[\frac{(50!)}{(47!)}\right]^5$ ways of acceptably assigning $(3)$ distinct elements from $\{1,2,\cdots,50\}$ to each of $\{(X_1,Y_1,Z_1), \cdots, (X_5,Y_5,Z_5)\}$. Unfortunately, I see no practical way of having the PC cycle through the $\approx 2.2 \times 10^{(25)}$ possible assignments.

    Therefore, all that I could do was proofread the methodology to see if it made sense.

  3. I like your approach of running $1$ million simulations as a verification. Personally, I have never done that, so it would take me some time to write the corresponding Java program to accomplish this.

    However, I share your skepticism of my final answer. I (also) expect that if my computation was accurate, that the large group of simulations would come much closer to my computation. As I see it, there are $3$ possibilities. [A] A randomly freakish large group of simulations (I don't buy that). [B] A subtle error in my computations. [C] A subtle error in your converting my computations to a percentage.

  4. Actually, in composing the answer, I spent over an hour being confused as to why alternative computations of (for example) $f(2)$ and $f(3)$ weren't matching the Inclusion-Exclusion computations. Then, my intuition expanded to explain the discrepancy. I was mismanaging the overcounting considerations.

    I think that the best way to expand your intuition to understand how the overcounting should be managed is with a diagram. Presented below is a visualization of the $f(6)$ computation of

    $\displaystyle |A_1 \cap A_2| = \frac{ \binom{3}{2}^2 \times {\color{Red}{\binom{11}{2}}} \times {\color{DodgerBlue}{\binom{9}{2}}} \times {\color{Maroon}{\binom{7}{2}}} \times {\color{Lime}{\binom{5}{2}}} }{4!} = 155925.$

    Note the attempt at color coordination between the factors in the numerator above, and the pairings in the diagram below. Neither of the two black pairings are vulnerable to overcounting, because the black pairings are each row specific. Further, each row has only $3$ elements in it. Therefore, once $2$ elements from the first row are paired, and once $2$ elements from the second row are paired, then it is impossible for any of the colored pairings to also be wholly contained in either row 1 or row 2.

    Further, the ${\color{Red}{red}}$, ${\color{DodgerBlue}{turquoise}}$, ${\color{Maroon}{maroon}}$, and ${\color{Lime}{lime}}$ pairings are each region-wide. Therefore, these $(4)$ colorful pairings, will be repeated $(4!)$ times, because that is how many ways that the $(4)$ region-wide pairings can be permuted.

\begin{array}{ c c c } \square & \blacksquare & \blacksquare \\ \blacksquare & \blacksquare & {\color{\Red}{\blacksquare}} \\ {\color{\Turquoise}{\blacksquare}} & {\color{\Turquoise}{\blacksquare}} & {\color{\Red}{\blacksquare}} \\ {\color{\Maroon}{\blacksquare}} & {\color{\Lime}{\blacksquare}} & \square \\ \square & {\color{\Maroon}{\blacksquare}} & {\color{\Lime}{\blacksquare}} \\ \end{array}

user2661923
  • 35,619
  • 3
  • 17
  • 39
  • Wow! I really appreciate the time, care, and thoughtful consideration you've put into this solution. You clearly went above and beyond in carefully explaining each step for my benefit. I appreciate it, as this took some time for me to read and understand, but it was presented just thoroughly enough for me to really intuit it. My nature is to always tend towards calculating the probability of nested conditional cases (similar to how gnasher commented a potential method), which would be significantly messier than the direct approach of total possibilities you demonstrated here. – Jotak Nov 14 '21 at 07:09
  • The piece that requires a bit of reading for me was the setup of the inclusion-exclusion principle applied to sets of violating k-pairings. I was maybe peripherally familiar with the principle but this really helped me to see a practical application of it and after a bit of thinking, I can see exactly how this covers the territory of violating cases precisely. The only thing I don't quite understand is, in the calculations of f(k), why exactly the denominator is needed to address over-counting. I'm going to go over this another day myself as an exercise. – Jotak Nov 14 '21 at 07:10
  • Also, in case you are interested, I ended up running some million simulations of this to check if the probabilities arrived at were accurate. Crunching the numbers in your final solution, the probability seems to be approximately 9.6%. The simulation unfortunately returned a probability of approximately 8.9%. Regarding the previous question - the probability that every number is distinct - the probability of 13.1% matched the simulated percent. – Jotak Nov 14 '21 at 07:10
  • I spent some time trying to see what might have been off, the only thing I found was that in the final solution, the 6th term of N, 19348200, was missing a zero. Unfortunately, that didn't sufficiently fix the discrepancy. Still, I don't doubt that conceptually this is right on the money. – Jotak Nov 14 '21 at 07:11
  • Sorry for the comment string, but just want to say thanks a ton for your effort again! I think I learned some math but also learned a lot about how to pose a question and present an answer. Your work was so neat and readable, textbook-level! Cheers, sir/maam! – Jotak Nov 14 '21 at 07:11
  • @Jotak See the Addendum that I just added to the end of my answer. – user2661923 Nov 14 '21 at 13:55
1

First, you consider the probability of the number $1$ appearing three or more times. You can then multiply this probability by $50$. In any 3-ball draw, the probability of $1$ appearing is $p=\frac{3}{50}$. Now you want three or more of the $5$ draws to have $1$. This is the survival function of the Binomial distribution with $n=5$ and $p$.


EDIT: As pointed out in the comments, this answer is wrong since it assumes we can multiply by $50$, which is not the case. Leaving it in as a cautionary tale.

Rohit Pandey
  • 6,803
  • 4
    Warning: danger. Situation not that simple, because you can have more than one triplet (i.e. the #1 and the #2 can both be tripled). Your approach specifically requires Inclusion-Exclusion. Typically, in problems like this, the other two viable approaches are recursion, or the direct approach. Personally, at a glance, it is tough to decide which of the $3$ approaches will be easiest. I suspect that recursion would be the worst. – user2661923 Nov 13 '21 at 02:11
  • @user2661923 Thanks for the clarification, I had also considered the method suggested by Rohit but realized that, while you could find the probability of a single number appearing three or more times, you couldn't extend it past that since they are not independent events. If we suppose that #1 does not appear as a triplet, that affects the probability that #2 will. – Jotak Nov 13 '21 at 02:39
  • After the first draw, you have three different numbers.

    After the second draw, you can have three, two, one or no pair. Calculate the probability for each.

    After the third draw, you have at least one triple, or four to zero pairs. Calculate the probability for each.

    After the fourth draw, you have at least a triple, or six to zero pairs. After the fifth draw, you have at least a triple, or you don’t.

    All the calculations are quite simple, just lengthy. Now if you have ten balls and draw six balls 500 times and want 10 equal numbers you better write a computer program.

    – gnasher729 Nov 13 '21 at 21:07