← All procedures

statistics.summarize

No description.

CLI
Package
@procedures/statistics · README
Path
["statistics","summarize"]
CLI
mark statistics summarize --values <number[]>
As data
{"$proc":["statistics","summarize"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/statistics/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["statistics","summarize"], { values: [] });
console.log(JSON.stringify(result));

From the command line

$ mark statistics summarize --values <number[]>

As data, in a program

{ "$proc": ["statistics", "summarize"], "input": { "values": [] } }

Input

FieldTypeRequiredDefaultDescription
valuesnumber[]yes

Output

FieldTypeRequiredDefaultDescription
nnumberyes
meannumberyes
sdnumberyesThe sample standard deviation, or NaN for one value.
minnumberyes
q1numberyesThe 0.25 quantile.
mediannumberyes
q3numberyesThe 0.75 quantile.
maxnumberyes
iqrnumberyesThe interquartile range: q3 - q1.
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "values": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "required": [
      "values"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "object",
    "properties": {
      "n": {
        "type": "number"
      },
      "mean": {
        "type": "number"
      },
      "sd": {
        "type": "number",
        "description": "The sample standard deviation, or NaN for one value."
      },
      "min": {
        "type": "number"
      },
      "q1": {
        "type": "number",
        "description": "The 0.25 quantile."
      },
      "median": {
        "type": "number"
      },
      "q3": {
        "type": "number",
        "description": "The 0.75 quantile."
      },
      "max": {
        "type": "number"
      },
      "iqr": {
        "type": "number",
        "description": "The interquartile range: q3 - q1."
      }
    },
    "required": [
      "n",
      "mean",
      "sd",
      "min",
      "q1",
      "median",
      "q3",
      "max",
      "iqr"
    ],
    "additionalProperties": {}
  }
}