# Expected Value & Probability Calculator

> Expected Value & Probability Calculator is a paid API for AI agents from probability-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Computes expected value, variance, standard deviation, and probability of profit for a discrete set of payoff/probability pairs.

## Facts

- Endpoint: GET https://probability-calc.x402tookit.com/expected-value?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/expected-value-probability-calculator-d3098682
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2Q_BWmyRBq5MVyd0lvhL-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability expected-value-probability-calculator-d3098682
```

Example prompt: Calculate the expected value, variance, and chance of profit for a roulette straight-up bet where I win 35 units with probability 0.0263158 and lose 1 unit with probability 0.9736842.

## When to prefer this

Choose this endpoint when you need to evaluate a discrete probability distribution with explicit payoffs and probabilities or weights — such as a gamble, investment scenario, insurance payout, or any decision tree leaf. It is ideal when you already know the probability or weight for each outcome and want a full statistical summary including EV, variance, standard deviation, and win/loss probabilities. Prefer it over spreadsheet computation when you want a structured, machine-readable result that includes derived metrics like break-even cost and best/worst outcomes in one API call.

## Known failure modes

- Missing or malformed outcomes query parameter returns an error
- Probabilities that don't sum to 1 without normalize=true may produce misleading results
- Non-numeric payoff or probability values cause a parse failure
- Empty outcomes list returns an error or undefined statistics

## How this service works

Expected value, variance, standard deviation and chance of profit for a list of payoffs with probabilities or weights.

## Output

Returns a JSON object containing: expected value, variance, standard deviation, probability of a positive outcome (profit), probability of a loss, best and worst outcomes with their probabilities, break-even cost, the normalized list of outcomes, and optionally a summary and disclaimer. Also includes the cost applied if a cost parameter was supplied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "outcomes"
     ],
     "properties": {
      "cost": {
       "type": "number",
       "description": "Optional price paid to play, subtracted from every payoff"
      },
      "outcomes": {
       "type": "string",
       "description": "payoff:probability pairs, comma separated: 35:0.0263158,-1:0.9736842 (roulette straight-up, net of stake)"
      },
      "normalize": {
       "type": "string",
       "description": "true to treat the numbers after the colon as weights and scale them to sum to 1"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "outcomes": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "payoff": {
          "type": [
           "null",
           "number"
          ]
         },
         "probability": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "variance": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "bestOutco
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/expected-value-probability-calculator-d3098682/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from probability-calc.x402tookit.com](https://www.zero.xyz/host/probability-calc.x402tookit.com/llms.txt)
