Back to the sign

The math behind the panic

Every number on the main page comes from the formulas below, run in your browser on the current alarm log. Numbers in yellow are live. No AI, no servers, just a probability model that has seen some things.

1 Alarms as random arrivals

Start simple. If alarms happen independently at an average rate r per day, the number of alarms N in t days follows a Poisson distribution:

P(N=k)=e−rt(rt)kk!

The chance of at least one alarm is one minus the chance of none:

P(N≥1)=1−e−rt

Two problems: we don't know r, and the alarm clearly prefers some hours over others. Steps 2 and 3 fix those.

2 How often? A Gamma belief about the rate

Instead of pretending to know r, the model keeps a whole Gamma distribution of plausible rates, with shape α and rate β:

p(r)∝rα−1e−βrmean rate=αβ

Read α as "alarms seen" and β as "days watched". Before any data it starts from a mild hunch: alarm per days. Then each real alarm adds to α and each observed day adds to β, but older ones count less. With a half-life of h = days, something u days old has weight 2−u/h:

α=α0+∑i2−ui/hβ=β0+∫0T2−u/hdu
AlarmAge u (days)Weight

Right now: α = , β = days, so the model expects about one alarm every days.

3 When? Hour and weekday shapes

Alarms aren't spread evenly, so the rate becomes a function of time. That makes this a non-homogeneous Poisson process:

λ(t)=r·H(hour of t)·D(weekday of t)

Each past alarm drops a small Gaussian bump on the clock, wrapping round so 11pm sits next to midnight. A flat layer of imaginary alarms keeps one weird night from becoming a prophecy. Both curves are scaled to average exactly 1, so they move the odds around the week without changing the total.

H(j)∝k24+∑i1Ziexp(−d(j,hi)22σ2)
Hour-of-day multiplier H Above 1 = riskier than average
Weekday multiplier D

4 Putting it together

For any window, add up how risky each moment is. That's the exposure Λ, measured in "average days":

Λ=∫t0t1H(t)D(t)dt

Averaging the Poisson chance of zero alarms over every plausible rate in the Gamma belief has a neat closed form:

P(N=0)=∫0∞e−rΛp(r)dr=(ββ+Λ)α

So for the next 24 hours, with Λ = :

P(alarm)=1−(+)=

That is the big number on the main page, shown between 1% and 99% because popcorn is never impossible. The full count distribution is a negative binomial. Here it is for the next 7 days:

    5 The other numbers

    "Next alarm predicted" is the moment the model gives even odds that the alarm has already gone off. Set the chance of zero alarms to ½ and solve for the exposure:

    (ββ+Λ*)α=12⟹Λ*=β(21/α−1)=

    Then it walks forward hour by hour, adding up the risk of each hour, until the exposure reaches that much: . Risky hours add up faster, so the prediction tends to land in the middle of the night.

    "Likely window" does the same for ¼ and ¾. The next alarm has a 50% chance of landing between and , a 25% chance of coming sooner and a 25% chance of coming later.

    FIRE-CON is just the 24-hour chance in buckets: 5 under , 4 under , 3 under , 2 up to , and 1 above that.

    6 Is it any good? The backtest

    For every past day, the model is refitted using only the alarms before that day, makes a forecast pd, and gets scored against what happened (od = 1 for an alarm, 0 for none). The Brier score is the average squared miss, so lower is better:

    B=1n∑d=1n(pd−od)2skill=1−BBbaseline

    The baseline is the lazy version of the same model: one constant rate, no memory loss and no clock shape.

    7 Honest caveats