Skip to content
moxon home

Statistics

The /statistics endpoint calculates descriptive statistics on a list of numbers.

gethttps://api.moxon.dev/v4/statistics

How it works?

All measures are computed on the full population (not a sample). variance and stddev use population formulas (divide by N). mode returns all values tied for the highest frequency. mean, median, variance, and stddev are rounded to 6 decimal places.

Try itget/v4/statistics

Parameters

  • valuesstringrequired

    Comma-separated list of numbers (max 1000 values)

Response Fields

  • countnumber

    Number of values

  • sumnumber

    Sum of all values

  • minnumber

    Minimum value

  • maxnumber

    Maximum value

  • rangenumber

    Difference between max and min

  • meannumber

    Arithmetic mean

  • mediannumber

    Median value

  • modenumber[]

    Most frequent value(s)

  • variancenumber

    Population variance

  • stddevnumber

    Standard deviation

mean, median, variance, and stddev are returned with up to 6 decimal places of precision.

Code Examples

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a comma-separated list of numbers (?values=…)The values parameter is missing or invalid