Hacker News new | past | comments | ask | show | jobs | submit login
German Tank Problem (threestandarddeviationstotheleft.wordpre...)
64 points by bluesmoon on June 10, 2010 | hide | past | favorite | 69 comments



Key quote:

> The statisticians believed that the Germans, being Germans, had logically numbered their tanks in the order in which they were produced.

The moral of the story is, never do anything that could give your opponent information, unless you're controlling what information they receive. It would be better to produce tanks with pseudo-random serial numbers, up to a maximum of whatever you want your enemy to think your production capacity is[1]. Brings back memories of reading the Cryptonomicon.

[1] My gut tells me the expected estimate is likely to be slightly different than your max value for small values of n. Bonus points for confirming or denying.


Sometimes though, information denial is more of a pain in the ass than a gain.

For all the intelligence directed at Nazi Germany during WWII, the outcome of the war was decided by a few Russian snowflakes, really.


the outcome of the war was decided by a few Russian snowflakes

Not by cracking Enigma?

http://en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma

And remember, "the war" was also being fought in the Pacific, also with a spectacular imbalance in cryptology strength between the Allies and the Axis.

http://en.wikipedia.org/wiki/Japanese_naval_codes

http://en.wikipedia.org/wiki/Magic_%28cryptography%29

In general, code-breaking had a lot to do with the outcome of the war.

http://www.cs.virginia.edu/jillcrypto/


The allied shooting down of Japan's commander in chief, Isoroku Yamamoto, was based on breaking the Japanese naval codes and attests to your point of view.

From his wikipedia article: He died during an inspection tour of forward positions in the Solomon Islands when his aircraft (a Mitsubishi G4M "Betty" bomber) was shot down during an ambush by American P-38 Lightning fighter planes. His death was a major blow to Japanese military morale during World War II.

http://en.wikipedia.org/wiki/Isoroku_Yamamoto


Not by cracking Enigma?

No, not by cracking Enigma.

Enigma didn't result in 750,000 casualties and 900 Aircraft losses. Stalingrad did.

Enigma didn't result in the loss of the Sixth Army. Stalingrad did.

Enigma didn't change the scenario from Germany controlling all of Europe and its resources to playing defense from two sides. Stalingrad did.

For all the bravery and blood shed by the red army, their winter is the thing that changed the outcome of the battle. The winter forced a halt in the German advance, allowed the Russians to regroup and was the number one casualty producer for the nazi's.

I don't undervalue the contribution code breaking made to that war, but there was only one turning point, and it came , very clearly, in Russia.


Rejewski and Turing's Enigma cracking accomplishments were staggeringly significant, but they won nothing. If the Allies bombed every submarine that radioed a position, the Germans would have thrown the machines into the ocean. The Enigma let the Allies stack the overall war strategy in their favor, but it was far from over.

I do agree that brainpower won the war - our cryptology was stronger, resource management between the Pacific and European fronts was superb, and the Allies had a knack for picking battles and battlefields where they could excel


What decided the war in the Pacific was that the USA had vastly more industrial capability than Japan. Even if Japan's leaders had made all the right decisions, and America's leaders done everything wrong, America would still have won any protracted war between the two countries.


Even if Japan's leaders had made all the right decisions, and America's leaders done everything wrong

If America's leaders had done everything wrong, they would have ended the war without big territorial gains for their side, with a negotiated peace leaving Japan in control of Asia. (That, by the way, is exactly what Japan's leaders got wrong from the strategic point of view. They really believed before the war started that that was a likely outcome of the war. They didn't count on the Allies insisting upon unconditional surrender after the sneak attacks on Pearl Harbor and Singapore.)


US leaders did do almost everything wrong until well into the war.

They were saved from their mistakes by superior equipment (especially aircraft) and eventually better and more experience personnel. They didn't start tactically winning battles until well into the Pacific Campaign.


By a few snowflakes? And by tons of blood.


To any Russians reading this, as an American, I say, pay no attention to that little joke, please. I'm very grateful for the service of your forefathers. Our countries and our peoples have had our differences of opinions in the years since, but not so many differences and not so many years have passed that we have forgotten the price you paid. If ever another evil empire arises (that isn't one of the two of ours, I suppose) I hope you'll have our backs again. Especially in winter, as I'm not one for the cold, and you seem fantastic at it.


Well said, my father was in the RAF in WW2 and he always made it very clear to me that in his opinion it was the bravery and sacrifices of the Soviet people that were mainly responsible for the defeat of the Nazis.

Of course, when I was younger and the Soviet's were the "evil empire" it was difficult for me to believe this. Now, having read a lot of military history, I share his view.


Evil and brave don't contradict each other.


Although I have to admit that evil isn't a very useful concept in history or politics.


And yet, the Nazis were evil.


Perversely, they prided themselves on their animal friendly policies.


IANAR, but if I was I'd be offended by the comment on the snowflakes and vindicated by the recognition that many people gave their lives to defeat Germany.


I am a Russian, but I was not at all offended. I just feel that the topic is a bit too serious for an offhand joke.


Yes, it probably is too serious. And the Soviets were about as disgusting as the Nazis [1]. (Not to mention how the Chinese communists turned out.)

War makes strange bedfellows.

[1] They were still brave soldiers--probably on all sides.


BS. Sure, the Russian winters harmed the German war machine greatly, but it's not as though that alone was the sole determiner of the outcome of the war. Even had the winters been milder the Russian forces would still have taken a heavy toll on the Germans and were nearly guaranteed to win that conflict by benefit of logistics alone.

Moreover, even had Russia fallen to Germany the American/UK military might by 1945 was far too great even for a Germany backed by the natural resources of Russia to withstand. By mid-1945 the allies had put together a machine in the Pacific theater in the form of bombers, submarines, and combined forces capable of razing cities, ravaging shipping, and conquering territory at an incredible rate. It would have been perfectly possible to direct some or all of that apparatus at an unbowed Nazi regime in mid to late 1945 through 1946 and visit utter devastation on Germany until it was incapable of fighting any war. And this is sans nuclear weaponry, factoring those into the equation merely accelerates the end of this hypothetical war. Such a war would have been even more brutal than WWII was, but the outcome would not change.


The UK military might was pretty strained by 1944. It was with great reluctance that the British agreed to an invasion of France in 1944.


Source for this statement?


> had Russia fallen to Germany

How do you define "fallen"? I'm pretty sure Germany didn't have enough forces to destroy all the Russian production centers in, and to the east of, Ural.


Well, sure, this is why this is a hypothetical point. The likelihood of Germany having survived the battles on the Eastern front was low, the likelihood of them actually conquering Russia even lower.


Mother Russia teams up with Mother Nature


The convoy system in the North Atlantic also made a huge difference. Imagine Britain and the US shut off.


Even if it hadn't been for Enigma, and even if it hadn't been for the weather in Russia, I still don't think it's possible to construct a sensible scenario where the eventual outcome of the war is delayed by more than a few months.

If VE day didn't come in May thanks to Turing, it would have come in August thanks to Oppenheimer.


Hitler made a tactical error delaying an invasion of the uk. That was a pretty important factor.

I think there is absolutely no way you can attribute the winning of the war to any one thing; Turing, the RAF, Russian winter, the sea routes/convoys and more all contributed.


Why did I have to read down THIS far to find someone speaking this sense!


Thanks. Though I think, in fairness, not too many people are arguing that any one event actually won the war.

The problem, I think, is that it is very easy to look back and see how things "should" have gone differently. Hindsight is a bitch :) I know a few people who have started a sentence with the words "If I were Hitler I would have...", and you have to turn round and say yes. Any sane man in Hitlers shoes could have won the war. But Hitler was in Hitlers shoes, and he didn't.

And then there are those who are often forgotten when discussing of the war. For example what about the Australian contribution; the Japanese are known for being resilient, refusing to give ground under any circumstances. But the Aussies had the same attitude and theirs was one of the most successful armies in the war (even in all time I think). They harried the Japanese on a number of flanks, that arguably kept them at bay where otherwise they may have won (or prolonged even further) the Pacific war.

Then there is the more complex matter of things which would have lost the war. This usually ranges from the sublime to the ridiculous; with all sorts of theories. But often ignores simple things like, the U Boats could have got lucky and hit 3 or 4 convoys in a row. Logistically that could have won Germany the war as easily as anything else. It's simply impossible to predict.

A lot of Brits will argue that us holding out for those crucial few months was what won the war; I'm not entirely sure I disagree, it was certainly an extremely important thing. But so many people forget the country was full of US, French and other soldiers at the time; it was multi-national resilience. And, at the same time, the supply convoys kept us going, again a multi-national force.

At the end of the day my History teacher at school summed it up best:

You will meet all sorts of people who claim they won the war. But the truth is people won the war; lots of people from different nations pulling together in the same direction for once. It's a thing to be proud of. But also to be sad that it is only in the face of war and eradication we can truly band together like that


Upvote for the digger love :) Rats of Tobruk, Kokoda Track - some very hard young men involved there.


Scenario 1: The Germans decide to not kill the jews, and even let the top Jewish physicists stay. With their help, the Germans create a nuclear weapon in 1943-44 instead of canceling the whole project in 1942.

Scenario 2: The guy in charge of the Luftwaffe isn't a complete retard. The germans finish off the french instead of letting them run off to britain, they then invade Britain, not giving the Americans a base of operations.

I can keep going.


The Jew-loving Nazis of Scenario 1 seem like a pretty big departure from the Nazis we know and love, but yes, if the Germans had got the bomb things would have worked out differently.

I don't buy Scenario 2. The loss of Britain would have made bombing Germany difficult, not impossible. Worst-case scenario is that they have to develop a long-range bomber. More likely they'd have invaded some part of Europe or North Africa (most likely Britain itself) as a first order of business upon entering the war -- I doubt they would have made it to 1945 without a well-defended slice of Europe. Of course this scenario probably also has a non-negligible Luftwaffe defending German cities in 1945 but, heck, the nukes have gotta get through eventually.


I'm not sure your second scenario is as quickly solvable as you think. The loss of the uk would have been the loss of an important strategic platform - essentially allowing a second front to squeeze Germany from when it came to attack. Also it would have given Germany pretty consolidated control of our side of the North Atlantic, supply routes would have been severely disrupted.

I think ultimatelythe war would have been won but redeploying to, say, North Afric would have taken a while.


It's more interesting to look at alternative histories for World War I, in my opinion. Because the parties involved weren't as clearly `good' or `evil'.


the thing is though, WWI was mostly static trench warfare. There wasn't much that could "go" differently.

I guess the US could have never joined


Actually people tend to really overestimate how important trenches were to the stalemate. Sure, it took a lot of effort to break through a trench line but both sides were perfectly capable of doing it when they could devote enough resources. The problem was that railroads meant that the mobility of the defenders was always much greater than the mobility of the attackers and telegraphs meant that the abilty of the defenders to coordinate was much greater than the ability of the attackers to coordinate. The internal combustion engine and radio changed this when WWII rolled around.

There were also very many places where things could have turned out differently. For instance, if the Germans had stuck to the original Schlieffen plan and managed to outflank the allies they might very well have captured Paris right at the start.


Do you mistake the western front for the whole war?

Interesting would have been: Germany, instead of planning of going after France first, Russia later--goes for Russia only and just defends against France. After defeating Russia (let's assume), they try to make peace in the west.


Depends on which kind of facts you are prepared to alter. E.g. you could construct scenarios where Germany and the Soviet Union would not attack each other. Or where the U.S. would not enter the war.


  E.g. you could construct scenarios where Germany and the Soviet Union would not attack each other.
Easy, decisive German victory, because there would be no Eastern front. The Eastern Front was by far the largest, by whatever measure you care to choose: German casualties (more than half), total military casualties, total civilian casualties, materiel losses.

Historians are finally shedding the Hollywood propaganda and calling it "arguably the single most decisive component of World War II, eventually serving as the main reason for Germany's defeat." (Bellamy, Chris - Absolute War: Soviet Russia in the Second World War) Also see Wikipedia's page - http://en.wikipedia.org/wiki/Eastern_Front_(World_War_II)


That's right -- you'd have to change something big -- ie the identities of the belligerents -- or to give the nuclear bomb to Germany. But you can't reverse the outcome by changing something small (like Enigma or the weather in Russia).

No offence to Turing et al, of course -- they still saved gazillions of lives.


The weather in Russia is by no means something that I would call "small." It helped the Russians defeat Napoleon in 1812.

When the Germans invaded, they were ill-prepared as well. They're vehicles couldn't cope with the cold, so in the winter months, they were bombarded by Soviet bombers but couldn't get any of their own planes in the air. They couldn't move vehicles because the ground turns to mud (they ended up using dead bodies to gain traction). At one point, the Germans were very close to Moscow (within visual distance IIRC) when winter hit. That winter, fresh troops from Siberia who were specially trained for winter warfare arrived in Moscow to push the Germans back. I think it's safe to say that the Russian winter prevented the Germans from capturing Moscow that winter.

My favorite podcast (Dan Carlin's Hardcore History) covered the eastern front of WWII in a four-part series, titled "Ghosts of the Ostfront": http://bit.ly/W4ig (episodes 27-30). I highly recommend it to anyone that's interested in history.

(That's not an affiliate link, btw.)


Here's Napoleon's cartographer's view of the Russian expedition, atop google maps: http://hci.stanford.edu/jheer/files/zoo/ex/maps/napoleon.htm...

Wikipedia has the original: http://upload.wikimedia.org/wikipedia/commons/2/29/Minard.pn...


That four part series is stunningly good. Even if you aren't interested in history very much, give it a go.


A really exciting book about this phase of the war, which will be of interest to any math-oriented hacker, is The Pleasures of Counting by T. W. Körner.

http://www.amazon.com/Pleasures-Counting-T-W-K%C3%B6rner/dp/...


Indeed. And not only about this phase of the war, but also about Cholera and the dimensions of the Egyptian pyramids and much more.

(Now that I live in Cambridge, I should really go and try to mee T.W. Körner.)

From the author's website (http://www.dpmms.cam.ac.uk/~twk/):

"Next let me remind you that The Pleasures of Counting is still available from all good bookshops. Longer than `With Rod and Line Through the Gobi Desert', funnier than `The Wit and Wisdom of the German General Staff' and with more formulae than `A Brief History of Time' it was voted Book of the Year by a panel consisting of Mrs E. Körner, Mrs W. Körner, Miss K. Körner and Dr A. Altman (née Körner)."


Yes, the book is laugh-out-loud funny in surprising places.

Miss K. Körner is quite a fine mathematician in her own right.

http://nrich.maths.org/2756

http://www.math.harvard.edu/people/KornerKatherine.html


It's a shame that `The Wit and Wisdom of the German General Staff' doesn't exist.


I recall reading that the same kind of thing used to happen with standing field armies, (think Napoleon sized blocks) where you could almost instantly assess an opponents forces based on simply recognizing divisions, regiments, etc.

My guess is Napoleon-era field marshals did a cost-benefit analysis and decided that managing their forces simplistically (i.e. no irregular sized units) outweighed whatever inconvenience enemy intelligence posed.

Relating this to the OP my guess is the Germans made a mistake and overlooked the serial numbers, rather than simply not caring.


There are a few "flaws" to this solution actually, although the flaws are in assumptions + bayesian vs. frequentist philosophy differences.

The solution mentioned in the link solves a different problem:

You get a sample of K ints uniform randomly from 1 to N, where N is unknown. Based on your sample, what is your best estimate of N, so that if we repeatedly continue to give you independent random samples, the average answer your algorithm gives will be the correct answer, and provides the minimum variance compared to other algorithms?

However, if we can put an upper bound on the number of tanks that could possibly exist, say definitely no more than 100 million tanks, and if we believe it is slightly more likely that older tanks will be on the front lines than newer tanks, or any other prior knowledge, then the proposed solution will be more incorrect.

One of my former co-workers proposed computing a posterior distribution for estimates of N based on equally-weighted priors for N = max-observation to N = maximum cap (100 million tanks). Then the estimate is the expected value of the posterior distribution.


Is there for every commonly used frequentist estimation method a bayesian prior that gives the same answer?


For every commonly used frequentist estimator, there is an uncountable infinity of intractable Bayesian estimators.


...probably.


I guess one might also want to take into account the probability of capturing 5 tanks with all odd serial numbers (3.125%) vs the probability that the Germans had numbered their tanks in increments of 2


Is there a simple derivation or justification for this estimator?


This is a classic question where some of the usual assumptions of the method conventionally applied, the Maximum Likelihood (ML) principle, break down. There's a good explanation at:

http://en.wikipedia.org/wiki/German_tank_problem#Example

In a nut, the ML estimator of N, the number of tanks produced, is the max of the serial numbers. But this is biased, in particular, it tends to systematically underestimate N. (Because you're unlikely to actually observe the top serial number in your random sample.)

So you can add a correction term which is, intuitively, the expected gap between the serial numbers in the finite sample. The correction makes up for the fencepost effect. It goes to zero as the number of samples increases.


There is, had to learn it in a probability class. http://en.wikipedia.org/wiki/German_tank_problem


To sum up the derivation for those looking for crib notes; model the problem as choosing k items u.a.r. from [1..N]. Compute P(max = i), and from this compute the expectation of the max. After simpliciation this is given in terms of k and N, and hence we have an estimator for N in terms of k and max.


According to Wikipedia the estimator is (n+1)/ns-1 not (n+1)/n(s+1) as the author stated.


I think I get part of it n/n+1 means that as n gets bigger it becomes ever more likely that s is close to the real maximum. But I have no idea why 1 is added to s


continuing my foolish musings I would have thought originally that getting the mean of the sample and multiplying by 2 would have been a good estimate. But one problem with that is that there is no possibility of the maximum being lower than anything in the sample so there has to be an allowance for uncertainty upwards. Is that the reason for adding 1 to s?


You can show that the max is a comprehensively better estimator than twice the mean.

This is one of the rare cases where you can outperform the mean by a large margin.

The standard deviation of the mean-based estimator, which measures its accuracy, will go down like 1/sqrt(n) where n is the number of samples in the finite set. This is the rate standardly seen in lots of estimation problems.

But the standard deviation of the max-based estimator will go down like 1/n, a much faster rate. That's one manifestation of the "weirdness" of this problem. It means you can get surprisingly good estimates of the number of tanks considering the small numbers of observations.


Thanks, I think I get it on a superficial level. The British seemed to have some pretty useful statisticians during WWII. See this also : http://www.dur.ac.uk/stat.web/bomb.htm

EDIT : So there's about a fifty fifty chance that the second observation will be bigger than the first. After the second observation the range of possible future observations will be divided into 3 zones, 1 below the lowest of the previous 2 observations 1 above the higher and 1 between the two previous observations, so there is now only a 1/3 possibility of the next observation being above the higher of the 2 previous observations. Next time that drops to 1/4 then 1/5, so that's how the standard deviation decreases proportional to 1/n


I like that explanation.


As someone who spends a lot of time working with future high-school math teachers, I'd be really interested in reading some more by this author; but I can't find any contact information, and the blog moved to an 'invitation-only' Blogspot account in 2007. Does anyone know how to get in touch with the author to request an invitation?


I want to comment on how pretentious that website title is ("three standard deviations to the left"). I took that to imply the author (or his intended audience) is three standard deviations above average (intelligence?).

Anyway, he says he am IB teacher... not surprised, this attitude of intellectual superiority is an IB hallmark.


Could be the political left, you know.


Wouldn't that be 3 SDs to the RIGHT instead?


Yeah I took it as meaning a website for the brain-dead, which was much wittier than pretentious.

Unless he meant right and said left, which is even funnier.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: