Core Web Vitals and 404 monitoring (2D)

Estimate LCP, INP and CLS at the 75th percentile from a simulated RUM sample, see the sampling error and the chance of a wrong good/poor label, then tune a Poisson 404 alert.

Switch to 3D

Presets

Playback

RUM sample (Core Web Vitals)

404 monitoring

Layers

Model check

The science

Core Web Vitals are 75th percentiles

Google assesses a page on three field metrics, each judged at the 75th percentile of real-user page loads: LCP (Largest Contentful Paint, good up to 2.5 s, poor above 4 s), INP (Interaction to Next Paint, good up to 200 ms, poor above 500 ms) and CLS (Cumulative Layout Shift, good up to 0.1, poor above 0.25). A page passes when all three p75 values are good. This page draws a synthetic Real User Monitoring (RUM) sample; each metric is lognormal, which is a common shape for timing data: ln X ~ Normal(mu, s2), median = exp(mu) and true p75 = exp(mu + 0.6745 s).

Sampling error of a percentile

A sample p75 from n loads is not the true p75. For a continuous distribution with density f the sample quantile is asymptotically normal with standard error SE = sqrt(p (1 - p) / n) / f(q), p = 0.75. The 95 % interval comes from order statistics, x(n p - 1.96 sqrt(n p (1 - p))) to x(n p + 1.96 sqrt(n p (1 - p))). Because the label (good, needs improvement, poor) depends on which side of a threshold the estimate falls, the probability of a wrong label is P(p-hat > t) when the truth is below t, computed from the same normal approximation and checked by simulation. The number of loads needed to clear a threshold with 95 % confidence is n = p (1 - p) z2 / (f(q) |t - q|)2: it grows without bound as the true p75 approaches the threshold.

404s as a Poisson process

If broken URLs are hit independently at a constant average rate lambda, the number in a window of W minutes is Poisson with mean lambda W: P(N = j) = e^-m m^j / j!. An alert fires when the count reaches k, so the false-alarm probability per calm window is the upper tail P(N >= k) and false alarms per day are (1440 / W) times that for non-overlapping windows. During an incident the rate rises to lambda + extra, which gives the detection probability per window and, for tumbling windows, a mean delay of W (1 / P_det - 1/2) minutes. Raising k lowers false alarms and lowers detection power; the ROC-style graph shows that trade for every k.

What is simplified

Real RUM data are not independent lognormal draws: they are mixtures of devices, networks and pages, with cache effects, and CLS has an excess of zeros. Real 404 traffic has bots, daily cycles and bursts, so it is overdispersed relative to Poisson and the independent-window false-alarm numbers are optimistic. The page uses the published metric thresholds but is an educational model, not a monitoring tool.

Running p75 vs sample size with the 95 % band
Chance of a wrong label vs sample size
404 hits per window: calm vs incident
Detection vs false alarms for every threshold
Made with 🟠 Blender · Three.js