{"uid":"cap_2Q_BWmyRBq5MVyd0lvhL-","slug":"expected-value-probability-calculator-d3098682","name":"Expected Value & Probability Calculator","description":"Expected value, variance, standard deviation and chance of profit for a list of payoffs with probabilities or weights.","url":"https://probability-calc.x402tookit.com/expected-value?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}},"bestOutcome":{"type":["null","object"],"properties":{"payoff":{"type":["null","number"]},"probability":{"type":["null","number"]}}},"costApplied":{"type":["null","number"]},"worstOutcome":{"type":["null","object"],"properties":{"payoff":{"type":["null","number"]},"probability":{"type":["null","number"]}}},"breakEvenCost":{"type":["null","number"]},"expectedValue":{"type":["null","number"]},"probabilityLoss":{"type":["null","number"]},"standardDeviation":{"type":["null","number"]},"probabilityPositive":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_k-xbRtJrDhAWG3ezFARrg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes expected value, variance, standard deviation, and probability of profit for a discrete set of payoff/probability pairs.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Evaluating a lottery ticket purchase","prompt":"I'm thinking about buying a $2 scratch ticket. There's a 1-in-10 chance of winning $5, a 1-in-50 chance of winning $20, and a 1-in-1000 chance of winning $500. The rest is a loss. Can you calculate the expected value and probability of coming out ahead, subtracting the $2 cost?"},{"title":"Analyzing a venture investment payoff","prompt":"I have an investment with three outcomes: 40% chance of a $0 payoff (total loss), 45% chance of a $50k return, and 15% chance of a $300k return. What's the expected value, variance, and standard deviation of this investment?"},{"title":"Comparing weighted scenario outcomes","prompt":"I have four business scenarios with relative likelihoods of 3, 5, 7, and 2 — and payoffs of -10000, 5000, 20000, and 50000 dollars respectively. Please normalize those weights to probabilities and tell me the expected value, standard deviation, and probability of profit."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:15:03.708Z","isFirstParty":false,"canonicalSlug":"expected-value-probability-calculator-d3098682"}