# Expected Value of 1/X

• Oct 5th 2012, 02:19 PM
MCXD
Expected Value of 1/X
Hey there. I've been messing around with some of the statistics involved with dice rolls, particularly in the context of tabletop roleplaying games, but I've come to a snag. Mainly due to my incredibly shaky knowledge of statistics.

An elementary method which players of a game use to 'guess' how many attacks it will take to defeat an enemy is to take the expected value of the dice roll involved with calculating damage and dividing that by the total HP (health/stamina) of the enemy. For example, if the monster has 20 HP and the weapon deals an average of '5' damage (like in the case of 2*4-sided dice), a decent guess for how many attacks it will take to defeat the enemy on average is 20/5 = 4.

But it doesn't work out this way in practice. Because the enemy HP is divided by the random variable (damage), then low values for damage will affect the final result more than high values for damage. The true average number of hits required involves a more sophisticated calculation. One which I can't seem to figure out.

So the question is, if X is a discrete random variable representing the sum of the face values when rolling m number of n-sided dice, then what is the expected value of $\displaystyle \frac{h}{X}$, where h is any positive integer (the HP of the enemy, in this case), in terms of m, n and h?

(If nessecary, $\displaystyle E(X) = \frac{m(n + 1)}{2}$)
• Oct 5th 2012, 02:34 PM
MathTutor2013
Re: Expected Value of 1/X
Hi,

Do you still need help with this question ?

Thanks
• Oct 5th 2012, 02:39 PM
MCXD
Re: Expected Value of 1/X
Yes, I do. :V
• Oct 5th 2012, 02:49 PM
MathTutor2013
Re: Expected Value of 1/X
I will think about it, it is a nice question

The problem is that you canīt do E(h/X) = h/E(X) , i will post an answer tomorrow (if i have it)
• Oct 5th 2012, 08:08 PM
MathTutor2013
Re: Expected Value of 1/X
Hi again, i did the problem for m=2 and n = 4 (2 dices with 4 sides)

E(h/X) = hE(1/X) = h(0.226711)

Let me know.....

If i find a generic formula i will let you know

Steve
• Oct 6th 2012, 03:03 PM
MathTutor2013
Re: Expected Value of 1/X
I found a generic formula for 2 dices (2 dices, n-sided)

Let me know if that is useful....