By MCP Analytics Team | Published , updated
Compare two groups? Find what drives an outcome? Spot a trend? The question decides which statistics fit, so it is the first thing to get right.
The analyses filed under this question. Each card opens the analysis page, where you can run it on a file.
When did my metric shift?
How many customers churn and which plans or regions separate the ones who leave, with time to churn counting those still active.
How many customers come back after they first arrive, cohort by cohort, and whether newer cohorts retain better than older ones.
Is this process stable over time, and can it hold its specification?
Where a measure is heading from its own history, with a likely range, checked against recent periods the forecast was not shown.
Is there a seasonal pattern, and how big is it?
How long until customers cancel or machines fail, counting the ones it has not happened to yet: Kaplan-Meier curves, medians and hazard ratios.
Is this series really rising or falling rather than just moving around?
Where did actuals diverge from budget?
How risky is this series? Rolling volatility, drawdowns, and simple historical VaR.
The data. standard_trend_test_v2.csv, the published sample file for Trend test: 105 rows; columns week_start, store_id, weekly_orders, notes. Sample data, not a customer's.
The calculation. Python, standard library only. This exact code ran against the file when this page was built, and printed the output below it.
import csv
from datetime import date
rows = list(csv.DictReader(open("standard_trend_test_v2.csv")))
week = {}
for r in rows:
if r["week_start"] == "n/a" or not r["weekly_orders"]:
continue # undated or empty rows have no place in time
if r["week_start"] in week and r["notes"] != "restated":
continue # a repeated week keeps its restated figure
week[r["week_start"]] = float(r["weekly_orders"])
ds = sorted(week)
x = [(date.fromisoformat(d) - date.fromisoformat(ds[0])).days / 7
for d in ds]
y = [week[d] for d in ds]
mx, my = sum(x) / len(x), sum(y) / len(y)
slope = (sum((a - mx) * (b - my) for a, b in zip(x, y))
/ sum((a - mx) ** 2 for a in x))
s = sum((y[j] > y[i]) - (y[j] < y[i])
for i in range(len(y)) for j in range(i + 1, len(y)))
print(len(y), "weeks kept of", len(rows), "rows,", ds[0], "to", ds[-1])
print("least-squares slope:", round(slope, 2), "orders per week")
print("Mann-Kendall S:", s, "of", len(y) * (len(y) - 1) // 2, "pairs")
99 weeks kept of 105 rows, 2024-01-01 to 2025-12-22
least-squares slope: 0.73 orders per week
Mann-Kendall S: 4295 of 4851 pairs
What it says. The straight-line slope is 0.73 more orders each week, about 38 a year. The Mann-Kendall count agrees without assuming a straight line: of 4851 pairs of weeks, later weeks are higher in so many more pairs than lower (S = 4295) that a flat series would almost never produce it.
What it does not say. 6 rows were set aside: undated weeks, empty values, and the superseded copy of a restated week. Promotion weeks were kept; they sit above the line and pull it up a little. A rising trend says nothing about why, and it is not a forecast.
Run Trend test on this file or your own, or open its stored sample report.
Further reading on the method in the worked example. Each reference was looked up and its authors, title, year and venue confirmed between 27 October 2026 and 30 October 2026.
The stored sample report for Changepoint Detection. Each analysis has its own report layout; open its page to see what it returns.
Tell us what went wrong, in your own words. We capture the page you're on automatically, so no need to describe where you are.