Length bias: what is open reads longer than what is closed

A randomly chosen moment falls inside a long file more often than inside a short one. Weight each completed duration by its length and the mean total duration can rise above the mean in the closed ledger. Both calculations use the same files, with different weights.

Live result
Files encountered at a randomly chosen moment have a mean total duration of 49.6 days, 28.2 longer than the ledger average.
  • Closed files in the ledger280
  • Mean total duration in the ledger21.4 days
The ledger gives every file one vote, the glance gives every day one vote, and a long file fills more days.

297,7506,000=49.6\frac{297,750}{6,000}=49.6 days·6,000280=21.4\frac{6,000}{280}=21.4 days

The same bands, weighted twiceYour ledger holds 280 closed files averaging 21.4 days. Files encountered at a randomly chosen moment have a mean total duration of 49.6 days, 28.2 longer, because the ledger gives every file one vote and moment sampling gives every day one vote. The longest band in this ledger is 90 days, and it holds 8.9% of the files and 37.5% of the glance.
Where the two means fallYour ledger holds 280 closed files averaging 21.4 days. Files encountered at a randomly chosen moment have a mean total duration of 49.6 days, 28.2 longer, because the ledger gives every file one vote and moment sampling gives every day one vote. The mean total duration is 21.4 days when each file has equal weight and 49.6 days when each day has equal weight, a difference of 28.2 days.
Horizontal
Board one, per cent. Board two, days.
Vertical
Board one, one band per row. Board two, that band's share of the glance.
Basis
Each row is one band. The square is its share of the files in the ledger; the circle is its share of the days a glance could land in.
Units
Durations in days to one decimal place, shares in per cent to one decimal place.
Mean total duration in the ledger21.4 days
Mean total duration at a glance49.6 days
The added days28.2 days
Glance against ledger2.3×
The longest band (90 days), share of files8.9%
The longest band (90 days), share of the glance37.5%

Try a ledger

The ledger of closed files

Band 1

Duration, days

The middle of the band, in days.

Files closed

Files closed inside this band; use zero if none did.

Band 2

Duration, days

The middle of the band, in days.

Files closed

Files closed inside this band; use zero if none did.

Band 3

Duration, days

The middle of the band, in days.

Files closed

Files closed inside this band; use zero if none did.

Band 4

Duration, days

The middle of the band, in days.

Files closed

Files closed inside this band; use zero if none did.

Two populations, one word

The ledger mean gives every completed file equal weight and measures its total duration. The glance mean weights each completed duration by its length and measures the mean total duration of files encountered at a randomly chosen moment. It does not measure how long a file has already been open when that moment arrives.

Name the sampling frame beside each figure. Counting completed files once and weighting them by the days they occupy produce different mean total durations, even when both calculations use the same ledger.

There is a practical consequence. A number that came out of a walk past the desk does not match a number that came out of the closed ledger, and the difference between them is a difference of frame rather than a change in performance. A glance is compared with a glance, and a ledger with a ledger.

What a band hides inside itself

Every band on this page compresses a group of files into one number, its midpoint. Files inside a single band also differ from each other, that difference carries the same length bias the page describes, and these eight numbers cannot see it.

So the gap this page shows is a floor. Record the same ledger to the day rather than to the band and the gap rises rather than falls, by the mean of the within band variances divided by the ledger mean. The direction is known. The size is not.

That is why the page prints one figure and not a range. A range would need a within band spread you did not type, and inventing one for you would make the number look more precise while making it less true.

Here is the maths

Assumptions
Each band stands at its midpoint; no spread inside a band; the ledger is closed and complete; opening rate and duration mix steady across the window the ledger covers.
Model version
1.0

The formula, in words

  • The two means divide by different denominators. The ledger mean is the total file days divided by the number of files, so every file gets one vote. The glance mean is the count weighted sum of squared durations divided by the total file days, so every day gets one vote.
  • The gap is the spread divided by the mean. The distance between the two means is exactly the variance of the ledger divided by its mean, and nothing else. That is why the gap disappears when every duration is the same, widens as the spread widens, and never brings anything in from outside your ledger.
  • A band's share changes when what is counted changes. A band's share of the files is its file count over the total count. Its share of the glance is its file count times its duration, over the total file days. A long band gains in the second exactly what it gave up in the first.
  • A band conceals its own internal spread. Each band is one number standing for a group of files, and the variation inside it does not appear in these inputs. The gap shown is therefore a floor, and the true figure sits above it rather than below.

A worked example

The ledger, as it loads

Four bands, 280 files.

Band, daysFilesFile days, n×dn\times d, where nn is files and dd days.n×d2n\times d^2, where d2d^2 is squared duration.
51206003,000
15901,35020,250
40451,80072,000
90252,250202,500
Total2806,000297,750

The ledger mean

6,000280=21.4\frac{6,000}{280} = 21.4 days. Every file counted once.

The glance mean

297,7506,000=49.6\frac{297,750}{6,000} = 49.6 days. Every day counted once.

The gap

49.6−21.4=28.249.6 - 21.4 = 28.2 days, a ratio of 2.3×2.3\times.

The identity, checked by hand

The variance of the ledger is 297,750280−21.42862=1,063.39−459.18=604.21\frac{297,750}{280} - 21.4286^{2} = 1,063.39 - 459.18 = 604.21. Divide by the mean: 604.2121.4286=28.2\frac{604.21}{21.4286} = 28.2. The gap is the ledger's own spread divided by its own mean, and nothing was introduced from outside.

The two weightings, band by band

Band, daysShare of filesShare of the glanceMoves by
542.9%10.0%falls to less than a quarter
1532.1%22.5%falls
4016.1%30.0%nearly doubles
908.9%37.5%rises more than fourfold

The 90 day band is the least common thing in the ledger and the most likely thing to be sitting in front of somebody at a randomly chosen moment. Rarity in a ledger of finished work is not rarity in a view of open work, and that sentence is the whole page.

The same mean, and a different glance

Chip 1 holds 15, 20, 25 and 30 day bands at 70, 100, 70 and 40 files. That is 280 files and 1,050+2,000+1,750+1,200=6,0001,050 + 2,000 + 1,750 + 1,200 = 6,000 file days, so the ledger mean is 6,000280=21.4\frac{6,000}{280} = 21.4 days, identical to the default. Its second moment is 15,750+40,000+43,750+36,000=135,50015,750 + 40,000 + 43,750 + 36,000 = 135,500, so the glance mean is 135,5006,000=22.6\frac{135,500}{6,000} = 22.6 days and the gap is 1.2 days against the default's 28.2. Two ledgers, the same file count, the same mean, and a glance that reads 49.6 days in one and 22.6 in the other. The mean carries no information at all about how far the glance will sit from it.

No spread, no gap

Chip 2 puts all 280 files in the 20 day band. M1=5,600M_1=5{,}600, M2=112,000M_2=112{,}000, where M1M_1 is total file days and M2M_2 the count weighted sum of squared durations. Ledger mean 20.0, glance mean 112,0005,600=20.0\frac{112,000}{5,600} = 20.0, gap 0.0 days, ratio 1.0×1.0\times. Both weightings are the same weighting. The variance is zero and the identity in §4.1 returns zero without a special case.

The tail does not have to be common

Chip 3 cuts the 90 day band from 25 files to 12. The ledger falls to 267 files, dayMass to 4,830 and sqMass to 192,450. The ledger mean falls to 4,830267=18.1\frac{4,830}{267} = 18.1 days and the glance mean to 192,4504,830=39.8\frac{192,450}{4,830} = 39.8 days, a gap of 21.8 days, which is 77 per cent of the gap that 25 files produced. The 90 day band now holds 12267=4.5\frac{12}{267} = 4.5 per cent of the ledger and 1,0804,830=22.4\frac{1,080}{4,830} = 22.4 per cent of the glance, a factor of five. Halving the long files removed less than a quarter of the gap.

Check it yourself

The ledger still holds 280 files and the ledger mean is still 21.4 days, while the glance mean falls from 49.6 to 22.6. The mean is the same and the glance is not.

What this does not model

The spread inside each band, which carries the same bias and which no arithmetic here can recover from a midpoint; any open file at all, whose duration this page never estimates and whose source it never judges; a ledger whose opening rate or duration mix changed across the window it covers, which is the steady state the length biased mean assumes and which this page cannot test; the difference between a renewal process, where one interval ends as the next begins, and a queue of files that overlap, which is close enough to teach the mechanism and is not identical to it; censoring, meaning the long files still open when the ledger was closed and therefore missing from it, which would push both means up and the ledger mean further than the glance mean; any cause of a long duration, of which the page names none and can name none; and any real queue, office, process or person, none of which this ledger describes.

This page describes a known result in renewal theory presented by Sheldon Ross in Introduction to Probability Models: a randomly chosen moment falls inside a long interval more often than a short one, so moment sampling overrepresents long intervals. It reproduces no text from the source and describes the mechanism in its own words. The ledger this calculation runs on is yours: you type it and own it, and the page does not know what the files are, who opened them or why. It does not estimate the duration of any open file or judge its source, because it sees only the eight numbers you typed.

Share:LinkedInX