← All procedures

statistics.signTestPower

The smallest number of wins out of `n` that the sign test calls significant at `level`. It is undefined when even n wins out of n are not enough. Use it before a run, to know how many inputs a claim needs.

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

From the command line

$ mark statistics signTestPower --n <number>

As data, in a program

{ "$proc": ["statistics", "signTestPower"], "input": { "n": 1 } }

Input

FieldTypeRequiredDefaultDescription
nnumberyes
levelnumberno
sidesnumber | numberno

Output

The schema does not list fields (number | null).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "n": {
        "type": "number"
      },
      "level": {
        "type": "number"
      },
      "sides": {
        "anyOf": [
          {
            "type": "number",
            "const": 1
          },
          {
            "type": "number",
            "const": 2
          }
        ]
      }
    },
    "required": [
      "n"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": [
      "number",
      "null"
    ]
  }
}