Welcome to Librarium Online!
Join our community of 80,000+ members and take part in the number one resource for Warhammer and Warhammer 40K discussion!
Registering gives you full access to take part in discussions, upload pictures, contact other members and search everything!
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 lets put this to the test with our 4 markerlight example.Thus there is a 0.375 probability of 2 hits.Code:# success - P(# success) 0 - 0.0625 1 - 0.25 2 - 0.375 3 - 0.25 4 - 0.0625
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.
Correct way to do it:
1 - {1 - [P(success)]}^# shots = 1 - {1 - [8/9*2/3*1/2]}^4 = 1 - [1- 8/27]^4 = 0.755
The mistake: Probability of killing the skimmer is not:
P(success) * # dice = (8/9*2/3*1/2) * 4 = 1.19 ~ this is wrong.
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.Code:# success - P(# success) 0 - 0.555 1 - 0.347 2 - 0.0867 3 - 0.0108 4 - 0.000677 5 - 0.0000169
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.
I really like this article... it takes me back to high school. This is the stuff the pros use, and by pros I mean the people who work out odds for casino/lottery games and the like.
BTW: I would pay really REALLY good money for a D1,000,000!
*commissions a D1,000,000 to be made from the moon*
CODEX: EldarNow with maximum pwnage!Record with Eldar this summer = 11W-1D-1L yay!
Good on you for accually spending your time doing this article. I know how you feel. Probability is underrated in mathhammer... It is often only the simple average people use. Rep to you for giving a rats ***, even tough I am not sure that people who won't already know about probability will get it.
Last edited by cebwj; August 20th, 2007 at 17:16.
-lurking in the shadows of LO.
Officially diagnosed by TekoreMelkhior, Necrarch Lord
what saddens me about this entire thing, is the REASON that math-hammer works.
The guys at GW use points values to reinforce army choices based on fluff, and then they run points by a "touch-feel" method. You can reinforce this just by trying ONCE to find the mathematical formula behind the points value of a Tactical Marine, and a Necron Warrior, or High Elf and Brettonian bowmen.
The result of this skewed method, is that instead of having 6guys who are twice as good at cc as their 12enemies are at shooting.
---
you can do the math to see if those 6 guys are worth their points.
My method for this is to add all factors i can think of. These include:
damage caused against T# opponents (shooting and cc)
chance of survival against S# hits (shooting and cc)
chance of flight
take the probability of FAVORABLE outcomes, and divide by the points cost of the model. This will give you just enough info to determine which model is going to be STATISTICALLY better. Remember though, this doesn't take into account manuevers, any pre-existing psychological effects etc. It will just tell you who is more likely to win in an out-and-out brawl.
I'm not a big fan of hits or casualties per point because I don't think it's a good idea. Deciding what is the most effective unit at killing marines will not win you games. Working out the firepower needed to kill all 40 marines your opponent fields is useless. Selecting units only on their ability to make their points back is a poor decision. You only need to lose less than the opponent and score more points on objectives.
I believe you need to take certain units into account when building your list.
These units are:
Space Marines
Falcons
TMCs
Guardsmen
In my experience these are the units that you need to be able take care of.
Land raiders, genestealers, and terminators are often added to this list but are not needed. Your list's ability to deal with these things should be a side effect, these units do not tend to dominate games where they are unkillable (especially the land raider).
You need to work out the probability distribution of your units when you shoot at those 4 units. For each of those 4 units, you need at least one unit that can handle the job.
All very well done and I congratulate you on showing how probabilities work, however again I have to repeat my oft quoted answer to these types of post, variables.
40K has a massive number of variables all of which could (if you had the time, inclination, mental capacity and lack of a satisfying social life) quantify, the die are only one of these many variables, granted its a very important influential variable but it is only one of them.
Variables can include amongst many others:
Scenario
Who goes first
deployment of units
Infiltrate (will they, wont they?)
Terrain
Cover (not always the same thing as terrain)
Line of sight
Randomised game occurrences like deep strike
Tactics (obviously a whole can of worms in itself)
estimation capacity of the players (I/E the probability of shots missed through mis judgment of range etc)
Dice rolls
Basic ability of players (how do you factor in how well a noob will do against a vet, cos vets do not always win)
Unit interaction and synergy
Response to situations (no accounting for gameplay under stress)
Probability of forgetting rules
Getting rules wrong
cheating
The massive variations of army lists
and so on and so on, now some of these may seem like strange variables but they all are just that 'variables', how do you factor all these things in and the thing is you have to if you want a true reflection of how a unit, list or tactic will work.
Math hammer or even probability reliant math hammer can give you a rough idea how a unit will work, thats not disputed and we simply cannot easily factor in ever variable, so how do we try to assess all these variables? well we can use two things:
Game play, the only real way to see if a unit will work in a given list/situation/scenario etc is to put it on a table and play, you instinctively assess those variables, you do not have to sit and think yourself into a headache working out the math hammer and probabilities because if it performs well it stays, if it doesn't it goes. It is as simple as that.
The other thing is this thing right here, forums or any way of learning through others game play experience.
Math hammer does have a limited place it can give you a basic idea of how a unit will perform, obviously BS5 is better than BS4 (though you hardly need math hammer to work that out), but when it comes down to it just go and play games and you will find a lot more success in choosing your units then sitting down with a scientific calculator or math geek.
Oni, good work dude but seriously fella why are you sitting down and doing this stuff when (a)you know most of the population will not understand it anyway and (b) there is so much more you could be filling that time with, good stuff like women , hard drinking:drinking: and other non math related stuff 8X
1984
Good article Onlainari, I agree completely. Some people just don't take into account the probability of things. For example, did you know that Doom is almost always better than Guide? Something you'd never consider until you looked at the odds.
Thanks for the article and keep up the good work. Rep.
2H - LEGIO HYDRA
Yeah, I know.
I do simulations and statistical research. I just make a simulation of lets say... 10 gaurdsmen shooting 10 tau. Then the reverse. I run the simulation at least 1000 times. Then I see what happens.
Good article though as a grad student and professional I can say its good.
Maybe... when I write some code I can get a simple programs that simulates different kinds of attacks.
Pinoy
Since you're not going to be rolling anything but dice you can pretty much learn "math-hammer" by reading up on the 'binomial distribution'
Probably worth mentioning for those that needed neither discrete math nor statistics in their education, that nCr= n!/r!(n!-r!). Remember that n! is factorial (n*n-1*n-2*...*3*2*1), not an excited n.