# Trying to balance my boardgame, need to figure out expected value for dice throws?

Alright, so I'm trying to figure out the expected value of dice throws in a game I'm making, because I would like for the options the player has to be statistically balanced.

A person, for their special attack, can roll four dice. However, if their opponent's special defense is in the same slot, they can remove the highest three of those dice, and I would like to know the expected value of this action: removing the three highest dice from four. (I need this for the rest of my balancing).

I saw this: The expected payoff of a dice game

But don't think they necessarily apply here, or I can't figure out how to make them apply to this problem.

I knocked up a simply python simulation that does this for me, and got a mean of 1.755 over a hundred million trials, but I like statistics, and would like to know why this is the result.

import random
import statistics

def Rand(start, end, num):
res = []
for j in range(num):
res.append(random.randint(start, end))
return res

all_list = []

for i in range(100000000):
take = Rand(1,6,4)
take.sort()
all_list.append(take[0])

print(statistics.mean(all_list))

• $(1\times6+(2^4-1^4)\times5+(3^4-2^4)\times4+(4^4-3^4)\times3+(5^4-4^4)\times2+(6^4-5^4)\times1)/6^4 \approx 1.755$. – Hw Chu May 7 at 16:04
• @HwChu Please post that as an answer, with at least a brief explanation of the reasoning. – Ethan Bolker May 7 at 16:07
• To see why, for instance, the possibility that you get a 3 is when the least of the four dices is exactly 3. The number of combinations that all four dices are at least 3 is $4^4$, while the number of combinations that all four dices are at least 4 (which you shall exclude) is $3^4$, so the probability that the least dice is 3 is $(4^4-3^4)/6^4$. – Hw Chu May 7 at 16:12
• Ah okay, thank you. I thought it would probably have something to do with enumerating all the possible states, but didn't think to do it this way. – CapnShanty May 7 at 16:41
• – amd May 7 at 23:58