← All procedures

statistics.noiseVerdict

The noise rule of a difference (candidate minus baseline) over independent seeds or folds: the mean against max(k standard deviations, margin). With `better: "lower"`, a negative mean is the gain. When each value is equal, the state is "no-spread" and not a result, also when the mean is beyond the margin. Find out why the seeds do not change the value before you read the difference.

CLI
Package
@procedures/statistics · README
Path
["statistics","noiseVerdict"]
CLI
mark statistics noiseVerdict --values <number[]>
As data
{"$proc":["statistics","noiseVerdict"],"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","noiseVerdict"], { values: [] });
console.log(JSON.stringify(result));

From the command line

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

As data, in a program

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

Input

FieldTypeRequiredDefaultDescription
valuesnumber[]yes
optionsobjectno

Output

FieldTypeRequiredDefaultDescription
nnumberyesThe number of values.
meannumberyes
sdnumberyesThe sample standard deviation of the values.
spreadnumberyesk times the standard deviation.
marginnumberyes
thresholdnumberyesThe larger of `spread` and `margin`. The absolute mean must be above it.
state"gain" | "loss" | "no-spread" | "noise"yes
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "values": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "options": {
        "type": "object",
        "properties": {
          "k": {
            "type": "number",
            "description": "The number of standard deviations. The default is 2."
          },
          "minimum": {
            "type": "number",
            "description": "The fewest values (seeds or folds) that give a floor. The default is 5, the 5-seed rule."
          },
          "margin": {
            "type": "number",
            "description": "The margin of practical effect, in the units of the values. A difference that is real but smaller than the margin is too small to matter, so it is not a result. Give the reason of the margin from the problem of the user. The default is 0: no margin."
          },
          "better": {
            "type": "string",
            "enum": [
              "higher",
              "lower"
            ]
          }
        },
        "additionalProperties": {}
      }
    },
    "required": [
      "values"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "object",
    "properties": {
      "n": {
        "type": "number",
        "description": "The number of values."
      },
      "mean": {
        "type": "number"
      },
      "sd": {
        "type": "number",
        "description": "The sample standard deviation of the values."
      },
      "spread": {
        "type": "number",
        "description": "k times the standard deviation."
      },
      "margin": {
        "type": "number"
      },
      "threshold": {
        "type": "number",
        "description": "The larger of `spread` and `margin`. The absolute mean must be above it."
      },
      "state": {
        "type": "string",
        "enum": [
          "gain",
          "loss",
          "no-spread",
          "noise"
        ]
      }
    },
    "required": [
      "n",
      "mean",
      "sd",
      "spread",
      "margin",
      "threshold",
      "state"
    ],
    "additionalProperties": {}
  }
}