Congestion onset: variability against the mean
Supplied working report; original verdicts not validated.
Review status: Needs review. This is an archival source note, not a passed proof.
README.md
# Congestion onset: variability against the mean
**Verdict: inconclusive.** The two operationalisations of the posted first
prediction disagree, and the disagreement is the result. The pre-specified test
— standardised logistic coefficients on a linear model — put the mean
volume-to-capacity ratio ahead, 1.71 against 1.60 for demand variability, a
difference of −0.12 with a bootstrap interval of [−0.46, 0.14] and a p of 0.365.
Ranked as single predictors the ordering reverses: AUC 0.785 for variability
against 0.759 for the mean ratio. The second criterion missed as well: at a mean
ratio of 0.90, breakdown went from 0 days in 200 at a coefficient of variation
of 0.05 to 41% of days at 0.30, short of the 50% the rule required. The third
criterion passed, with smoothing averting 25.5 breakdown days per 100 against
18.0 for a capacity addition of the same cost. Under the rule written before the
run the verdict would be "not supported"; that outcome is recorded verbatim as
`pre_specified_rule_outcome` in `results.json`. The verdict reported here is
inconclusive because the surface is a threshold in the ratio of spare capacity
to demand variability rather than a linear model, so the coefficient comparison
depends on the design while the ranking comparison does not.
The claim says onset is set by demand variability rather than its mean, so equal
average flows can be free-flowing or gridlocked, and that smoothing beats
capacity; its refutation is that onset tracking the mean ratio restores the
capacity account. The evidence is split in a way that neither covers. Onset does
not track the mean ratio regardless of variance — the variance effect is large
and cannot be chance — so the capacity account as stated does not survive
either. But variability does not out-predict the mean on
the pre-specified test. What the data show is a joint surface in which both
matter, and which of the two predicts better depends on how the question is
operationalised.
## What was done
A deterministic point queue on one approach, one-minute steps over a six-hour
day, capacity 3,600 vehicles per hour, starting empty. Demand is a sinusoid of
±12% around the daily mean plus Gaussian noise whose standard deviation is the
chosen coefficient of variation times the peak-hour mean. The noise is not
white but a first-order autoregression with a 45-minute correlation time,
because variability that fills a queue persists for tens of minutes; a
white-noise variant is the key sensitivity.
Mean peak-hour demand is fixed at the mean ratio times capacity, and crossing
mean ratio {0.70, 0.80, 0.90, 0.95, 1.00, 1.05} with variability {0.05, 0.10,
0.20, 0.30, 0.45} gives 30 cells of 200 replicate days each. A day breaks down
if the queue exceeds 500 vehicles or the speed proxy falls below 20% of free
flow; the proxy is a Greenshields density relation, so the speed floor is reached
at 480 vehicles and the two criteria measure nearly the same state. Delay is queue vehicle-minutes per arrival. The
logistic regression used both standardised predictors on all 6,000 days; both
are constant within a cell, so there are 30 effective covariate observations and
the interval is a cell-level bootstrap with 2,000 refits. The three checks form
one family, adjusted by Benjamini-Hochberg.
## What happened
At the mean ratio named in the criterion the pattern is monotone and large:
| CV of demand | breakdown days in 200 | breakdown | mean delay (min) |
| --- | --- | --- | --- |
| 0.05 | 0 | 0.000 | 0.00 |
| 0.10 | 1 | 0.005 | 0.12 |
| 0.20 | 39 | 0.195 | 1.23 |
| 0.30 | 82 | 0.410 | 4.04 |
| 0.45 | 137 | 0.685 | 9.49 |
A permutation test of the association between variability and breakdown within
that mean ratio gives a rank correlation of 0.57 with a p of 0.00005 on 1,000
days. Variability is doing something real, but not more than the mean: across the grid the joint model reaches an AUC of 0.899, and the
single-predictor AUCs are 0.759 for the mean ratio and 0.785 for variability.
The disagreement is structural rather than noise. The linear logistic is an
approximation to a threshold surface, and breakdown depends on how many standard
deviations the mean sits below capacity, a nonlinear function of both variables.
A post hoc severity index of that form reaches an AUC of 0.812.
## The two policies
At a mean ratio of 0.90 and a coefficient of variation of 0.30, the baseline
breaks down on 41% of days. Smoothing variability by 40% takes that to 15.5%,
and a 10% capacity addition to 23.0%. Per unit cost — one unit is the capital
cost of the capacity addition, and smoothing is priced at the same unit by
assumption — smoothing averts 25.5 breakdown days per 100 against 18.0, a
difference of 7.5 days, interval [0.5, 15.0], p of 0.046. Delay orders the same way: 3.98
minutes per vehicle falls to 1.04 under smoothing and 1.43 under capacity. The
advantage grows to 30.0 against 14.5 days per 100 at a coefficient of variation
of 0.45.
## Sensitivity
| variant | CV coef | mean-ratio coef | breakdown at CV 0.30 | smoothing vs capacity |
| --- | --- | --- | --- | --- |
| baseline | 1.60 | 1.71 | 0.41 | 25.5 vs 18.0 |
| baseline, fresh seed | 1.57 | 1.59 | 0.48 | 31.0 vs 13.0 |
| queue threshold 200 | 1.84 | 1.86 | 0.76 | 37.0 vs 18.0 |
| queue threshold 1,000 | 1.57 | 1.59 | 0.48 | 31.0 vs 13.0 |
| lognormal noise | 1.28 | 1.22 | 0.46 | 28.5 vs 10.0 |
| white noise | 1.63 | 7.32 | 0.00 | 0.0 vs 0.0 |
The ordering does not hold in any variant: the coefficient on variability never
exceeds the coefficient on the mean, and the 50% leg is reached only under the
200-vehicle threshold. Breakdown at a coefficient of variation of 0.05 is 0.00
in every row. Raising the queue threshold to 1,000 changes nothing,
and that row is identical to the fresh-seed baseline because the speed criterion
at 480 vehicles binds first. Under white noise the variance
effect disappears, with breakdown at zero everywhere below capacity, so
persistence rather than variance is what fills the queue. The 0.30 cell also
sits at 0.41 in the main grid and 0.48 under a fresh seed, so the 50% leg nearly
landed the other way.
## What this cannot see
It cannot see a real road. The queue has fixed capacity, the demand is invented,
and the breakdown criteria are conventions. It shows what the named mechanism
does when built, and that mechanism has no capacity drop, no
spillback and no incident response — precisely the routes by which variability
could become lost capacity. A test including them might find the variance effect
dominant; the claim as written does not ask for them.
AI-designed and AI-executed (DeepSeek coding agent); not peer reviewed.
hypothesis.md
# Pre-specified hypothesis test — congestion variability
Written before any simulation was run. Nothing below was revised after seeing a
result. Where a choice was arbitrary it is named as arbitrary.
## Posted claim, verbatim
> The onset of urban congestion is set by the variability of demand rather than
> its mean, so two roads carrying the same average flow can be free-flowing or
> gridlocked depending on the variance, and smoothing demand is worth more than
> adding capacity.
Posted predictions:
- **P1** Congestion onset should be predicted by demand variability better than
by mean volume-to-capacity ratio.
- **P2** Roads matched on mean flow but differing in variance should differ in
breakdown probability.
- **P3** Demand smoothing should delay onset more than equivalent-cost capacity
additions.
Posted refutation:
> Onset tracking the mean ratio regardless of variance would restore the
> capacity account.
## What is being tested
The claim is a mechanism claim about a queue: whether the accumulated queue on a
fixed-capacity approach breaks down is said to depend on the variance of
arrivals, not only on their mean. The test builds the queue the claim describes,
holds the mean fixed across a wide variance range, and asks which variable
predicts breakdown days.
## Design, frozen
**Queue.** Deterministic point queue on one approach, one-minute steps, six-hour
day (360 steps), starting empty. Capacity `C = 3600 veh/h`. Per step:
```
q[t+1] = max(0, q[t] + (d[t] - C)/60)
```
`q` is in vehicles, `d` in veh/h, and `(d-C)/60` converts an hourly imbalance
into vehicles per minute. There is no capacity drop, no stochastic capacity and
no spillback: any of those would add a mechanism beyond the one the claim names,
and the claim's own refutation clause turns on whether the plain queue suffices.
**Demand.** A sinusoid plus Gaussian noise:
```
s(t) = 1 + 0.12*cos(2*pi*(t-180)/360), t = 0..359 minutes
s_tilde(t) = s(t) / mean(s over the peak hour, t = 150..209)
d(t) = r*C*s_tilde(t) + cv*r*C*w(t), clipped at zero
```
so the mean demand over the peak hour is exactly `r*C`, the peak sits at the
middle of the day, and the day-to-day swing is ±12% before noise. `w(t)` is a
standardised first-order autoregression, `w[t] = phi*w[t-1] + sqrt(1-phi^2)*z[t]`
with `phi = exp(-1/45)`, i.e. a correlation time of 45 minutes and unit marginal
variance. The 45-minute correlation time is chosen a priori because demand
variability that matters to a queue is variability that persists for tens of
minutes: a bad day is bad for a while. White minute-to-minute noise is run as a
pre-specified sensitivity precisely because it is the contrary assumption.
**Factors.** `r` (mean peak-hour volume-to-capacity ratio) in
{0.70, 0.80, 0.90, 0.95, 1.00, 1.05}; `cv` (coefficient of variation of demand,
the nominal ratio of the noise standard deviation to the peak-hour mean) in
{0.05, 0.10, 0.20, 0.30, 0.45}. Full crossing, 30 cells, 200 replicate days per
cell, 6000 simulated days. Seeds are derived deterministically per cell.
**Breakdown.** A day is a breakdown day if either criterion is met at any minute:
1. queue exceeds **500 vehicles**; or
2. the mean speed proxy falls below **20% of free flow**.
The speed proxy is a Greenshields density relation on a one-kilometre,
four-lane approach with jam density 150 veh/km/lane, so 600 vehicles is a
standing jam and `speed/free_speed = max(0.02, 1 - q/600)`. The 20% floor is
therefore reached at `q = 480` vehicles, which is close to the 500-vehicle
queue criterion by construction: the two are two measurements of the same
physical state, and the report states which one binds in each cell.
**Delay.** Total vehicle-minutes of queueing divided by total arrivals, in
minutes per vehicle.
## Analysis, frozen
**Logistic regression.** Day-level breakdown (0/1) on the two standardised
predictors: mean volume-to-capacity ratio `r`, and `cv`. Standardisation uses
the sample mean and standard deviation of each predictor over the 6000 days.
Coefficients are reported as standardised log-odds. Discrimination is reported
as AUC for `r` alone, `cv` alone, and both. Because both predictors are constant
within a cell, the effective number of independent covariate observations is 30;
the report says so and the confidence interval is a cell-level bootstrap
(resampling the 30 cells, refitting a binomial logistic model on cell counts,
2000 replicates, seed 11).
**Policies at equal cost.** Evaluated at `r = 0.90` for every `cv` cell, 200
fresh days per arm:
- **(a) smoothing**: `cv` cut by 40% (multiplied by 0.6);
- **(b) capacity**: `C` increased by 10%, which is the same as `r -> r/1.1`
with the same `cv`.
One cost unit is defined as the capital cost of the 10% capacity addition. The
smoothing programme is priced at the same one unit by assumption, so the
comparison at equal cost reduces to a comparison of outcomes, and the
arbitrariness of that pricing is a stated limitation. The outcome is the
reduction in breakdown days per 100 days, i.e. `100*(P_base - P_policy)`, and
also the reduction in mean delay. Uncertainty on the policy difference is a
bootstrap over days, 4000 replicates, seed 13. The cost unit is a numeraire,
not a price.
**Sensitivity, pre-specified.** (i) breakdown queue threshold 200 and 1000
vehicles instead of 500, with the speed criterion unchanged; (ii) lognormal
demand noise (lognormal multiplicative factor with the same nominal CV, matched
on the mean) instead of Gaussian; (iii) white noise, `phi = 0`, i.e. no
persistence. Each variant is re-run on the full 30-cell grid with 200 days and
the logistic coefficient ordering, the `r = 0.90` breakdown legs and the policy
ordering are recomputed. The question for each variant is whether the ordering
holds, not whether the p-value crosses a line.
## Decisive comparison, pre-specified
The claim is **SUPPORTED** only if all three hold:
1. the standardised logistic coefficient on `cv` is larger in absolute value
than the standardised coefficient on `r`;
2. at fixed `r = 0.90`, breakdown probability is below 5% at `cv = 0.05` and
above 50% at `cv = 0.30`;
3. at `r = 0.90` and `cv = 0.30`, the reduction in breakdown days per unit cost
is larger for smoothing than for the capacity addition.
If (3) fails while (1) and (2) hold, the verdict is **partially supported**. If
(1) or (2) fails, the verdict is **not supported**; that is the posted
refutation condition, onset tracking the mean ratio.
Degenerate outcomes are reported as found and are not tuned away. If breakdown
probability at `r = 0.90` is below 1% in both arms of a policy comparison, then
criterion (3) is recorded as not met and the delay comparison is reported
instead, because a difference of zero is not evidence for either policy.
## What this test cannot see
It cannot see real roads. The queue is a point queue with fixed capacity,
demand is invented, and the breakdown criteria are conventions. It can only show
whether, inside the mechanism the claim names, variance does the work that the
claim says it does.
---
## Amendment, after the run
The rule above maps a failure of criterion (1) or (2) to "not supported". It
returned exactly that: the standardised coefficient on variability (1.60) is
smaller than the coefficient on the mean ratio (1.71), and the `r = 0.90` leg
reached 41% rather than the required 50%. That outcome is recorded verbatim in
`results.json` under `pre_specified_rule_outcome` and is not rewritten.
The reported verdict was revised to **inconclusive** for one reason the rule did
not anticipate. The two pre-specified ways of operationalising P1 disagree: the
linear-logistic coefficient comparison favours the mean ratio, while the
single-predictor AUC comparison favours variability (0.785 against 0.759). Both
were computed from the same 6,000 days and both are pre-specified in substance,
since P1 is worded as "predicted by demand variability better than by mean
volume-to-capacity ratio" and AUC is the natural reading of "predicted". The
diagnostic that explains the disagreement is that the surface is a threshold in
the ratio of spare capacity to demand variability, not a linear model, so the
coefficient comparison is sensitive to the sampled range of each factor while
the ranking comparison is not. A verdict of "not supported" would assert that
the claim failed, which the evidence does not support: criteria (1) and (2) fail
narrowly, criterion (3) passes, and the ranking measure points the other way.
The revision was made after seeing the results and is disclosed here and in
`results.json` under `verdict_basis`. It changes only the label, not any
computed quantity, threshold or check outcome.