← All procedures

statistics.pairInformation

The expected information of a pick between two items: `p * (1 - p) * (ua^2 + ub^2)`. Here `p` is `eloExpected` of the two ratings, and `ua` and `ub` are the uncertainties. The value is high when the result is not sure (a `p` near 0.5) and the two ratings are not sure.

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

From the command line

$ mark statistics pairInformation --a <object> --b <object>

As data, in a program

{
  "$proc": ["statistics", "pairInformation"],
  "input": { "a": {}, "b": {} }
}

Input

FieldTypeRequiredDefaultDescription
aobjectyes
bobjectyes
optionsobjectno

Output

The schema does not list fields (number).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "a": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The key of the item. Each key occurs one time in a pool. A second item with the same key does not count."
          },
          "rating": {
            "type": "number",
            "description": "The rating, on the Elo scale of the options."
          },
          "se": {
            "type": "number",
            "description": "The standard error of the rating, in rating points, or `undefined` when the model gives none."
          },
          "picks": {
            "type": "number",
            "description": "The number of picks of the item."
          }
        },
        "required": [
          "id",
          "rating",
          "picks"
        ],
        "additionalProperties": {}
      },
      "b": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The key of the item. Each key occurs one time in a pool. A second item with the same key does not count."
          },
          "rating": {
            "type": "number",
            "description": "The rating, on the Elo scale of the options."
          },
          "se": {
            "type": "number",
            "description": "The standard error of the rating, in rating points, or `undefined` when the model gives none."
          },
          "picks": {
            "type": "number",
            "description": "The number of picks of the item."
          }
        },
        "required": [
          "id",
          "rating",
          "picks"
        ],
        "additionalProperties": {}
      },
      "options": {
        "type": "object",
        "properties": {
          "center": {
            "type": "number",
            "description": "The rating of the log-strength 0. The default is 1500. Elo uses only differences, so it does not read it."
          },
          "scale": {
            "type": "number",
            "description": "The number of points that gives odds of `base` to 1. The default is 400."
          },
          "base": {
            "type": "number",
            "description": "The base of the odds. The default is 10."
          }
        },
        "additionalProperties": {}
      }
    },
    "required": [
      "a",
      "b"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "number"
  }
}