# Choosing two numbers uniformly

1. Jul 1, 2013

### E'lir Kramer

This is a solved problem and I am having a hard time working through the answer.

Question . Choose two numbers uniformly but without replacement in {0,1,...,10}. What is the probability that the sum is less than or equal to 10 given that the smallest is less than or equal to 5?

Draw a picture of $$\Omega = \left\{ 0,1,...,10 \right\}^{2}\; \backslash \;\left\{(i,i) | i = 0,1,...,10 \right\}$$

Comment. This is easy. (Once I figured out that \ means "complement", as opposed to the last author who was using -). It's a 11x11 grid of dots with the bottom-left to top-right diagonal removed. This immediately tells me, for instance, that $|\Omega| = 11*11 - 11 = 110$.

The outcomes in $\Omega$ all have the same probability. Let also

$$A = \left\{ \omega \;|\; \omega_{1} \neq \omega_{2}, \omega_{1} + \omega_{2} \leq 10 \right\} \quad B = \left\{\omega \;|\; \omega_{1} \neq \omega_{2}, \min\left\{\omega_{1}, \omega_{2}\right\} \leq 5 \right\}$$

The probability we are looking for is $\frac{|A \cap B|}{|B|} = \frac{|A|}{|B|}$.

Starting to get confused here. It looks like the authors are getting the left side of this equation from the definition of conditional probability; $P([A|B]) = P(A \cap B)/P(B)$, and it just so happens that A is fully within B, so $P(A \cap B) = P(A)$. However, in this author's usage, |X| means "the cardinality of X", and $P(B) \neq |B|$. However, this kind of makes sense, in a way. Since we are given that the result is in B, B can take the role of the sample space, and the number of ways to achieve the result divided by the size of the sample space does yield the probability we want. So, I'm going to accept this.

Your picture shows that $|A| = 10 + 9 + 8 + ... + 1 = 55$....

I don't know about the picture showing this, but reasoning does show this: if $\omega_{1} = 0$, there are 10 ways to be in A. If $\omega_{1} = 1$, 9 ways. This logic extends to the given formula .

...and that $|B| = 10x5 + 4x5 = 70$.

What? I'm completely stopped here. My picture doesn't show that. If I draw a vertical line at (5,0) and a horizontal line at (0,5), then dots in the top right quadrant are the only ones not in $B$, i.e., they are $B^{c}$. By manually counting I get 20 dots in $B^{c}$, and $|B| = |\Omega| - |B^{c}| = 90$.

Moreover, reasoning confirms this. $B^{c} = |\left\{6,7,...,10\right\}^{2}| - |\left\{(6,6), (7,7),...,(10,10)\right\}|$.

2. Jul 1, 2013

### Staff: Mentor

I get the same solution as you.

One more way to see it (with a sloppy notation, but I think it should be clear):
B is (0,anything) and (1,anything) and ... and (5,anything) and (6 to 10,0) and (6 to 10,1) and ... (6 to 10,5)
In total, 6*10+5*6=90 elements.

3. Jul 1, 2013

### E'lir Kramer

Ohh, thanks. I see his thought process now in his answer. Anyway, we are right, and I just confirmed that in Haskell. So I'll email him with the revision.

Prelude> length [ (i,j) | i <- [0..10], j <- [0..10], i /= j, (i <= 5 || j <= 5)]
90

4. Jul 1, 2013

### E'lir Kramer

Funny story, but |A| is 60, not 55.

Proof by enumeration:

Prelude> length [ (i,j) | i <- [0..10], j <- [0..10], i /= j, (i + j) <= 10]
60
Prelude> *[ (i,j) | i <- [0..10], j <- [0..10], i /= j, (i + j) <= 10]
[(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(0,7),(0,8),(0,9),(0,10),(1,0),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(2,0),(2,1),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(3,0),(3,1),(3,2),(3,4),(3,5),(3,6),(3,7),(4,0),(4,1),(4,2),(4,3),(4,5),(4,6),(5,0),(5,1),(5,2),(5,3),(5,4),(6,0),(6,1),(6,2),(6,3),(6,4),(7,0),(7,1),(7,2),(7,3),(8,0),(8,1),(8,2),(9,0),(9,1),(10,0)]

The 10 + 9 + 8 + ... + 1 breaks down because when w1 ≥ 6, we don't have to subtract the pairs (6,6) ... (10,10) from our count. They are already subtracted out by virtue of being >10 anyway. Final answer is 60/90 = 2/3

Last edited: Jul 1, 2013
5. Jul 1, 2013

### Staff: Mentor

Ah, good catch.