Numbers math stats summary
Exactnumbers_math_stats_summaryDeterministic and authoritative — the canonical answer for this input.
Summary statistics for a list of numbers: n, sum, mean, median, mode (+ full modes list), variance, stdev, min, max, range, configurable percentiles (default 25/50/75 with linear interpolation matching NumPy), and IQR. Use for quick numeric audits without leaving the envelope contract.
Parameters
valuesarrayrequiredpercentilesarrayoptionalPercentiles to report, 0-100. Defaults to [25, 50, 75].
Call it
curl -X POST https://api.snipget.ai/v1/numbers/math/stats-summary \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"values":[2,4,4,6,8]}'Example response
{
"n": 5,
"sum": 24,
"mean": 4.8,
"median": 4,
"mode": 4,
"modes": [
4
],
"variance": 5.2,
"stdev": 2.280350850198276,
"min": 2,
"max": 8,
"range": 6,
"percentiles": {
"p25": 4,
"p50": 4,
"p75": 6
},
"iqr": 2
}FAQ
What do I get back from one call?
A full snapshot of a list of numbers: count, sum, mean, median, mode, variance, standard deviation, min, max, range, the 25th/50th/75th percentiles, and the interquartile range. One call replaces a column of spreadsheet formulas.
What does the mode field do when several values tie?
The single mode field gives the first most-frequent value, and a separate modes list shows all of them. So a set with two equally common values reports both in modes rather than silently picking one or failing.
Can I choose my own percentiles?
Yes. Leave it out for the default 25/50/75, or pass a percentiles list like [10, 90] for the values you care about. Percentiles use linear interpolation, the same method NumPy uses by default.
Are the numbers exact?
Yes, every statistic is computed deterministically, so the same list always returns the same authoritative values. Standard deviation and variance are left empty for a single-value list since they need at least two numbers.
What if my list has non-numbers or is empty?
You get a result flagged is_valid false with a why_invalid reason and confidence 0, rather than an error, so a stray text value in the list fails cleanly instead of breaking the call.