54 comments

[ 3.0 ms ] story [ 122 ms ] thread
Ok, can someone explain why this method performs so well?

Take the highest serial number, add a tenth of it then subtract 1. Presto.

What is the underlying logic here?

You have a key error.

Take the highest serial number, add that number divided by the sample size, subtract one.

You can then intuitively observe that as sample size increases, the "m/n" component shrinks- our highest serial number is probably going to be a lot closer to the maximum. As sample size decreases all the way to 1, the "m/n" component grows- our largest sampled serial number is probably not very close to the maximum.

To me, this is the best explanation. Very visual and intuitive. Cheers.
The "maximum number" is a statistic both of a population and of a sample drawn from said population. As the sample size goes up, the sample statistic will converge to the population statistic, due to the Law of Large Numbers. Because serial numbers are natural numbers (1, 2, 3, etc.) they are uniformly distributed from 1 through N-hat (the population maximum), and the convergence of the sample statistic to the population statistic will scale inversely to the sample size.

Let's take the example in the order it was given in the article: 117, 232, 122, 173, 167, 12, 168, 204, 4, 229

First step we would project the maximum to be 117 + 117 / 1 - 1 = 233. Or, if we drew 1 sample from the population, we would expect the "maximum" to be the average case -- the population mean. We take a minus 1 because there's a degree of freedom lost in using the maximum twice in the same formula (handwaving a bit, but that's a straightforward enough answer for now).

With the second case, we have 232 + 232 / 2 - 1, or 347. We would intuitively expect two cases to effectively be distributed evenly across the population, or at 1/3 and 2/3. (The statistics is a bit different due to the MAX operator here, but I won't go into that).

With the third case, we have 232 + 232 / 3 -1 = 309. Note that while this statistic is still higher than the actual population statistic, it is still converging due to the additional case that helps us counterbalance the weight of the previous unusually-high sample case we observed.

Does that help?

so let's say I am being attacked by the first wave of tanks the Germans have fielded. The wave consists of 10 tanks, but from the first batch of tanks produced.

1,5,6,9,12,15,18,20,21,25

how did the allies double check that their sample was not skewed as I described?

You'd basically be estimating the size of the first batch at that point. Which is fine, until they capture a tank somewhere else that has a number of 230.
It should also be noted that there was not one "Tank" SN used, as each component had its own set of serial numbers to be analyzed. In this specific example they used gearbox SN's along with chassis and engine SN to provide the estimate.

These statistical estimations were cross-checked with a broad range of other sources, in an attempt to gather data on everything from the number of tanks produced, to the number of factories in use and a variety of supply chain factors.

does this work for consecutive integers that don't start from 1?
It seems that it would trivially work if you knew the number that you start from, you'd just be shifting the uniform distribution (and subtracting whatever number it started from to get the overall estimate).

It does seem to be a harder problem if are given that they do not start at 1, but that they are consecutive integers. I imagine you might do a similar sort of statistical estimate on the beginning of the range as well as the end of the range. This introduces more uncertainty, but I see no reason why this wouldn't work

There's uncertainty introduced by the idea that you don't know how big that range is supposed to be. Technically the M/n figure should be (M-L)/n, where L is the sample minimum observed, and the estimated population minimum would be represented by L + (M-L)/n - 2 [1].

[1] two degrees of freedom should be lost due to estimating both M and L, thus subtracting 2.

It's not "add a tenth":

> For example, let’s say 10 tanks were captured

It's "add 1/n" where n is the number you collected.

Think of this related problem. Numbers are randomly chosen from 1 of 2 ranges. One range is from 0-10, the other is 0-100. The numbers are:

4 3 1 8 5 2 7

Which range were the numbers chosen from? It could be either, but statistically the answer would be from 0-10, since if they were chosen from 0-100 the chances of all of the numbers being lower than 10 is very low.

Now, say you didn't know the ranges ahead of time, and the numbers were:

117, 232, 122, 173, 167, 12, 168, 204, 4, 229

Now, the upper bound can't be 100 or 200, since there is a 232. So it is at LEAST 232.

Which is more likely, that the upper bound is 256, 500 or 1000 ?

Intuitively you can assume that if it was 500+, you would expect at least one number in the 300-500 range.

The highest number should be 232 + some amount that is inline with all the other numbers. It could be exactly 232, but the chances that you happened to pick the highest number itself is also low.

Basically you are solving this problem:

If you were going to select 10 numbers at random from a range of 0 to N, how high should N be so that there is a high probability that the highest number you select is only 232.

Since a uniform distribution is assumed, you are basically just adding one more uniformly distributed data point.

I had the same question and your answer was pretty clear to me. Thank you!
It's actually "add m/n" where n is the number you collected and m is the highest sampled serial number.
Note to self: when manufacturing tanks, use UUIDs as identifiers, not sequential integers.
This also matters for user visible ids in applications, like user ids, etc. It's really easy to say your competitor has only 2000 users if you sign up to their service and your id is 1992.
pks are sequential. If you sign up as 1992 they have 1992 customers.
pks are sequential. If you sign up as 1992 they have 1992 customers.

Does not follow. Only follows if:

- PKs are sequential

- and PKs are non-zero non-negative

- and they have not been reset at any point (or the sequence generation otherwise modified)

- and all preceding PKs are those of customers (as opposed to test values, invalid PKs due to a sequence number that was generated but the registration did not complete, or customers who have since left the service)

If PKs are sequential and natural and the sequence has not been modified, then you know there are no more than 1992 customers. Not exactly 1992.

> Note to self: when manufacturing tanks, use UUIDs as identifiers, not sequential integers.

The post-war Soviet aircraft industry was saddled with ridiculously convoluted Construction Number schemes in order to defeat such analysis. They varied by type, model and factory.

Here's an example for one model built in one particular factory:

All start with 353 plus three more digits which indicate the sub-type (242=Mi-24V, 246=Mi-24D etc) The seventh digit seems to represent the quarter built while the eighth digit seems to represent the year built. The last five digits as the famous post 1974 random nonsense number.

They only abandoned the schemes in the early 1990s.

you need to be able to map from serialnumber to mechanical properties. Using uuid ties you ti having honking big global database.
Nah. Just number the first 100 tanks with "1", then start numbering at 1000000, then make another 100 lot numbered 10...
This reminds me of a popular German graduation prank. Three goats are set loose in a school building. However, before the goats are released, the students paint the numbers 1, 2 and 3 on them to facilitate an orderly recapture procedure.
I think you mean 1,2 and 4.
You may have missed the joke...
Explain? I don't get it
The joke plays off the one we've all heard before, about pigs being released with numbers implying one is "still at large" — the joke being that the Germans are such industrious and efficient engineer-types that even school pranksters still facilitate an efficient clean-up. I thought it was clever!
Not the worst joke, but it presumes a large amount of domain-specific knowledge on the part of the listener.
Really good jokes often do. Generally speaking, the more of a "leap" you have to make to get a joke, the funnier it seems to you (all else being equal). This is a large part of the appeal of "inside jokes" and online meme humor (which are inside jokes for online communities).

A good example that would appeal to some segments of the HN crowd, but leave everyone else baffled:

Some people, when confronted with a problem, think "I know, I'll use the Banach-Tarski theorem."

Joke writers face a trade-off between targeting a very specific audience to exploit this effect, or broadening the appeal of the joke to make it more accessible (i.e., make it less funny for more people). The really great commedians figure out how to have it both ways by finding new spins on universal themes, and taking the entire audience on that "leap" together (good "observational humor" often falls into this category). The less successful ones often fall back on broad humor (large audience, not very surprising) or reference humor (surprising "click" for a small audience, baffling for the rest).

>Some people, when confronted with a problem, think "I know, I'll use the Banach-Tarski theorem."

Fuck. I wanted to ask for an explanation, describing what I thought before, but now I got it. :D Thanks for the joke!

Maybe the goats are just trained to come back to the barn after they hear a bell or something, then?
I'm a german and i didn't get it. Which may in itself be an implicit joke about germans.
I’m not surprised. It's based on stereotypes that an actual German would not be as likely to share. (You may also be less likely to have heard the joke this plays off.)
if you're thinking of MPHG, it was "1, 2, 5".
(comment deleted)
(comment deleted)
The moral of the story is to use random serial numbers.
no you want to just skip numbers randomly to inflate the estimates
The irony here is that, at the beginning, the Nazi Party started counting members at 500 to make themselves seem bigger than they were.
<glances at the UIDs in his system's /etc/passwd>
Depends on why you want to obscure. Works for the context of the article, but what if you want to look non-threatening to your large neighbor, to avoid an attack?
Thus Seal Team "Six".
Countermeasures* to this problem reminded me of an incident in which the Germans were able to outsmart Allied military intelligence.

* https://en.wikipedia.org/wiki/German_tank_problem#Countermea...

This is something I read in The American Axis, which discusses how Charles Lindbergh was duped into helping delay American involvement in WWII. The short version: He was taken on a grand, multi-day tour of the Luftwaffe’s large air-force… never the wiser that the planes he saw on airbase after airbase were the same ones, flown in overnight from the last airbase! Naturally the US MI questioned Lindbergh after his travel and grossly overestimated the power and size of the Germain air force, just as they had intended!

(As I recall, Lindbergh wasn’t a Nazi sympathizer so much as a dupe; although the other subject of the book – Henry Ford — certainly was. In fact, Ford plants produced the faultiest American war planes, by far, dooming quite a number of American pilots. There’s every reason to think this was intentional.)

Update I read this book 8 years ago and my memory isn't 100%. It looks like Lindbergh, per the book, was also a Nazi sympathizer to some degree, although he comes off much more sympathetically than Ford.

> Ford plants produced the faultiest American war planes, by far, dooming quite a number of American pilots. There’s every reason to think this was intentional.

That is quite an assertion to make about someone, even long dead. Could you provide some evidence?

As I mentioned, I’m pulling this from a book. http://www.amazon.com/The-American-Axis-Charles-Lindbergh/dp...

One reviewer on Amazon says:

> This is one of the most carefully researched, extensively footnoted, beautifully written, books on this subject ever published. The sources include entries from Lindbergh's journal, Lindbergh's speeches, FBI files, letters from German archives, Ford company records, and many other primary sources. Every assertion of fact is backed up with unimpeachable documentation.

IIRC — by this point it was Ford's son running the plant(s) in question, but Henry Ford himself is not just a known anti-Semite, but quite literally ran and anti-Jewish propaganda paper in Dearborn, MI. It hardly takes a leap to look at the abysmal performance of planes built by Ford and suspect that management there was particularly … lackadaisical in their pursuit of quality.

> Henry Ford himself is ... a known anti-Semite

Agreed; he's not my favorite person at all and made an awful call by supporting Hitler. But ...

> It hardly takes a leap to look at the abysmal performance of planes built by Ford and suspect that management there was particularly … lackadaisical in their pursuit of quality.

Things like that alarm me; it's a proven method for condemning the innocent and unpopular. We can form hypothetical links between many events - Billy is a mean person and disliked Joe, Joe's been murdered, so hang Billy; or, every morning the rooster crows and then the sun rises, therfore the rooster is doing it - but most will be false. We need evidence to differentiate truth from imagination.

From the Amazon page, Publisher's Weekly seems to think less of the book (though Kirkus likes it):

Although Wallace (Who Killed Kurt Cobain?) is a recipient of Rolling Stone's Award for Investigative Journalism and appears to have done much primary research, he delivers a highly speculative rehash of material handled much better in A. Scott Berg's Lindbergh, Robert Lacey's Ford: The Man and the Machine and such seminal studies as Charles Higham's American Swastika. Wallace tries and fails to sensationalize well-known facts about the parochial American fifth column of the late 1930s and early '40s, a bungling movement of which Ford and Lindbergh were among the most public faces. Wallace sees a conspiracy in what he presents as Ford's pro-Nazi partnership with Lindbergh: a dark and powerful alliance designed to hinder the Allies at every turn. In fact, the two men were far more naive than effectual in their attempts to prop up American isolationism before Pearl Harbor. And Lindbergh, who counted Harry Guggenheim among his closest friends, found Ford's hatred of Jews repugnant. Once war was declared, both Lindbergh and Ford helped the Allied effort. Lindbergh helped develop the Corsair and later, as a "civilian observer," flew more than 25 combat missions over the South Pacific. At the same time, Ford (with Lindbergh's help, and after a few false starts) became the leading manufacturer of the B-24 bomber. Were Ford and Lindbergh half-witted dupes of Nazi propaganda before the war? Undoubtedly. Were they Nazi agents either before or after the start of hostilities? Wallace fails to make the case.

I used the word "suspect," didn’t I? The numerical output of B-24 bombers is dramatically undercut by their failure rate.

The quote you’re posting is mostly about Lindbergh. I don’t recall the book trying to say he was "partnered" or "allied" with Ford in a Nazi conspiracy, mostly that he was a useful dupe. This changes nothing. We will probably never know for sure how much of the bombers' poor construction was intentional or not, but you can hardly say there’s no reason to seriously suspect it.

> We will probably never know for sure how much of the bombers' poor construction was intentional or not ...

That's the reasoning that so alarms me. That can be said about anything (and is often used by propagandists): We will never know for sure if person X kidnapped and killed a prostitute, or if AIDS is a conspiracy of western doctors to kill Africans, or if the Muslim next door is a terrorist, or if aliens kidnapped my cousin, or if the KGB is following me.

Without evidence it's just a random guess and slanders the accused.

The Soviets liked to do this sort of thing too. They'd have a groups of bombers fly past during demonstrations. Except instead of many groups of bombers, it was one group of bombers that would fly off, make a circle out of sight, then make another flyby.

This let the US to greatly overestimate Soviet production, and produce huge numbers of their own weapons to "match" the Soviets. So it all sort of backfired on the Soviets, since they mostly just convinced the other side to put their much greater productive capacity to use.

Alternative application of the solution. It's an interesting bit of math, with many theoretical and real world applications.

http://what-if.xkcd.com/65/

I always love this story.

I wonder about the potential for error due to bias in the collection process. For example, I would expect older tanks to be more prone to breaking down due to mechanical problems, which might change how likely they are to be captured or destroyed. (I can't tell if that likelihood would go up, because they're more likely to break down in combat, or if it would go down, because they're more likely to be in the shop instead of on the battlefield.)

Evidently it didn't affect the accuracy of this technique too badly, but it makes me wonder.

But only the single largest serial number, and the number of samples are being used. Not any of the serial numbers seen besides the largest one.

That means any such noise as you describe will have no effect. As long as a high-serial number tank is ever destroyed or captured, the method will work. It only takes one.

You can get away with only using the count and the maximum because of the assumption of uniformity. Once that assumption goes away, the assumption no longer works.

If earlier tanks are much more likely to be captured, then the number of samples will be exaggerated compared to the maximum number seen, so you'll underestimate production. If earlier tanks are much less likely to be captured, then the number of samples will be smaller compared to the maximum, and you'll overestimate.

An interesting aspect to this that seems to be overlooked is that the conventional intelligence was probably intentionally fudged in order to garner funds and support and raise anxiety and fear as a means for motivation.

You can't overestimate the production of tanks by that much when you are observing the production facilities. You would either have to have been tricked, i.e., knowing that it is being observed the same tanks were "shipped" multiple times or you, for some reason thought there were more factories which you didn't have eyes on. I'm not sure how to judge whether it would have been in the Nazi interest to provide an impression of high productivity or hide the true nature of the numbers.

Another interesting aspect to this is that it provides the background for why the US military operates with what would otherwise be seen as abject retardation. There is a strategic value in being aimless, illogical, and confused in your operations for various reasons. One reason is that if you have "random" serial numbers your enemy can't do these kind of calculations.