Sub topic 4
The statistics of the best of many
This chapter assumes you can read short Python scripts and that you know what an average is and what "random variation" means. It also assumes you have met the claim that more ideas lead to better ideas. Here we ask why the claim holds in a purely statistical sense, and where that argument stops working.
The core idea: the best of a sample is not the average of a sample
Suppose every idea you produce has a quality, and that quality varies from idea to idea. Some ideas are weak, most are middling, and a few are strong. If you produce one idea, you get a single draw from that spread. If you produce ten and keep the best, you get the maximum of ten draws.
The maximum of a sample behaves differently from its average. The average of ten ideas is about the same as the average of one idea. The best of ten is higher than the best of one, because ten tries give you more chances to land in the good tail.
This is the statistical backbone of "quantity leads to quality". It does not claim that the average idea improves. It claims that the best idea you end up with improves.
A model you can simulate
To make this concrete, we need a model. The simplest one has three assumptions:
- Each idea's quality is a number.
- Each idea's quality is drawn from the same distribution. Here we use the standard normal, which has a mean of 0 and a standard deviation of 1.
- The draws are independent. One idea does not change the quality of the next.
The expected maximum of n draws is the average, over many repeated sessions, of the best quality in each session. The script below estimates it.
import random
import statistics
def best_of(n, trials=10000):
# Average quality of the best idea when each idea's quality is a random draw.
return statistics.mean(
max(random.gauss(0, 1) for _ in range(n)) for _ in range(trials)
)
for n in (1, 2, 5, 10, 20, 50, 100):
print(n, round(best_of(n), 2))Your numbers will differ slightly on each run because the script is random. Typical output is close to these values:
| Ideas generated (n) | Expected quality of the best idea |
|---|---|
| 1 | 0.00 |
| 2 | 0.56 |
| 5 | 1.16 |
| 10 | 1.54 |
| 20 | 1.87 |
| 50 | 2.25 |
| 100 | 2.51 |
With one idea, the expected quality is the mean of the distribution, which is 0. With ten ideas, the best one is typically about 1.5 standard deviations above average. With a hundred, it is about 2.5.
Reading the curve: fast, then slow
The curve has a clear shape. The first few extra ideas help a lot. Going from 1 idea to 10 raises the expected best by about 1.5 units. Going from 10 to 100 means ten times more work, yet it raises the expected best by only about 1 more unit.
For a normal distribution, the expected maximum grows roughly like the square root of 2 times the natural log of n. The logarithm is why each doubling of effort buys less than the one before. You do not need that formula to use the idea. The practical reading is that the first dozen ideas are cheap gains and the next hundred are expensive gains.
A second view: the chance of at least one hit
The expected maximum answers the question "how good is my best idea on average?" A related question is "what is the chance that at least one idea clears a bar I care about?"
Say each idea has probability p of being good enough, and ideas are independent. The probability that all n ideas fail is (1 - p) raised to the power n. So the probability that at least one succeeds is:
1 - (1 - p)^n
p = 0.05 # chance that any single idea clears the bar
for n in (1, 5, 10, 20, 50):
print(n, round(1 - (1 - p) ** n, 2))This prints 0.05, 0.23, 0.4, 0.64 and 0.92. A strong idea that appears only 1 time in 20 is unlikely to show up in your first five attempts, yet quite likely to show up by the fiftieth. This is the same effect as the expected maximum, written as a probability.
What the model assumes, and where reality departs from it
The curve above is a clean result from a clean model. Real idea generation breaks each of the three assumptions in some way. Knowing how helps you judge how far to trust the curve.
The shape of the distribution matters
We used a normal distribution, where extreme values are rare. If idea quality is heavy-tailed, meaning that a very small share of ideas is vastly better than the rest, the best of many grows faster than the normal curve suggests. In that case a large volume pays off even more. If quality is capped, for example when the best possible idea is only a little better than a good one, the best of many flattens sooner.
You rarely know the true distribution. What you can do is note which situation you are in. In domains where outcomes are lopsided, such as products or research directions, heavy tails are plausible. In domains with a hard ceiling, such as fitting a bolt to a standard hole, they are not.
Ideas are not independent
The model treats draws as independent. In practice, ideas cluster. If your first idea is a mobile app, your next several tend to be variations on a mobile app. Duplicates and near-duplicates add to n without adding a new draw from the distribution. Ten variations of one idea behave more like one or two draws than ten.
This is why raw counts can mislead. What matters is the number of distinct ideas, a point that connects to the measure of flexibility from earlier in the tutorial. It also connects to fixation, covered in a later chapter.
The distribution can shift as you go
The model also treats every draw as coming from the same distribution. If later ideas are on average more original than early ones, which the serial order effect suggests, then the later draws come from a better distribution. That works in your favor: continued effort helps more than the identical-draws model predicts. A later chapter covers this effect.
You must be able to recognize the best one
The model assumes that you pick the maximum. In reality, you pick the idea that looks best after judging, and your judgment contains error. If your scoring is poor, you may discard the winner and keep a mediocre idea. The benefit of quantity is then smaller than the curve shows. A later chapter measures how much, and you can see the shape of the effect by adding noise to the simulation, as in the optional example in that chapter.
Cost changes the question
More ideas cost time, attention and money. Because returns shrink, the sensible question is not "how many ideas can I get?" but "where does the next idea stop being worth its cost?"
You can reason about this using the table above. Compare the gain from each step with the effort needed:
| Step | Extra ideas | Gain in expected best |
|---|---|---|
| 1 to 10 | 9 | about 1.5 |
| 10 to 20 | 10 | about 0.3 |
| 20 to 50 | 30 | about 0.4 |
| 50 to 100 | 50 | about 0.3 |
In the first row, each added idea adds about 0.17 on average. In the last row, each added idea adds about 0.006. The first ideas are worth about thirty times more than the last ones. If a session costs you the same amount per idea throughout, then stopping at some moderate count is rational. If ideas get cheaper over time, for example because you use a tool that produces variants quickly, the best stopping point moves further out.
Practical consequences
Putting the statistics to use leads to a few working rules:
- Set a numeric target for ideas rather than asking for "some ideas". The target keeps you producing after the first obvious ones.
- Count distinct ideas, not variations. Merge duplicates before you count.
- Expect the largest gains early and plan to stop when each new idea takes much longer than the last.
- Keep the selection step separate and give it real attention, because the gain from quantity is only realized if you can pick the winner.
Exercise
Each idea you generate has a 2% chance of being good enough, and ideas are independent. What is the smallest number of ideas that gives you at least a 50% chance of having at least one good idea?
Show answer
Solve 1 - 0.98^n >= 0.5, which means 0.98^n <= 0.5. Taking logs gives n >= ln(0.5) / ln(0.98), about 34.3. So n = 35. Check: 0.98^34 is about 0.503, which leaves only a 49.7% chance, and 0.98^35 is about 0.493, which gives a 50.7% chance.
Exercise
Using the expected-maximum table, compare going from 1 idea to 10 ideas with going from 10 ideas to 100 ideas. Which gives the bigger gain in the expected best idea, and what does the answer tell you about how to spend effort?
Show answer
Going from 1 to 10 raises the expected best by about 1.54 (from 0 to 1.54). Going from 10 to 100 raises it by about 0.97 (from 1.54 to 2.51), even though it takes 90 more ideas instead of 9. The early ideas are far more valuable per idea, so effort spent reaching a moderate count gives the largest return. Beyond that, extra effort should be justified by cheap generation or by a heavy-tailed distribution.
Exercise
You generate 30 ideas, but 20 of them are small variations on the same concept. Why does the best-of-n curve overstate your expected result, and what would you count instead?
Show answer
The curve assumes 30 independent draws. The 20 variations are strongly correlated, so they behave like only one or two draws. The real number of independent draws is closer to 10 or 11 (the 10 other ideas plus one or two for the cluster). You should count distinct ideas after merging near-duplicates, and read the curve at that smaller number.