Update:
I made a boo-boo. That was only the probability that the attacker wins without any damage. The real probability is what the chance of win is with ANY amount of damage, as such, here is the formula:
p(attacker wins)~b(h(D);rolls, p) where p = attackVal/defenseVal+attackVal, h(d) = hitpoints of defender and h(a) = hitpoints of attacker.
=(rolls!/hitpoints_of_defender!(rolls-h(D))!)*
((p)^h(D))*((1-p)^(rolls-h(D)))
where rolls is a function of h(D), h(A), and p such that:
Sum of series(Sigma, for those of you who have taken high school math) with min rolls = x as the lower parameter and max rolls as a higher parameter, and the equation p(x)*((x!/hitpoints_of_defender!(x-h(D))!)*
((p)^h(D))*((1-p)^(x-h(D)))).
This is the same as replacing rolls with the expected (mean) value of rolls. This we will call r. So...
r=Sigma(x=min Rolls, max Rolls, (x*p(x)))
min Rolls = lowest hp of the two units
max Rolls = (h(A)+h(D))-1
p(x)=p(of a roll)~b((x;(Max Rolls, p)
For those of you not learned in stats this means that if the defender is higher:
p(x)=((Max Rolls)!/x!((Max Rolls)-x)!))*(p^(x))*((1-p)^(Max Rolls-x))
Plug all the answers and variables in and you have your probability. BTW, the chance that modernarmor loses to an elite spearmen, as you have seen, is much lower then you all seem to think. Expected rolls is only about 5.312, and the chance to win is around 0.03. (3%)
I made a boo-boo. That was only the probability that the attacker wins without any damage. The real probability is what the chance of win is with ANY amount of damage, as such, here is the formula:
p(attacker wins)~b(h(D);rolls, p) where p = attackVal/defenseVal+attackVal, h(d) = hitpoints of defender and h(a) = hitpoints of attacker.
=(rolls!/hitpoints_of_defender!(rolls-h(D))!)*
((p)^h(D))*((1-p)^(rolls-h(D)))
where rolls is a function of h(D), h(A), and p such that:
Sum of series(Sigma, for those of you who have taken high school math) with min rolls = x as the lower parameter and max rolls as a higher parameter, and the equation p(x)*((x!/hitpoints_of_defender!(x-h(D))!)*
((p)^h(D))*((1-p)^(x-h(D)))).
This is the same as replacing rolls with the expected (mean) value of rolls. This we will call r. So...
r=Sigma(x=min Rolls, max Rolls, (x*p(x)))
min Rolls = lowest hp of the two units
max Rolls = (h(A)+h(D))-1
p(x)=p(of a roll)~b((x;(Max Rolls, p)
For those of you not learned in stats this means that if the defender is higher:
p(x)=((Max Rolls)!/x!((Max Rolls)-x)!))*(p^(x))*((1-p)^(Max Rolls-x))
Plug all the answers and variables in and you have your probability. BTW, the chance that modernarmor loses to an elite spearmen, as you have seen, is much lower then you all seem to think. Expected rolls is only about 5.312, and the chance to win is around 0.03. (3%)