Learn
Lesson · Capacity Estimation · Ranges and rates

Orders of Magnitude

An estimate is not a number. It is an interval, because every factor that goes into it is one, and intervals multiply end to end. The arithmetic takes a line; the consequence takes the rest of the course. Three factors each known to within a factor of two give a product known to within a factor of eight, and an answer that arrives as a single number is not more precise than that, it is only quieter about it.

known to ±2× is the interval [c/2, 2c] [a₁,a₂] · [b₁,b₂] = [a₁b₁, a₂b₂] positive factors ±2× · ±2× · ±2× ⟹ ÷8 … ×8 the half-widths MULTIPLY 10⁷ · 10² · 10³ = 10¹² centre [1.25·10¹¹, 8·10¹²] width = hi/lo = 64× centre = √(lo·hi), not (lo+hi)/2
One factor as an interval, and what three of them make

Core ideas

What this lesson establishes

One idea, carried through three steps: the factors are intervals, the product of intervals is an interval, and the middle of that interval is not where addition would put it.

1

An estimate is an interval, and the interval is the estimate

Nobody knows that a service has ten million daily users. What is known is that it has somewhere between five and twenty million, and 10⁷ is the middle of that. Writing the factor as [5·10⁶, 2·10⁷] rather than as 10⁷ loses nothing and records what was actually known. A factor known to within a factor of k is the interval [c/k, ck], and k = 1 — a factor you measured — is the case where the interval has one point in it.

2

Intervals multiply end to end

For positive factors the smallest product comes from the smallest ends and the largest from the largest ends, so [a₁,a₂]·[b₁,b₂] is [a₁b₁, a₂b₂] and nothing in between needs checking. The half-widths therefore multiply rather than add: 2 · 2 · 2 = 8, so three factors at ±2× give a product at ÷8 … ×8, and the interval is 64× wide from end to end.

3

The centre of a multiplicative range is its geometric mean

The interval [1.25·10¹¹, 8·10¹²] has arithmetic midpoint 4.0625·10¹², which is 65/16 times the product of the central values it was built from. Averaging an end that is eight times too small with an end that is eight times too large does not land in the middle of a range built by multiplying; √(lo·hi) does, and here it returns 10¹² exactly.

The material

Factors that are ranges, and the range their product lives in

What a factor known to within a factor means, how two of them multiply, and where the middle of the answer is.

Definition · Ranged factor

A quantity known to within a factor of k > 1, with central value c, is the interval [c/k, ck]. k is its half-width, written ±k× and read “to within a factor of k”. The interval’s width is the ratio of its ends, hi/lo = k², and k = 1 describes a quantity that is known.

The half-width is a factor and not a percentage, and the difference is the whole reason this works. A factor of two downward is -50% and a factor of two upward is +100%, so a quantity known to ±2× is not known to ±50% of anything; it is known to one multiplicative step either side. Multiplicative steps are what a capacity estimate is made of, and they compose by multiplying.

Theorem · The product of two positive intervals

If a ∈ [a₁, a₂] and b ∈ [b₁, b₂] with all four ends positive, then ab ∈ [a₁b₁, a₂b₂], and both ends are attained.

Multiplication by a positive number preserves order. From a ≥ a₁ > 0 and b ≥ b₁ > 0 we get ab ≥ a₁b ≥ a₁b₁, and from a ≤ a₂ and b ≤ b₂ we get ab ≤ a₂b ≤ a₂b₂. So every product lies in [a₁b₁, a₂b₂].

Both ends are reached: a = a₁, b = b₁ gives the low end and a = a₂, b = b₂ gives the high end. The interval is therefore exactly the set of possible products and not merely a bound on it.

□

Applied to [c/k, ck] and [d/m, dm], the product is [cd/(km), cd·km] — a ranged factor again, with central value cd and half-width km. That is the whole result: half-widths multiply. Three factors at ±2× give ÷8 … ×8; four give ÷16 … ×16; and a factor you know exactly contributes k = 1 and does not widen anything.

daily users 10⁷ ±2× [5·10⁶, 2·10⁷] actions per user/day 10² ±2× [50, 200] bytes per action 10³ ±2× [500, 2 000] product 10¹² ÷8 … ×8 [1.25·10¹¹, 8·10¹²] width 8 · 8 = 64×
Example · Ten million users, a hundred actions, a kilobyte

The central values multiply to 10¹² bytes a day — a terabyte, on the decimal convention this course uses throughout. The low end is 1.25·10¹¹ bytes and the high end is 8·10¹², so the honest report is “between 125 gigabytes and 8 terabytes a day, centred on a terabyte”. Every one of those figures is in the lab, and moving any slider moves all of them at once.

Reporting the width

There are two useful ways to say how wide an answer is and they are not the same number. ÷8 … ×8 is the half-width and is what you carry into the next multiplication. 64× is the width end to end, hi/lo, and is what tells you whether the answer is worth acting on. The lab prints both, and prints the width in powers of ten as well: 64× sits between 10¹ and 10², which is 1.81 powers of ten.

The bracket is the form worth remembering. “This answer is good to within two orders of magnitude” is a sentence a reader can act on; 1.81 is a decimal that suggests a precision the estimate does not have. The decimal is a gloss on the bracket, and the lab labels it as one.

Where the middle is

The interval [1.25·10¹¹, 8·10¹²] has an arithmetic midpoint of 4.0625·10¹². That is 65/16 times the product of the central values, so the midpoint of the range is four times the estimate the range was built around. Nothing has gone wrong: an average of two numbers that differ by a factor of sixty-four is dragged to the larger one, because 8·10¹² is sixty-four times the weight of 1.25·10¹¹ on a number line and the same distance from the centre on a ratio scale.

The centre of a range built by multiplying is the geometric mean √(lo·hi). Here √(1.25·10¹¹ · 8·10¹²) = 10¹² exactly, which is where the estimate started. Whenever the half-widths are symmetric — every ±k× factor — the geometric centre comes out exactly at the product of the central values, and the lab says so; where a factor is skewed, say ÷2 … ×3, the root is irrational and the lab prints it rounded and labels it.

The point of carrying the range is not humility, it is direction. Three factors at ±2× contribute equally, so there is nothing to choose between them; make one of them ±10× and it supplies 10 of the 40 half-width on its own, and measuring that factor is the only thing that narrows the answer. The widest factor is the work item.

Interactive

Orders of magnitude

Three factors, three intervals, one product

Ranges multiplythree factors, each an interval, and the interval their product lives in
low endcentral valuehigh end

Method

Estimating a quantity that is a product of three things

The factors first, then how well each is known, then one multiplication down each column.

1

Write the factors on separate lines, with units

One line per factor, each carrying the unit it contributes: users, actions / user / day, bytes / action. The units have to cancel down to the unit you asked for, and if they do not, the factor list is wrong before any arithmetic happens.

2

Give each factor a half-width, as a factor and not a percentage

±2× for something you have seen a number for, ±10× for something you are inventing, ±1× for something you measured. Guessing the half-width is easier than guessing the value and it is the input that decides how much the answer is worth.

3

Multiply the low ends, then multiply the high ends

Two independent multiplications, each down one column. The central values multiply too, and the three half-widths multiply into the product’s half-width. Nothing in between the ends ever has to be checked, because all the factors are positive.

4

Report the interval, the width and the centre

[lo, hi], the width as hi/lo, and the geometric centre. Quote the width in powers of ten as well: an answer good to one order of magnitude and an answer good to three are different kinds of object and only the bracket says which you have.

5

Name the widest factor, and say what would narrow it

The factor with the largest half-width supplies most of the product's width, and it is the only one worth measuring. An estimate that ends “and the number to go and find out is bytes per action” is finished; one that ends with a single number is not.

Intervals and their products

Score 0 / 0

10⁷ users × 10² actions × 10³ bytes, each known to ±2×

The quantity wanted is bytes written per day. Three factors, each known to within a factor of two, and two multiplications.

factor central known to low high daily users 10 000 000 ±2× 5 000 000 20 000 000 actions / user / day 100 ±2× 50 200 bytes / action 1 000 ±2× 500 2 000 low end 5 000 000 · 50 · 500 = 125 000 000 000 = 1.25·10¹¹ high end 20 000 000 · 200 · 2 000 = 8 000 000 000 000 = 8·10¹² centre 10 000 000 · 100 · 1 000 = 1 000 000 000 000 = 10¹² half-width 2 · 2 · 2 = 8 ÷8 … ×8 width 8 000 000 000 000 / 125 000 000 000 = 64× 10¹ ≤ 64 < 10² 1.81 powers of ten geometric centre √(1.25·10¹¹ · 8·10¹²) = √(10²⁴) = 10¹² exact arithmetic midpoint (1.25·10¹¹ + 8·10¹²)/2 = 4 062 500 000 000 4.0625·10¹² / 10¹² = 65/16 = 4.0625×

The two lines at the bottom are the ones to sit with. The geometric centre lands exactly on the product of the central values, which is the sense in which 10¹² was the estimate all along. The arithmetic midpoint lands at 65/16 of it — four times the answer — not because of a mistake but because averaging is the wrong operation on a range built by multiplying.

For a faded rehearsal, keep the same three factors and change one thing: make bytes per action ±10× instead of ±2×. The supplied first move is that the half-width is now 2 · 2 · 10 = 40. Work out the new [lo, hi], the new width as a factor, and which decade bracket it falls in — then check all three against the lab by moving that one slider.

Then answer the question the numbers are for: of the three factors, which one would you go and measure, and how much would measuring it narrow the answer? Say the new half-width out loud before you look.

Common mistakes

1
Averaging the two ends of a multiplicative rangeFor [1.25·10¹¹, 8·10¹²] the arithmetic midpoint is 4.0625·10¹², which is 65/16 times the estimate the interval was built around. The reason is not subtle once seen: the high end is sixty-four times the low end, so it dominates any sum they appear in. The centre of a range made by multiplying is √(lo·hi), which returns 10¹² here, exactly.
2
Adding the half-widths instead of multiplying themThree factors at ±2× are reported as ±6×, and the answer looks eight times narrower than it is. The rule follows from the interval product: [c/2, 2c] times [d/2, 2d] is [cd/4, 4cd], a half-width of 4 and not of 4—added. Any time the reported half-width is close to the sum of the inputs rather than their product, this is what happened.
3
Taking the high end of every factor and calling it conservativeTwenty million users at two hundred actions at two kilobytes is 8·10¹² bytes a day, which is not a safety margin on the estimate — it is the high end of the interval, eight times the central value, and the interval already told you that. Stacking worst cases produces one end of a range you have already computed, and it produces it without saying how unlikely that end is.

Check your understanding

✓
Finish when a capacity figure quoted as a single number reads as an answer with its error bar removed.

You should be able to turn three guessed factors into [lo, hi], a half-width and a width in powers of ten without reaching for the lab, say why the geometric mean and not the midpoint is the centre, and name which of your factors is worth measuring and what it would buy.

Note: Every factor from here on is a rate, and a rate is where the first real unit trap lives. “Rates: the Day Has 10⁵ Seconds” turns a population into requests per second, and takes seriously the shortcut everyone uses for the division — a day of 10⁵ seconds instead of 86 400 — by computing exactly what it costs and in which direction.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.