5

Repeatedly rolling a six sided die four times and summing the highest three results gives you a distribution with what mean and standard deviation?

I've only taken AP statistics, but I would like to learn how to do this.

  • 2
    If you roll a die four times, do you know how to find the distribution of the minimum value? Even if you're unsure of how to do that, can you see how you might use that information to solve your problem? – cardinal Jun 16 '12 at 16:37
  • 1
    For the record--to help those who would like to check their solutions--the mean is $15869/1296 \approx 12.2446$ and the SD is $\sqrt{13612487}/1296 \approx 2.84684$. – whuber Jun 16 '12 at 19:15
  • 2
    Did you do that in your head whuber? – Macro Jun 17 '12 at 01:09
  • @Macro: (+1) While that is much more plausible in whuber's case than in most others, this problem is easily approachable by brute force and can be checked in 3-4 lines of $R$ code. – cardinal Jun 17 '12 at 04:21
  • Highly relevant to this question is the thread on a Formula for dropping dice. – whuber Apr 07 '22 at 13:07

2 Answers2

3

(D&D player?) It's easy enough to just enumerate the whole distribution. In R:

> a1 <- rep(1:6,times=216)
> a2 <- rep(1:6,times=36,each=6)
> a3 <- rep(1:6,times=6,each=36)
> a4 <- rep(1:6,each=216)
> tot <- a1+a2+a3+a4-pmin(a1,a2,a3,a4)

That's all it takes (there's a bunch of other ways to do it). Results:

> mean(tot)
[1] 12.2446
> n <- length(tot)
> sd(tot)*sqrt((n-1)/n)  # we have the whole distribution; we want n-denominator, not n-1
[1] 2.846844
> quantile(tot)
  0%  25%  50%  75% 100% 
   3   10   12   14   18 
> table(tot)  #frequencies
tot
  3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18 
  1   4  10  21  38  62  91 122 148 167 172 160 131  94  54  21 
> print(table(tot)/sum(table(tot))*100,d=2)  # as percentages
tot
     3      4      5      6      7      8      9     10     11     12     13 
 0.077  0.309  0.772  1.620  2.932  4.784  7.022  9.414 11.420 12.886 13.272 
    14     15     16     17     18 
12.346 10.108  7.253  4.167  1.620 
Glen_b
  • 282,281
  • (+1) This doesn't give much in the way of probabilistic insight, but it is the fastest and safest method for small problems like this. Note that you can use expand.grid to replace the first four lines of your code. – cardinal Jun 17 '12 at 13:25
  • @cardinal - indeed, I contemplated using expand.grid – Glen_b Jun 18 '12 at 04:08
  • 2
    (+1) Along the lines of @cardinal's suggestion, p <- tabulate(apply(gtools::permutations(6,4, repeats.allowed=TRUE), 1, FUN=function(x) sum(sort(x)[-1]))) / 6^4 yields the probability distribution all at once. – whuber Jun 19 '12 at 00:38
1

Each roll has a uniform distribution on $\{1, 2, 3, 4, 5, 6 \}$ and to get the distribution for the minimum you can use $P[m>k] = {\rm probability \ that \ all \ four \ rolls \ are \ } >k$ and by independence this is the probability that each roll is $\geq k$ raised to the fourth power where $m$ is the minimum of the 4 rolls. Now for each roll $P[X>k] =(6-k)/6 = 1 - k/6$ So $P[m>k] = (1-k/6)^4$ and therefore $P[m<=k]=1 - (1-k/6)^4$.

From this we get $P[m=k]=P[m \leq k]-P[m \leq k-1]$ - knowing that $m=k$ means that the smallest of the three in the sum you calculate is at least $k$.

Let $S$ be the sum of the three highest rolls. You want $P[S=k]$ for $k=3,...,18$. You can calculate this as $P[S=k]=∑_{j=1}^{6} P[S=k|m=j] P[m=j]$. Note that for a variety of $k$s and $j$s $P[S=k|m=j]=0$. For example $P[S=3|m=k]=0$ for $k=2,3,4,5,6$. Of course once you determine $P[S=k]$ for $3 \leq k \leq 18$ you can calculate the mean and variance.

Macro
  • 44,826