Let's assume I have a random number generator from 0-100 included (only integers) and I generate 5 numbers with it.
I want to know the probability of hitting 80, 80, 80, 80, 80 with the constraint that the average number be 80. In other words, the total "score" has to be 400 and given that, I want the probability of getting 80, 5 times in a row. (I guess assume that the generator's 5 draws will always total 400)
What I tried:
I understand that without the contraint, the probability would just be $\frac{1}{101^5}$, and I also understand that considering the constraint, I want to find all of the ways to make 400 total, and the probability will be 1 over that.
What I'm having trouble with is finding a good way to sum up all of the ways to make 400 without just counting them one by one.
I initially felt it would be trivial, but...it's looking pretty hard right now and I'm really not sure how to strategize.
Please don't just give me a result or formula without any explanations. It's for my own understanding, not homework or anything. Ideally I would like to get better at approaching how to solve these kinds of problems, so any insight into how to do that is greatly appreciated.
look up "stars and bars" - the number of whole number k-tuples which sum to n is given by $$N_{n,k} = \binom{n+k-1}{k-1}= \binom{n+k-1}{n}$$
Explanation: if you want the number of 3-tuples summing to 5 you count the strings consisting of 5 stars and 2 bars where the bars separate the different numbers.
for example
**|***|represents the 3-tuple $(2,3,0)$so you need the number of strings of 7 characters ( in general $n+k-1$ ) containing five stars and two bars, all you need to do is to choose what places to put the 2 bars and then fill the rest of the string with stars.
So the number of 3-tuples summing to 5 is $\binom 72$ and the number of 5-tuples summing to 400 is $\binom{400}{4}$