Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

reference_class

Report empirical counts and a declared Beta-Binomial outside view.

Contract

Unresolved cases are not failures. No resolved cases produces null empirical_rate while the prior-driven posterior remains available. Comparability and exchangeability are caller assumptions.

Fields

FieldTypeRequired
alphanumberYes
betanumberYes
classReferenceClassYes
op"reference_class"Yes

This operation needs no existing question or forecast. Use --memory for a calculation-only session.

Request

Send this object on one line. It is expanded below for readability.

{
  "version": 1,
  "id": "example",
  "command": {
    "op": "reference_class",
    "class": {
      "definition": "comparable releases",
      "inclusion_rule": "all registered attempts",
      "source": "supplied:reference",
      "observed_from": 0,
      "observed_through": 10,
      "successes": 12,
      "failures": 28,
      "unresolved": 2,
      "transfer_concerns": [
        "team composition changed"
      ]
    },
    "alpha": 1.0,
    "beta": 1.0
  }
}

Response

This response is generated by executing the example against the current binary. Commit timestamps, when present, are shown as <runtime UTC seconds>; the actual protocol returns integer UTC seconds.

{
  "version": 1,
  "id": "example",
  "result": {
    "empirical_rate": 0.3,
    "posterior_alpha": 13.0,
    "posterior_beta": 29.0,
    "posterior_mean": 0.30952380952380953,
    "posterior_variance": 0.004970205136318093,
    "resolved": 40,
    "transfer_concerns": [
      "team composition changed"
    ],
    "unresolved": 2
  }
}

Verification

The documentation gate executes the setup and request, then checks the following result fields against independently specified expectations:

JSON pointer within resultExpected
/empirical_rate0.3
/posterior_mean0.30952380952380953
/unresolved2

Float comparisons use a 1e-12 tolerance. Request schema validation and cross-record validation still apply. See errors and recovery for failure handling.