What is Mathhammer? Surely you've heard of it if you've been playing 40k for more than a couple of weeks. But IF you haven't, Mathhammer is simply the application of very simple probability to your game as a predictor of whether or not your next move is likely to be successful.
Calculating Success and Failure
First, a few basics. 40k is about rolling dice -- a six sided cube where the odds of getting any number to come up during a given roll is 1/6 (or roughly 17%). Pretty simple, right? So, if you need to roll a 6 on a single dice, you have a 1/6 or 17% chance to get that 6.
In 40k, however, most of the rolls are expressed as being successful if you roll a certain number and higher/lower. For instance, a Space Marine armor save is successful on a 3+, which means you will be successful on a 3, 4, 5, or 6. In other words, if you need a 3+, then you are going to be successful on 4 possible outcomes. Expressed as a fraction, that's 4/6, or roughly 67%. (Which is why Space Marines are so tough to bring down!)
Calculating Success With Several Factors
For better or worse, figuring out whether or not you're going to be successful in a task is not quite as simple as rolling the dice once. In 40k, if you want to shoot at someone, you've got several dice rolls to make in order to determine if you've ultimately made a successful shot. You first have the odds of rolling a successful hit. Then you have to roll those successes to determine how many of those shots will actually cause a wound. And then you have to determine how many of those wounding dice will be saved by armor or cover.
To calculate the odds of a successful shot, you need to figure in the odds for each stage of the process. So, consider a bolter fired at a marine, by a marine. Marines have a BS of 4, so each shot is successful 4 out of 6 times (4/6 or 67% as we figured above). An S4 weapon fired at a T4 target will wound on a 4+. Using what we've learned above, that means will be successful 3/6 times, or 50%.
Personally, I don't like to calculate more than two factors at a time, so this is where I'm going to do my first calculation, even though we will still need to figure in just how many of those shots will be saved. In order to determine how many of the successful hits will wound, we multiply the odds together: (4/6) * (3/6) = 12/36, or 33%. This is the chance that your bolter is going to hit and wound a marine. And if you think about it, this makes perfect sense. If the shot is only going to wound half the time, and you're going to hit 67% of the time, obviously 33% isn't too hard to come up with on the fly, right?
But we have to move along. Now we have to figure out how many of those successful wounds are going to be saved in order to predict the lethality of our shot. This is actually the tricky part as it's kind of counter-intuitive. We know that a marine will make his save 67% of the time, just like the likely success of the shot (he gets a 3+ save with his armor). However, we are not going to multiply his chance to save against our successful wound number. We actually want to figure out how many saves are going to fail in order to determine our own success. So, a marine is only going to be wounded and fail his save on a roll of 1 or 2: that's 2/6 or 33% of the time. Multiply your successful wound results we just figured above by 33%, and you come up with roughly 11%.
Putting it all together properly, the math would look like this: (4/6) * (3/6) * (2/6) = 24/216 or 11%. That means each shot has an 11% chance to cause an unsaved wound.
Applying What We've Learned to Multiple Dice
As you know, it is very seldom that you're going to be taking one shot or one swing at a target; you're going to be rolling multiple dice for each stage of this process. The good thing is that the application of multiple dice is pretty simple. If you're going to roll 10 dice initially, you simply multiply the process by 10. If 20 dice, then multiply the process by 20. Pretty simple, right?
So, let's carry through our example. Now you've got a combat squad of marines (call it 5) rapid firing their bolters at another squad of marines (which we'll call 10 shots). So, now we multiply the whole process by 10, it looks like this: 10 * ((4/6) * (3/6) * (2/6)) = 111%
And so you say, "Wait, how the heck do I get 111%?!" Ah yes, grasshopper, that does seem weird, until you remember that percentages can also be expressed as decimals. So 111% is actually 1.11 -- which we assume is how many wounds you can expect to cause when you fire those 10 bolter rounds at the enemy space marine unit.
Applying the Process to Your Decisions on the Battlefield
So, now that you know how to do this, what good is it to you? Personally, I don't think taking a pure mathhammer approach to 40k is very useful, but it can be eye opening under the correct circumstances. For instance, lets look at our combat squad above trying to remove a two man remnant squad of enemy marines from an objective in the last turn of the game. Off the cuff, you might think to yourself that it should be a pretty easy squad to bring down if you rapid fire your bolters at them. But the pure statistical view of the action is actually quite the contrary. If you've only got the expected result of 1.11 wounds, that's only one "sure" wound, and only a one in ten chance (or so) of causing the second necessary wound. With this in mind, that might change how you decide to deal with that last squad.
For instance, what if that remnant squad is also in charge range? If I rapid fire my bolters, I know the odds are that I'll only cause 1.11 wounds. But, what if I fire my bolt pistols, and then charge in close combat? Well, we can do assaults the same way: First, figure your bolter wounds at 5 shots instead of 10, which gives you an expected .56 wounds. (Roughly half of what you would get than if you fired 10, which isn't really surprising since you're firing half as many shots, right?)
Now, calculate the charge. On the charge (without a sergeant) you get 10 swings as the attacker. They hit on a 4+, wound on a 4+ and are saved on a 3+, which overall is slightly worse than shooting 10 bolter rounds. The math looks like this: 10 * ((3/6) * (3/6) * (2/6)) = .83. But when you add in the .56 bolt pistol wounds to the charge result, you get a total of 1.39 expected wounds. Not a lot better, but a little bit doesn't hurt!
But this result can change depending on slightly different factors. For instance, if your sergeant is in the squad and has a bolter, you get another swing, raising the whole total up to a whopping 1.48.
If the sergeant has a bolt pistol and chainsword, and doesn't have a bolter, you have to change both equations. That means the expected rapid fire is only 9 shots, bringing that expected bolter carnage down to 1 expected wound, but raises the combined bolt pistol shots and assault up to 1.56... making the second option look even better.
And if the sergeant has a power weapon? Then those four hits don't get a save, resulting in two separate calculations. That's 8 * ((3/6) * (3/6) * (2/6)) for the regular marines and 4 * ((3/6) * (3/6)) for the sergeant (which isn't reduced by armor saves), giving us a grand total of 1.67 on the assault, added to .56 for the bolt pistol shots, and a grand total of 2.23 expected wounds, making the bolt pistol shots + charge the superior outcome under the circumstances by causing twice as many expected wounds, and pretty good odds for causing exactly the number of wounds you need to remove that squad from the table.
But what if there is an assault weapon in the squad? If it's a flamer, for instance, you won't factor the "to hit" in your shots -- but you can still use the full shot capacity on the charge. What if you're charging into cover? How much should you reduce your results depending on the expected wounds that the enemy squad can cause to you? What if the sergeant has a plasma pistol? Do you factor in the results of 1 and the possibility that he might not make that armor save (and thus doesn't get to add in his power weapon hits)? All of these factors will change your mathhammer equation, and you've got to take them all in if you want the most accurate results possible. Or you can just skip it and go with the rough estimate...
The Practicality of MathhammerOk, that's a LOT of math when you figure just how many shots, armor saves and assaults take place in a given game. Frankly, if you did this for every dice roll of the game, it would slow things down to a horrible crawl. It just doesn't make sense to do this for every roll. But it could be useful when determining which of your units should charge a particular target, and could assist you when making last turn decisions like in the example above. Beyond pivotal decisions, however, it just doesn't make a lot of sense to apply this process every turn as it has a tenancy to suck a little of the fun out of the game.
And let's also remember your sample size here. If you flip a quarter twice, you have an equal chance for the results to be heads or tails every time. But is it really so weird to get heads 10 times in a row? Of course not! The fact of the matter is, statistics are only going to show what is likely to happen over time... and after a LOT of dice rolling. In a single game of 40k, 10 guys are only going to fire, at most, 5 to 7 times. Just like it would not be unusual for you to flip a coin for the same results 10 times in a row, it is also just as likely that your dice can play hot or cold for an entire game. Mathhammer will not tell you what will happen, just what is likely to happen given infinite dice rolls... which you don't have. Mathhammer is an expectation, and can (and often is) wrong. Sometimes you'll do better; sometimes you'll do worse. But over the course of your gaming career, it should even out. (Not that it's going to matter to you at the time when you don't make a single armor save in a given game, of course.)
Accordingly, it doesn't really pay off to put too much stock in Mathhammer for a given game, and it is going to be a colossal waste of time to calculate every possible factor that does into a given decision. Accept that you will probably do better or worse than your calculation; accept that you only ever have a rough estimate of reality, and just keep your fingers crossed. When I use mathhammer, I do it sparingly, and I do it only with the expectation of trying to make a decision that is going to work out best most of the time. There simply are no certainties, and putting yourself in the most favorable position statistically is the best you can ever do.