Output:Brains blown out: 834503 Brains not blown out: 4998343 Things did not go as described in the problem: 4167154 Frequency of brains blown out given that things did go as described in the problem: 0.14307
Nice demo. My method was to substitute the problem for an equivalent one that's easier to reason about:
Suppose there are two guns with six barrels each, and a bullet is put into a randomly chosen barrel of one of the guns. You then play Russian Roulette with just one of these guns, again at random.
This is equivalent to the original problem because there is still a 50:50 chance that you're playing with a loaded gun and the location of the bullet if present is still random and fair. However the intuition is now that there are 12 equally likely places that the bullet can be (2 guns x 6 barrels). Having ruled out five of them (the barrels already discharged) we have seven remaining locations where the bullet could be, no information about which of these is more likely, hence a 1 in 7 chance of blowing our brains out.
That's another good example of mathematics being unreal. The chance of killing yourself in Russian Roulette is known to be considerably less than 1/6 with the first shot.
Why? Because the gun doesn't care that you say it's a 1/6 chance, but gravity makes sure that most of the time the loaded chamber stops at the bottom.
Insofar, the person getting the 3rd shot in row has by far the highest chance of blowing their brain out, if there's a bullet in the gun.
That's interesting, though in this case I think such a practical consideration would further improve your chances on the 6th shot (better than 1 in 7) as it's near the top again. Another practical consideration is that one could possibly detect the presence or otherwise of the bullet by it's weight.