Chapter 1.2 Exercise 6

A die is loaded in such a way that the probability of each face turning up is proportional to the number of dots on that face. (For example, a six is three times as probable as a two.) What is the probability of getting an even number in one throw?

If we set \(P(1)\) equal to \(\frac{1}{n}\) then the probabilities of each possible outcome are:

\[ m(1) = \frac{1}{n} \\ m(2) = \frac{2}{n} \\ m(3) = \frac{3}{n} \\ m(4) = \frac{4}{n} \\ m(5) = \frac{5}{n} \\ m(6) = \frac{6}{n} \\ \]

Since:

\[ m(1) + m(2) + m(3) + m(4) + m(5) + m(6) = 1 \]

Then:

\[ \frac{1}{n} + \frac{2}{n} + \frac{3}{n} + \frac{4}{n} + \frac{5}{n} + \frac{6}{n} = 1 \]

Solving for \(n\) we get:

\[ \begin{align} \frac{1+2+3+4+5+6}{n} &= 1 \\ n &= 21 \end{align} \]

So the probability of each possible outcome is:

\[ m(1) = \frac{1}{21} \\ m(2) = \frac{2}{21} \\ m(3) = \frac{3}{21} \\ m(4) = \frac{4}{21} \\ m(5) = \frac{5}{21} \\ m(6) = \frac{6}{21} \\ \]

If \(E\) is the event that the result of a roll is an even numbner, then:

\[ E = \{2, 4, 6\} \]

The probability of getting an even number in one throw therefore would be:

\[ \begin{align} P(E) &= m(2) + m(4) + m(6) \\ P(E) &= \frac{2}{21} + \frac{4}{21} + \frac{6}{21} \\ P(E) &= \frac{12}{21} \\ P(E) &= \frac{4}{7} \end{align} \]

Let’s simulate this in R

If we simulate a small number or throws there can be a large discrepancy between what we would expect and what we get:

set.seed(150)
throws <- sample(1:6, 50, replace=TRUE, prob=c(1,2,3,4,5,6)/21 )
counts = table(throws)
counts
## throws
##  1  2  3  4  5  6 
##  3  4  6  9 15 13
p_expect = 4/7
p_expect
## [1] 0.5714286
p_even = sum(counts[c(2,4,6)])/50
p_even
## [1] 0.52

But if we increase the sample size to a very a large number (in this example we set it to 100,000) we get a result that is almost exactly what we would expect…

set.seed(150)
throws <- sample(1:6, 100000, replace=TRUE, prob=c(1,2,3,4,5,6)/21 )
counts = table(throws)
counts
## throws
##     1     2     3     4     5     6 
##  4804  9603 14221 19038 23601 28733
p_expect = 4/7
p_expect
## [1] 0.5714286
p_even = sum(counts[c(2,4,6)])/100000
p_even
## [1] 0.57374