2
$\begingroup$

TL;DR: In a set of 35 randomly-selected numbers from 1-100, how likely is it that the same number will come up four times, at any point in the sequence (specific series not required)?

So, recently in the course of a roleplaying game, we had what seemed like a highly unlikely set of rolls, but I am not sure how likely or unlikely it actually was. I know how to work out the odds of a specific sequence of the same length as the number of tries (such as getting a specific four-digit number randomly), and I have found information on getting a specific consecutive sequence in a longer set of random selections, such as in this answer:

Coin toss: Probability of a run of certain length out of a longer sequence

But what we are curious about is this:

In a set of 35 randomly-selected numbers from 1-100, how likely is it that the same number will come up four times, at any point in those rolls? As in, we're not looking for consecutive rolls, just at all.

Apologies for the informal phrasing- I haven't studied probability in a formal setting, so I don't know the names for a lot of things.

$\endgroup$
6
  • 1
    $\begingroup$ Note that there are many posts on site that relate to the problems with defining the event of interest post hoc (i.e. with "hey, that's weird, what are the chances of that thing that happened?" type questions) $\endgroup$
    – Glen_b
    Commented Jan 20, 2020 at 9:37
  • 1
    $\begingroup$ See, for example, the discussion here. Also see the links in whubers answer here. $\endgroup$
    – Glen_b
    Commented Jan 20, 2020 at 9:45
  • 1
    $\begingroup$ The answer to the question (the 'at least four' version) is approximately 4%, but for an even specified post-hoc it's not really a correct calculation. $\endgroup$
    – Glen_b
    Commented Jan 20, 2020 at 9:55
  • 1
    $\begingroup$ In light of the important cautionary comments by @Glen_b, all you need is a rough approximation--an order of magnitude would be fine. In fact, because the chance of each number is small and relatively few numbers are selected, you may treat this multinomial calculation as a set of 100 independent binomial calculations. Because the chance of observing $4$ or larger for a Binomial$(35,1/100)$ variable is $0.0004087,$ the value will be (extremely) close to $1 - (1 - 0.0004087)^{100} = 0.0401.$ (That's off by less than 3 in the last digit; the true value is $0.0403\ldots.$) $\endgroup$
    – whuber
    Commented Jan 20, 2020 at 14:57
  • $\begingroup$ BTW, a method to obtain an exact answer is described at stats.stackexchange.com/questions/1308. It is illustrated with a calculation where $100$ is replaced by $365$ and $35$ by $23,$ showing it can handle problems of this size. $\endgroup$
    – whuber
    Commented Jan 20, 2020 at 15:40

1 Answer 1

2
$\begingroup$

Computing this in a strict manner using probabilities and combinatorics is quite hard, in particular because it entails some $n!$ with $n$ in the order of the hundreds, so not really handy calculations.

If you can settle for a Monte Carlo approximation of the probability over 1 million tries, it looks like it is around $0.04$, or $4\%$ like Glen said.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ For my purposes, a Monte Carlo approximation is entirely satisfactory, I just didn't know how to set up the math. Thanks! Combined with the comments above, I think this makes for a fairly useful outcome, so I am accepting this answer. $\endgroup$
    – Quinn
    Commented Jan 21, 2020 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.