In this guide
Key takeaways
- Z-score = (reading − rolling mean) ÷ rolling standard deviation. It turns any series into “how unusual is this, for this series?”
- The window is a memory. Longer windows flag fewer readings, but a genuine outlier after a quiet stretch scores higher.
- The window counts observations, not days: 72 hourly readings cover three days, 90 daily readings about three months.
- The 68–95–99.7 rule assumes normally distributed data. Attention data has fat tails: in our sample, Bitcoin scored above 3 on 3% of days, not 0.13%.
- Log scaling before the Z-score tames giant spikes, and can change which day stands out.
The formula, in plain terms
A Z-score answers one question: compared with its own recent past, how unusual is this reading? It takes three steps. Average the readings in a window, measure how spread out they are, then express today's distance from the average in units of that spread.
z = (x − μ) ÷ σ
x the current reading
μ the average of the last N readings
σ their standard deviationA worked example with a window of five readings, the last one being today:
| Step | Value |
|---|---|
| Readings | 10, 12, 11, 13, 24 |
| Mean (μ) | 70 ÷ 5 = 14 |
| Squared distances from the mean | 16, 4, 9, 1, 100, which sum to 130 |
| Standard deviation (σ) | √(130 ÷ 5) = 5.10 |
| Z-score of today's 24 | (24 − 14) ÷ 5.10 = 1.96 |
Today's reading is almost two standard deviations above its recent average: unusual, but not extreme. The same reading after a calmer stretch would score higher, because the average and the spread would both be smaller.
Reading a Z-score
The sign says which side of average a reading is on; the size says how far. If a series were normally distributed, the shares of readings beyond each level would follow the familiar 68–95–99.7 rule.
| Z-score | Reads as | Share above it, if data were normal |
|---|---|---|
| 0 | Average for this series | 50% |
| +1 | Somewhat high | 15.9% |
| +2 | Unusually high | 2.3% |
| +3 | Rare | 0.13% |
The window decides the baseline
The window is how much history counts as “recent”. A short window forgets quickly: after a few loud weeks, loud becomes normal and further spikes score lower. A long window remembers quiet months, so a burst of attention after a calm stretch stands out more and scores higher. The figure at the top of this guide shows the same series under three windows.
| Window | Highest Z-score | Days above 2 | Upward crossings of 2 |
|---|---|---|---|
| 30 days | 4.38 on 11 Jul 2025 | 37 | 14 |
| 90 days | 5.34 on 6 Feb 2026 | 29 | 12 |
| 180 days | 6.77 on 6 Feb 2026 | 23 | 8 |
Longer windows produce fewer crossings of 2, but higher peaks. Neither is more correct; they answer different questions. A 30-day window asks whether attention is unusual for the last month, a 180-day window whether it is unusual for the last half-year.
Because the window counts observations rather than calendar days, the same number means different spans on different timeframes. Sentalysis uses 72 observations for hourly and 4-hour data, 90 for daily, 52 for weekly and 24 for monthly, so each default covers a sensible stretch of time.
When to use log scaling
Attention series are spiky: long quiet stretches broken by sudden surges. One giant spike inflates the standard deviation for as long as it stays in the window, which makes everything after it look tame. Taking ln(1 + x) before the Z-score compresses large values, so spikes count for less and the rest of the series counts for more.
The effect can be large. On a log scale, Bitcoin attention's highest 90-day Z-score drops from 5.34 to 3.75, and it moves from 6 February 2026 to 11 July 2025. The log view is a better fit when you care about sustained shifts; the linear view when you care about the size of the largest surges.
Try it on real data
The lab below shows the same Z-score view as the platform, on recorded data. Drag the window, switch keywords, or turn on log scaling, and watch which days light up.
- Highest Z-score
- 5.34 on 6 Feb 2026
- Days above +2
- 29 of 435
- Upward crossings of +2
- 12
Recorded daily data, 1 July 2025 to 8 September 2026 (Binance BTC/USDT). Candles are colored by the attention Z-score, fully bright from +2. The price never changes; only the baseline the attention reading is compared with does.
Common mistakes
- Comparing Z-scores from different windows. A 3 on a 30-day window and a 3 on a 180-day window are different statements.
- Treating +2 as a signal. It means unusual for this series and this window, nothing more. Attention has no direction.
- Forgetting the warm-up. The first value needs a full window of history, so the start of a series has no Z-score at all.
- Ignoring regime changes. After a long quiet period, even a modest rise can score highly. Check the raw level too.
Z-scores in Sentalysis
Every keyword and custom index on the sentiment charts can be viewed as a rolling Z-score, with or without log scaling, and colors each candle by the result. The same calculation drives data alerts, so an alert set to cross above 2 fires on exactly the readings you see. For the full method, see the methodology, or read how these numbers played out in the Bitcoin attention study.
FAQ
Questions and answers
What is a Z-score?
A Z-score expresses a reading as its distance from an average, in standard deviations. A rolling Z-score uses the average and spread of the most recent N readings, so it answers how unusual a value is for that series right now.
What Z-score threshold should I use?
±2 is a common starting point for 'unusual', but it depends on the series and the window. Attention data has fat tails, so readings above 2 happen more often than the normal curve suggests; check how often your chosen level was crossed in the past before relying on it.
What window should I use for a Z-score?
Match it to your question. A short window flags anything new compared with the last few weeks; a long one only flags readings that are rare over months. Sentalysis defaults to 90 daily observations, 72 for hourly and 4-hour data, 52 weekly and 24 monthly.
Why do two charts show different Z-scores for the same day?
Usually because the windows, the timeframes or the log setting differ. The window counts observations, so 90 daily readings and 90 hourly readings cover very different periods.
Can a Z-score predict crypto prices?
No. It measures how unusual a reading is, not what will happen next. A high attention Z-score can accompany a rally, a crash or simple curiosity.