Your per-user download threshold came from four weeks of data and now fires every quarter-end. Why?
answer
- the sample defines what normal means
- the window must span the cycle
- compare quarter-end with previous quarter-ends
- a predictable busy period is a hiding place
- re-deriving can bake in the ramp
basics
~10 sThe baseline window never contained a quarter-end, so the rule encoded four ordinary weeks as the definition of normal. A threshold derived from a period is only valid for periods that look like it.
solid answer
~50 sA count baseline learns whatever the sampling window happened to contain. Four weeks of ordinary activity produces a threshold that treats every predictable spike — quarter-end reporting, the annual audit pull, an onboarding week, month-end close — as unprecedented. The fix is not a higher number, because raising it globally reopens the gap the baseline existed to close. Either derive over a window that spans the longest cycle you care about, or compare like with like: this account today against the same account on previous quarter-ends, or on the same weekday. Then keep the rule honest on those days rather than blind: a widened expectation for the known busy period, with an absolute cap still live, so an adversary who knows quarter-end is noisy cannot simply choose that week. And re-derive on a schedule, from a period you have some reason to believe is clean.
go deeper
Be ready to say that a threshold only describes the period it was derived from, so a cycle longer than the sampling window will always look unprecedented when it comes around.
Explain the alternatives concretely: a derivation window spanning the cycle, or a comparison conditioned on the period so quarter-end is judged against previous quarter-ends rather than against ordinary Tuesdays.
Demonstrate the adversarial reading — a predictable busy period is an advertised hiding place, so the allowance is scoped to the entities the season explains and an absolute cap stays live throughout.
Own the lifecycle: who re-derives thresholds, on what schedule, from which period, and how the organisation avoids quietly absorbing a slow increase into successive baselines as the new normal.
## What actually went wrong A derived threshold is a summary of a sample. If the sample is four consecutive ordinary weeks, the summary describes ordinary weeks, and any recurring event with a period longer than four weeks is outside it by construction. Quarter-end reporting, month-end close, the annual audit, an offsite, a product launch, term start in a university, open enrolment in a benefits system — every estate has cycles, and a baseline window shorter than the cycle guarantees the cycle looks like an anomaly, forever, on schedule. This is a distinct failure from cold start. Cold start is an *empty* baseline. Seasonality is a *full* baseline built from an unrepresentative period. Both produce floods, but the cure is different: cold start needs time, seasonality needs a longer or better-structured window. ## Three ways to handle a cycle **Widen the derivation window.** The simplest fix: derive the threshold over a period that contains at least one, preferably several, instances of the cycle. A year of history to catch a quarterly pattern. The cost is that a long window blurs genuine drift — a team that doubled in size six months ago is still being compared against its smaller self — so long windows usually need decay or periodic re-derivation. **Compare like with like.** Rather than one threshold per entity, hold a baseline conditioned on the period: this account on quarter-end days against this account on previous quarter-end days; this account on a Monday against its own Mondays. This handles the cycle without discarding sensitivity on ordinary days, and it is often cheap, because the conditioning is a grouping key rather than a model. **Handle it as a known exception.** Where the cycle is driven by a small, identifiable group — a finance team, a reporting service account — the honest answer may be that those entities need their own logic or their own thresholds, not that the whole rule needs loosening. Do not let one predictable department set the sensitivity for the other ten thousand accounts. ## The trap: do not go blind on the busy day Seasonal handling has an adversarial edge that a purely statistical treatment misses. A predictable busy period is an advertised hiding place. If quarter-end raises everyone's expected volume by a factor of five and nothing else changes, the sensible move for someone collecting data is to do it at quarter-end. So the widened expectation should not be an off switch: - keep an absolute cap live regardless of the period, so *some* volume is always remarkable; - keep the qualifying conditions live — an unfamiliar client, a session from an address the account has never used, activity by an account with no business reason to be in the cycle; - and check *who* is spiking. Finance spiking at quarter-end is expected; an engineer in a different business unit spiking on the same day is not covered by the seasonal explanation at all, even though the calendar says it is a busy period. That last check is the one candidates most often miss. A seasonal allowance should apply to the entities the season actually explains, not to everybody who happens to share the date. ## Re-derivation, and the poisoned window Baselines age. Headcount changes, a new application rolls out, a team adopts bulk export, a service is retired. A threshold derived once and never revisited drifts into either constant noise or complete silence, and silence is the failure you will not notice. So re-derivation belongs on a schedule with an owner. But re-derivation carries its own hazard: if you rebuild the baseline from a rolling recent window and that window contains the activity you were trying to detect, you have just taught the rule that the activity is normal. A slow ramp is particularly good at this, because each refresh only has to absorb a small increase. Two defences: prefer to rebuild from a period you have some evidence was clean, and keep at least one long-horizon comparison — total volume this quarter against the same quarter last year — that a gradual ramp cannot escape by being gradual. ## The interview answer Name the cause in one sentence: the derivation window did not contain the cycle, so the rule learned an unrepresentative normal. Offer the like-for-like comparison as the better fix over simply raising the number. Then add the adversarial half — that a known busy period is a known hiding place, so seasonal allowance widens the expectation for the entities the season explains and never turns the rule off — and the re-derivation hazard of baking recent malicious activity into the new normal.
- Would raising the threshold so quarter-end stops firing be an acceptable fix?Not on its own. It buys quiet for two days a quarter and gives away sensitivity on the other eighty-eight, which is the exact headroom a per-entity baseline was introduced to remove. Condition the comparison on the period instead, so ordinary days keep their tighter expectation and quarter-end is judged against previous quarter-ends.
- Finance spikes at quarter-end and so does an engineer in an unrelated team. Does the seasonal allowance cover both?Only finance. The seasonal explanation applies to the entities whose work causes the cycle, not to everyone who shares the calendar date. Scoping the allowance by entity population keeps the busy period from becoming a free pass, and the unexplained spike stays visible on the day it is most likely to be attempted.
- How often should a derived threshold be recomputed?On a stated schedule with an owner — estates drift as headcount, tooling and workflows change, and a stale threshold fails silently. Recompute from a period you have reason to believe is clean, and keep one long-horizon comparison against the equivalent period a year earlier, so a gradual increase absorbed by successive refreshes still shows up somewhere.
saying these in an interview costs you the question
- Raises the threshold globally so the seasonal spike stops firing
- Assumes four weeks of data represents a whole year
- Applies the seasonal allowance to every account sharing the date
- Turns the rule off entirely during known busy periods
- Rebuilds the baseline from a window that includes the suspicious activity