Skip to main content

Guide: detect significant change between two periods

Goal: decide whether a movement in a metric is statistically meaningful or just noise.

Steps​

  1. Get the two datapoints you want to compare — for example the same brand and metric at two dates — from an analysis execute result. Each date in the result cube gives you the volume, score and component perspectives that a significance test needs.
  2. Send them to the significance test endpoint with a confidence level.
  3. Read the per-score-type verdict.

Request​

{
"meta": { "version": "v1" },
"data": {
"metric": "buzz",
"percent": 95,
"baseline_datapoint": { "metric": "buzz", "date": "2024-01-01", "volume": 506, "score": 3.52, "positives": 11.21, "negatives": 7.70, "neutrals": 72.43, "positives_neutrals": 83.64, "negatives_neutrals": 80.12 },
"test_datapoint": { "metric": "buzz", "date": "2024-02-01", "volume": 521, "score": 4.93, "positives": 11.81, "negatives": 6.88, "neutrals": 67.75, "positives_neutrals": 79.56, "negatives_neutrals": 74.63 },
"alias": "jan-vs-feb"
}
}

POST to /v1/analyses/significance-test.

Reading the result​

Each score type returns 1 (significant increase), -1 (significant decrease) or 0 (no significant change). Use the score type that matches how you report the metric.

Doing many at once​

To test a whole batch (e.g. every brand in a category), send a list of tests to /v1/analyses/significance-tests and match results by alias.