# basic probability questions with respect to dice, potential textbook error, or is it over my head?

I'm going through Schumacker's Learning Statistics Using R. I've come across something that's not making too much sense to me, so I'm wondering if this is a mistake or if I'm just really thick.

On page 46, the textbook reads

If the dice are unbiased , 36 outcomes are possible (6 x 6). Each outcome (S) is a sum of the number on two dice. The probability of any sum, S, can be calculated by the formula: P(S) = (S/36). For example, P(3) = 1/12; the number of times two dice sum to 3 divided by the total number of outcomes, 36, which has a probability of .0833

Now there's my first problem. That formula doesn't seem right. There are only 2 possibilities of getting 3, rolling a 1 on the first die and a 2 on the second or rolling a 2 on the first die and a 1 on the second, which makes the probability 2/36 = 1/18 = .0556 NOT .0833. This is the bit where, I could be the thick one, because, to me, the formula seems faulty. It doesn't seem to be the sum, more like the count. .0833 would not work with 3, but it would work with 4, which has 3 combinations that would result in 4.

So that's one, but then I have an issue with the probabilities the text asks to input into R.

It gives the following

Probs = c(.0556,.0833,.1111,.1389,.1667,.1667,.1389,.1111,.0833,.0556,.0278)

This doesn't seem right at all. I'm not sure what the author is trying to say. Is he, maybe, showing something other than what I think he's trying to show? 2 and 12 should have the same probabilities; according to the text, rolling a 2 has a higher probability than 12. Also 7 should have the highest probability, given that there are 6 combinations that will yield 7, and there are only 5 combinations that result in a 6, so how can the probabilities of rolling a 6 and 7 be the same?

Shouldn't the probabilities read as the following instead

Probs = c(.0278,.0556,.0833,.1111,.1389,.1667,.1389,.1111,.0833,.0556,.0278)

This is bringing me a great deal of tension. Any and all help in explaining this to me, if I don't get it, will be greatly appreciated.

• You seem to be right and your approach is correct. In addition, the probabilities also don't sum to one which violates one of the axioms. – Toby May 20 '17 at 5:15
• You're right on both points. The first statement from the text P(S) = S/36 is plain wrong and rather bizarre! The 2nd mistake could be regarded as an annoying but trivial typo; it's obviously Probs = c(1,2,3,4,5,6,5,4,3,2,1) / 36 which comes to the numbers you wrote. – Matthew Gunn May 20 '17 at 7:23
• With two such fundamental / simple errors you have to wonder whether the author lacks knowledge or care. Neither bodes well for the rest of the book. – Glen_b May 20 '17 at 10:11

## 1 Answer

You are right, the probabilities are:

Probs = c(.0278,.0556,.0833,.1111,.1389,.1667,.1389,.1111,.0833,.0556,.0278)

In R you can experiment this by simulation, for example by repeating rolling dice one million times.

n = 1000000
die1 = sample(1:6,n,replace=T)
die2 = sample(1:6,n,replace=T)
sum_of_dice = die1 + die2
counts = table(sum_of_dice)
proba_empiric = counts/sum(counts)
barplot(proba_empiric)


Probability distribution (empirical) for the sum of two dice Formally, you have 2 random variables $X$ and $Y$ with: $$P(X=i) = 1/6; P(X=j)=1/6 \text{ for } 1 \leq i,j \leq 6.$$

For $k \in \lbrace 2, \ldots, 12 \rbrace$, we want to calculate $P(X+Y = k)$.

$$P(X+Y = k) = \sum_{i=1}^6 P(X+Y=k;X=i) = \sum_{i=1}^6 P(i+Y=k;X=i)= \sum_{i=1}^6 P(Y=k-i;X=i).$$

Since $X$ and $Y$ are independent, we have: $$P(X+Y = k)= \sum_{i=1}^6 P(Y=k-i)P(X=i).$$

But $P(X=i) = 1/6$ for all $i \in \lbrace 1, ... 6 \rbrace$, so $$P(X+Y = k)= \frac{1}{6} \sum_{i=1}^6 P(Y=k-i).$$

Now we have to but careful, since we know that $P(Y=k-i)=1/6$ only when $1 \leq k-i \leq 6$.

So we have two conditions to verify: $1 \leq i \leq 6$ and $1 \leq k-i \leq 6$.

For the second condition, this is the same as $-6 \leq i-k \leq -1$ i.e. $k-6 \leq i \leq k-1$.

By merging the two conditions, we obtain that $i$ should verify:

$max(1, k-6) \leq i \leq min(6, k-1)$.

The number of such $i$ is then:

$min(6, k-1) - max(1, k-6) + 1$.

On the whole, $$P(X+Y = k)= \frac{1}{6} \sum_{i=1}^6 P(Y=k-i) = \frac{1}{6} \left( min(6, k-1) - max(1, k-6) + 1 \right) \frac{1}{6} = \frac{min(6, k-1) - max(1, k-6) + 1}{36}.$$

One can show that the numerator is $1,2,3,4,5,6,5,4,3,2,1$ when $k$ moves from $2$ to $12$.

Here is the result on a plot. Probability distribution for the sum of two dice • an absolutely phenomenal response and prompt too. thank you one and all for looking into this for me. – Sameer May 20 '17 at 7:15
• I emailed Dr. Schumacker. and he responded quickly, acknowledging both errors. The first was already noted and included in the book page addendum, which I couldn't find. As for the second that wasn't noticed, but has been noted and will be included in this elusive addendum in the future as well. – Sameer May 21 '17 at 10:21