Each of the 42 beds streams a noisy heart-rate reading. Normal patients fluctuate around a baseline μn = 75 bpm; critical patients run hotter around μc = μn + Δμ. Both are corrupted by sensor/physiological noise, modelled as an Ornstein–Uhlenbeck process:
dv = k(μ − v) dt + σ√dt · N(0,1)
alarm fires when v(t) > θ
Because the two populations' bell curves overlap, no threshold θ is perfect — this is classic signal-detection theory. For two Gaussians of equal spread the analytic detection rates are:
Sensitivity = 1 − Φ((θ − μc) / σ_eff)
Specificity = Φ((θ − μn) / σ_eff)
Youden's J = Sensitivity + Specificity − 1, maximised at θ* ≈ (μn + μc) / 2
Corrected from the 3D source: an OU process with relaxation rate k does not settle to a standard deviation equal to its input noise σ — its stationary spread is σ_eff = σ / √(2k). We verified this numerically (a 2,000,000-step discretised simulation of the ward's own update rule gave an empirical std of ≈4.85 bpm for σ=6, k=0.9, against a naive prediction of 6 and a σ/√(2k) prediction of ≈4.47 — the naive value is off by ~24%). The 3D sim's "How it works" text used raw σ in the Sensitivity/Specificity formulas; this build uses σ_eff so the drawn Gaussian curves and their analytic detection rates actually line up with the live simulated ward instead of silently overstating both curves' spread. The Youden optimum θ* = (μn+μc)/2 is unaffected, since it only assumes equal variance, not a particular value.
Push θ low and every critical patient is caught (high sensitivity) but normal patients trigger constantly — the false-alarm rate that causes real-world alarm fatigue and desensitised staff. Push θ high and false alarms vanish but real deteriorations get missed. The "Set optimal θ" button jumps straight to the equal-variance Youden optimum given the current μn, μc; the live confusion matrix is an exponentially-weighted running estimate sampled from the ward every frame, so it settles onto the analytic curve within a few seconds.