We pick $3$ numbers (one by one) from set $\{0,1,...,100\}$. What is probabilty that two numbers are the same if sum of those $3$ numbers is $100$?

My solution: Which two are the same we can pick in $\binom {3}{2}$ ways. Suggest $x_2=x_3$- we need to find compositon $x_1+x_2+x_2=100 \implies x_1+2x_2=100$ which implies that $x_1$ is even so we can divide this by $2$. Now we get $y_1+y_2=50$ , and using formula there are $$\binom{50+2-1}{2-1}=51$$ compositions. So, probability is $$\frac{51*3}{\binom{100+3-1}{3-1}}$$

Is this right answer?

P.S.$\binom{100+3-1}{3-1}$ is number of compositions of 100 into 3 parts (allowing $0$)

  • 1
    $\begingroup$ $101^3$ is certainly the wrong denominator, as it ignores the condition that the three numbers sum to $100$. $\endgroup$ – Gerry Myerson Aug 9 '13 at 11:40
  • $\begingroup$ I think it's not wrong since sample space is just choosing 3 numbers from given set. $\endgroup$ – Meow Aug 9 '13 at 11:55
  • 2
    $\begingroup$ No, that's not the sample space, not once you add the condition about the sum being 100. Look, try the same problem with 100 replaced by 6. $\endgroup$ – Gerry Myerson Aug 9 '13 at 11:57
  • $\begingroup$ You are right :P my bad $\endgroup$ – Meow Aug 9 '13 at 12:02

First, we count the triples $(a,b,c)$ such that $a + b + c = 100$. For the choice of $a,b$ we need $a + b \leq 100$. Then $c = 100 - a - b$ is uniquely determined. For $a + b \leq 100$, the number of possibilities is $$101 + 100 + 99 + \ldots + 2 + 1 = \frac{102\cdot 101}{2} = 5151.$$

Now we count the triples with the additional condition that two numbers are the same. Note that $a = b = c$ is not possible (otherwise, $100 = a + b + c = 3a$ would be a multiple of $3$). So there are $3$ possibilities to choose the identical pair of numbers. For a single such choice, say $a = b$, we have the $51$ possibilities $a\in\{0,\ldots,50\}$ s.t. $a + b = 2a \leq 100$. Again, $c$ is uniquely determined. So in total, there are $3 \cdot 51 = 153$ triples $(a,b,c)$ such that two numbers are the same and $a + b + c = 100$.

This gives the resulting probability of $$\frac{153}{5151} = \frac{3}{101} \approx 3.0\%. $$

  • $\begingroup$ "For a+b≤100, the number of possibilities is 100+99+98+…+2+1=50⋅101=5050". That should be 5151 rather than 5050 as a and b can take values zero? $\endgroup$ – Johannes Aug 9 '13 at 13:04
  • $\begingroup$ @Johannes. Right, it's corrected now. Thanks! $\endgroup$ – azimut Aug 9 '13 at 13:06
  • 1
    $\begingroup$ Isn't 3*51 153? (FWIW, a brute force calculation I just did gave 153/5151.) $\endgroup$ – DSM Aug 9 '13 at 13:10
  • 2
    $\begingroup$ $153/5151=3/101$. If the final form of the answer is that simple, there must be a simpler way of getting it. $\endgroup$ – Gerry Myerson Aug 9 '13 at 13:11
  • $\begingroup$ @DSM: Well, of course it is. Thanks! $\endgroup$ – azimut Aug 9 '13 at 13:13

Picking three numbers from the set $\{0,1,2,...,6N-2\}$. What is probability that two numbers are the same given the sum of those three numbers is $6N-2$?

Firstly, the number of triplets adding up to $6N-2$ is given by the triangular number $3N(6N-1)$. Out of these, the $3N$ triplets $(0,0,6N-2), (1,1,6N-4), .. , (3N-1,3N-1,0)$ and their permutations contain two equal numbers. So we have $9N$ triplets out of $3N(6N-1)$ triplets that have two identical numbers. The probability sought is $3/(6N-1)$. For N=17 we recover OP's question.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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