Metric and sample-size movement
real_or_samplingTest whether a metric's latest departure persists after adjusting for its historical association with sample size, separating real change from sampling artifact when denominator data exist.
Instructions
Review whether the latest numeric metric departure persists after accounting for its historical linear association with measurement sample size. Use when both a dashboard metric and its coverage denominator are available; without a known denominator this check does not apply. Requires at least ten aligned pairs; shorter valid arrays return NOT_ENOUGH_HISTORY. The latest pair is excluded from the historical fit. Returns verdict, assessment, reading and, when estimable, metric_delta in input units, standardized departures, sample_size_change_pct as a percent of the historical median, fit and departure_after_conditioning. Prefer assessment/validity over legacy REAL or SAMPLING_ARTIFACT labels: linear association neither proves a sampling cause nor excludes confounding. Constant or weakly related histories can return UNCLEAR and null standardized values. Unequal array lengths or nonpositive sample sizes return a tool error.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"values": "<values>",
"sample_sizes": "<sample_sizes>"
},
"name": "real_or_sampling"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Chronological metric readings in consistent units, one per sample_sizes entry. At least 10 aligned pairs are needed; all earlier pairs form the reference for the latest reading. | |
| sample_sizes | Yes | Positive measurement denominators aligned one-for-one with values. Equal array length is required. Zero coverage is missing data, not a valid denominator; economic trading volume is not measurement coverage. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | Historical linear association, when estimable. | |
| error | No | Validation or computation failure message; inspect MCP isError or the HTTP status. | |
| method | No | Descriptive denominator-conditioning method. | |
| caveats | No | Ordered statements or identifiers. | |
| n_pairs | No | Number of aligned metric/measurement-denominator pairs. | |
| reading | No | Explanation and limits of the result. | |
| verdict | No | Legacy descriptive result code. | |
| validity | No | Descriptive assessment, not a probability or statistical certificate. | |
| guarantee | No | No statistical or market-performance guarantee is made. | |
| is_causal | No | Association does not establish causality. | |
| assessment | No | Preferred interpretation of the legacy verdict. | |
| metric_now | No | Latest metric in input units. | |
| metric_delta | No | Latest metric minus historical median, in input units. | |
| sample_size_now | No | Latest declared measurement denominator. | |
| metric_departure | No | Robust standardized latest metric departure. Null means unavailable or not applicable, never zero. | |
| sample_size_departure | No | Robust standardized denominator departure. Null means unavailable or not applicable, never zero. | |
| zero_reference_spread | No | Historical metric MAD is zero. | |
| sample_size_change_pct | No | Denominator change as percent of its historical median. | |
| denominator_extrapolation | No | Latest denominator falls outside the historical range. | |
| departure_after_conditioning | No | Robust standardized latest residual after linear conditioning. Null means unavailable or not applicable, never zero. |