Mathhammer - The guide for the gifted and mathematically challenged alike

Warhammer is a game of dice. In general, mathhammer aims to predict the dice. Its fault is its failure to take any amount of "luck" into account.

Lets begin with the basics. Flip a coin. Did it come up heads? A coin that can only come up heads or tails has 50% chance of coming up heads. Were you lucky?

Ok now flip two coins. I bet you got one heads and one tails, or two heads, or two tails. Not much of a bet is it? The fact is, all of these outcomes are possible, and all these outcomes are the only possible outcomes.

If you were asked to predict the flip of two coins what would you say?

Each outcome has a probability. You could predict that the flip will be one heads and one tails, but this only has a 50% chance of happening.

When we roll dice, you can try to predict the outcome just that same. If you have 4 BS3 markerlights, the prediction will be 2 markerlight hits. But just as with the coin flip, the prediction might not come true. And in fact, in this case, it will probably be something other than 2 hits.

In general, when trying to predict the number of successes in a dice roll, you multiply the probability of success of a single die by the number of dice.

I am told that the more formulas I write in this article the less popular it will be, but I hope if I keep them simple then it won't be too bad.

Predicted # Success = P(success) * # dice

This is not the whole picture. This formula does not take luck into account.

Probability mathhammer is able to model luck

Any number of shots are distributed randomly. Here's how to get the probability distribution:

P(# success) = p^r * (1-p)^(n-r) * nCr

P(# success) => The probability of getting that exact number of successes

p = P(success) => The probability of success for a single die

n = # dice => The total number of dice you roll

r = # success => The exact number of successes

nCr is the binomial coefficient, you will find it on your calculator. Hit n (4 for example), then the nCr button, then r (2 for example).

Ok back to basics for a moment. The chance of rolling a 5 is 1/6, and the chance of rolling a 6 is 1/6. You can add these probabilites to get the chance of rolling a 5 or a 6, 1/6 + 1/6 = 1/3.

You can also add the probabilities in the distribution. The chance of 2+ markerlight hits is: 0.375 + 0.25 + 0.0625 = 0.6875.

Vehicles

Vehicles can only die once. The mistake people make when calculating the probability of killing a vehicle is to double count the probability of killing it twice. This is how to get the probability to destroy a vehicle:

1 - {1 - [P(success)]}^# dice

For example: Two deathrains shoot at an open topped AV10 skimmer that's moved fast.

Lets not forget that we also have the chance of stopping the vehicle from shooting. It will be useful to know how to work out the probability of doing nothing to a vehicle.

P(nothing) = [1 - P(success)]^# shots = [1 - 8/9*2/3]^4 = 0.0275

Dumbing it down

All that stuff can get quite confusing for the average person. It can get very frustrating for both the mathhammer and non mathhammer parties when discussing the effectiveness of units. It is often the mathhammer parties that are at fault. They use simplified models that are easy to understand, but are not very good. Experience counts for more than how many space marines you will statistically kill.

One concept that is particularly hard to grasp is turning shots at a unit into probabilities. Lets use an example. 5 Space Marines with bolters shoot at a unit of Chaos Space Marines. You pick up 5 dice, and roll to hit. You pick up the hits, then roll to wound. Finally for each wound the Chaos player rolls an armour save.

Unfortunately that was the easy part. Ok to get the actual chance of a single bolter killing a Chaos Space Marine, you multiply the probability of each event together.

P(success) = P(hit) * P(wound) * P(failed save)

If we try to predict the number of dead space marines using the very first formula in this article, we get 5/9. Cleary, we cannot kill 5/9 marines. Clearly 5/9 is misleading when the Chaos player fails 3 saves! This is the flaw of regular mathhammer. This is the beauty of probability mathhammer.

Instead of rolling the dice three times, it is equally valid to roll one dice. In this case it would have to be a D9. Roll 5 D9's and all 9+'s will cause casualties. This has the same distribution as doing it normally.

Ok now imagine a D1000000, a one million sided dice. You could instead of rolling the 5 D9's, roll one D one million. If it is 999983+, you kill 5 marines. If it is between 999324 and 999983, you kill 4 marines. Similarly, divide the D one million into 6 total sections each representing the probability for each number of kills. If you roll less than 555000, you get zero kills.

This is exactly the same as rolling 5 dice, picking up hits, rolling the hits, picking up wounds, then for each wound the Chaos player rolls armour saves, and each failed save a Chaos Marine is removed as a casualty.

In this way, it is much easier to turn the shots into probabilities. You're just rolling one very large dice (physically impossibly large). Just like you have a 1/6 chance to roll a 6+, you have a 445000/1000000 chance to roll a 555000+ (and thus kill at least one marine).

Conclusion

I understand that no matter what I do, some people just won't get it. Some people will still not see the benefit of probability mathhammer.

What I am doing is not regular mathhammer. It is different. I often feel as though everyone is like "mathhammer does not take luck into account". This does take luck into account.

Clearly if this was mathhammer that is a contradiction, and unless you're not good at maths or English you understand how silly that stance is.

Either mathhammer can take luck into account (in which case, if it does, it's clearly better), or this is not mathhammer. It cannot be both.

As they say, single, attractive, mentally stable. Chose two.

Last edited by onlainari on Aug 21 2007 04:56, edited 10 times in total.

A good article and I think that articles like this would go a long way to address some issues that ocurr with some players approach to the mathematical side of the game. Unfortunately, (not being able to remember back to high school maths - although this did jog my memory a bit) I can't think of anything to add although there is probably some clarification or expansion.

for more info on what onlainari is getting at, wiki "variance". basically, most mathhammer concentrates on averages and ignores variance, which is variation around the average. higher variance means more fluctuations: ie, a weapon that guarantees exactly 2 kills every turn has the exact average kill rate as a weapon which kills exactly 0 or 4 kills per turn, but the 2 guaranteed kills has a lower variance, and is thus more "reliable" (to refer to the CIB thread that's come up recently).

weapons like the plasma rifle have fairly low variance. weapons like the CIB may over, say, 30 turns, kill the same number of marines, but on any given turn, may kill anywhere from 0 to 5.

If you NEED a target to die, you want to look for a weapon with low variance. If you don't really care, and plan on simply taking pot shots over the course of a game, variance is less of an issue (though obviously still an issue).

Onlainari, in calculating the probability of each possibility, showed you a distribution of the likelihood of each occurance actually happening (wiki "binomial distribution" and "normal distribution"). Distributions with a low variance will have a "bell curve" that is very high, very concentrated around the middle, meaning outlying events do not happen very often. Distros with high variance will be flatter, meaning events outside of the average will occur quite frequently.

btw, if you think wiki isn't reliable enough, there's a very simple solution: take a course in statistics.

It gets very frustrating for both the mathhammer and non mathhammer parties when discussing the effectiveness of units.

The reason for this is the fault of the mathshammer parties. Their maths is not up to scratch. Experience counts way more than how many marines your mathhammer guys says you can kill.

If however people evolved their mathshammer into probabilities then there's a very simple way to win the argument.

<<<

<mathsguy> Ok ok, you don't like mathshammer, but can you at least agree that the chance of rolling a 6 is 1/6, and the chance of flipping heads on a coin is 1/2?

<nomaths> Sure I guess.

<mathsguy> Ok well what I've got here is just like that. I'm not telling you the usual maths, I'm telling you the actual chance of this event occurring. Just like there is 1/6 chance to roll a 6, you have a 0.0494 chance of killing a falcon with that lascannon. Same logic applies to both. And the chance of an autocannon killing a falcon is 0.0487.

>>>

So when arguing what's better for shooting a falcon, an autocannon, or a lascannon, no matter what the nomaths guy says, he's dead wrong. He's trying to prove that rolling a 4+ is easier than rolling a 3+.

Mathhammer guy: Would you agree that the chance of a terminator failing an armor save is around 16%?

Texan: Nope. It's exactly 50%.

Mathhammer guy: 50? Five-oh? Where are you getting your data?

Texan: Either he makes it or he doesn't.

This logic, while a bit rustic has gotten me through all manner of tight spots. The overwhelming majority of armies I play against are space marines, therefore, they will almost always get their armor save. If I get an average of one dead marine per warfish I send to kill it, and I know it will take around 100 pulse shots to kill 5 terminators, I can usually eyeball my chances from there.

However, I have to get my army there first, which is where mathhammer fails. Mathhammer can only look at ideal circumstances from the most clincal perspective. One of the really neat things about 40k, and the Tau army specifically, is their propensity for beating the odds or failing them spectacularly. Variance is extremely high in the tau army simply because of the lack of low AP weapons. If you can't use precision engagement to kill your target, you have to use dominant maneuver and weight of fire to do the job.

but honestly very useful as with non MEQ armies you really need to know the odds of an attack being sucessful before you assign troops to the attack. Sending a single crisis suit against a block of 50 IG conscripts is a waste of resources that can be used elsewhere. Instead math would dictate using a HH w/ a rail to blast chunks out of them or call in that barracuda strike....

But that really doesn't explain the calculus done in the tread's original e-mail. I get the notion of a calculation error on part of onlainari. Therefore I would really, really like to see the example of 4 markerlight roll and 2 successes spelled out digit by digit because my calculator and a web gives a different result.