statistics.optionFloor
This function gives the smallest count of values for each of two options. With it, one test finds a difference of `delta` with the stated power. The form is `n = 2 ((t(1 - alpha / (2 tests), df) + t(power, df)) sigma / delta)^2`, with `df = 2 n - 2`. The count is on both sides of that form, so the function takes the first count that meets it.
CLI- Package
- @procedures/statistics · README
- Path
["statistics","optionFloor"]- CLI
mark statistics optionFloor --options <object>- As data
{"$proc":["statistics","optionFloor"],"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","optionFloor"], { options: {} });
console.log(JSON.stringify(result));From the command line
$ mark statistics optionFloor --options <object>
As data, in a program
{ "$proc": ["statistics", "optionFloor"], "input": { "options": {} } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
options | object | yes | The spread, the difference, the family and the targets. |
Output
The schema does not list fields (number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"options": {
"type": "object",
"properties": {
"sigma": {
"type": "number",
"description": "The standard deviation of one value about the mean of its option. All options have the same value."
},
"delta": {
"type": "number",
"description": "The smallest difference between the means of two options that the comparison finds."
},
"tests": {
"type": "number",
"description": "The count of tests in the family. The level of each test is `alpha / tests`."
},
"alpha": {
"type": "number",
"description": "The two-sided level of the family. The default is 0.05."
},
"power": {
"type": "number",
"description": "The share of comparisons that find a difference of `delta`. The default is 0.8."
}
},
"required": [
"sigma",
"delta",
"tests"
],
"additionalProperties": {},
"description": "The spread, the difference, the family and the targets."
}
},
"required": [
"options"
],
"additionalProperties": false
},
"output": {
"type": "number"
}
}