Sunday, March 1, 2020

Expected Value and Variance of Platonic Solids

There are five Platonic solids:

  1. Tetrahedron = 4 sides
  2. Cube = 6 sides
  3. Octahedron = 8 sides
  4. Dodecahedron = 12 sides
  5. Isocahedron = 20 sides


The expected value of a distribution is the sum of the products of the value times and their respective probabilities.  For example, a cube's expected value is 3.5:

E[cube] = 1 * 1/6 + 2 * 1/6 + 3 * 1/6 + 4 * 1/6 + 5 * 1/6 + 6* 1/6 = 3.5

The variance of a distribution is the difference between the expected value of the square values and the square of the expected value:

var(cube) = 1 * 1/6 + 4 * 1/6 + 9 * 1/6 + 16 * 1/6 + 25 * 1/6 + 36 * 1/6  - (3.5 * 3.5) = 2.9167

----

Suppose you rolled five dice, each one a different Platonic solid, and each one sequentially numbered starting from the number one.  For example, the tetrahedron's faces would be numbered 1 through 4; the cube numbered from 1 to 6, etc.

If you rolled the lowest number of each die, then the total would 5.  So the minimum of the distribution is 5.  If you rolled the maximum number on each die the total would be 50 (i.e., 4+6+8+12+20).

There are 46,080 (4*6*8*12*20) combinations, so calculating the expected value and variance of these solids is not particularly trivial.  Using R and RStudio I developed a series of loops to iterate through all the combinations and tall the number of times a 5 was rolled, a 6 was rolled, etc., and use
d that data to calculate the expected value and variance.

The expected value of the Platonic Solids is 27.5

The variance of the Platonic solids is 54.58333

The standard deviation of the Platonic solids is 7.38805

The following table shows the frequency and probability of rolling each number: