Expected Value and Decision Tree Calculator
List outcomes with probabilities to get E(X), variance and fairness, then build a decision tree and roll it back to find the choice with the best expected payoff.
Працює у вашому браузері. Ваші файли ніколи не залишають пристрій. Дізнатися, як це перевірити
…
Як користуватися
- 1Enter outcomes
In Expected value, list each outcome with its probability and value.
- 2Check the totals
Make sure the probabilities add up to 1 and read E(X), the variance and the standard deviation.
- 3Test fairness
Type the cost to play to see the expected gain per game and over 100 games.
- 4Build the tree
In Decision tree, tap a node and add decision, chance or end branches with probabilities, costs and payoffs.
- 5Read the roll-back
Follow the node values and the step list from the end points to the root to find the best plan.
- 6Save and print
Save the problem to history, print the working or export the table and tree as CSV.
Про цей інструмент
Expected value is the long-run average of a random payoff: multiply each outcome by its probability and add. It decides whether a dice game is fair, how much an insurer should charge and which of several risky options a business should take. This tool covers both halves of the topic as students meet it. The first tab is an outcome table where probabilities can be typed as decimals, fractions or percentages; it shows p·x and p·x² for every row, the expected value, variance and standard deviation, and checks whether a game with a given cost to play is fair. The second tab is a decision tree editor. Add decision nodes (squares), chance nodes (circles) and end points (triangles), put costs on branches and payoffs at the ends, and the tree is rolled back automatically: chance nodes take the probability-weighted average and decision nodes keep the best branch. Rejected branches are marked, and the best plan is spelled out step by step.
Who this is for
Statistics students working on discrete random variables, business and economics students meeting decision analysis, A-level and IB decision maths, and anyone comparing options whose results depend on chance.
Formulas used
For a discrete random variable, E(X) = Σ x·P(x) and E(X²) = Σ x²·P(x), so Var(X) = E(X²) − [E(X)]² and the standard deviation is its square root. The probabilities must add up to 1, and the tool warns when they do not. For a game that costs c to play, the expected gain per play is E(X) − c; the game is fair when that is zero, and over many plays the average result approaches it.
Rolling back a decision tree
Work from the end points back towards the root. An end node is worth its payoff. A chance node is worth the sum of probability × value over its branches. A decision node is worth the best of its branches: the largest for profits or the smallest when the tree is set to minimise cost. Any cash written on a branch, such as the cost of a survey or a launch, is added as you pass through it. The branches not chosen at each decision are marked with a double bar, the usual textbook convention.
Worked example
A company can launch a product now for 50,000. Demand is strong with probability 0.4, earning 200,000, or weak, earning 20,000. The chance node is worth 0.4 × 200,000 + 0.6 × 20,000 = 92,000, so launching is worth 92,000 − 50,000 = 42,000. Testing the market first costs 10,000; a positive test (probability 0.45) raises the chance of strong demand to 0.75, so launching after it is worth 105,000, and after a negative test the firm stops. The test route is worth −10,000 + 0.45 × 105,000 = 37,250. Doing nothing is worth 0, so the best plan is to launch straight away, with an expected value of 42,000.
Limits
Expected value ignores attitude to risk: a choice with a slightly lower expected value but far less spread may be wiser. The tool does not compute utilities, Bayesian revisions of probabilities or the value of perfect information automatically; you enter the probabilities on each branch yourself.
Приклад із розв'язанням
Win 10 with p = 1/6, win 2 with p = 2/6, else 0: E(X) = 2.3333. At a cost of 3 per play the game loses 0.67 on average.
Коротко
- Категорія: Математика та наука
- Працює в браузері, без реєстрації й завантаження.
- Введені вами дані залишаються на пристрої.
- Доступно англійською.
- Вміст востаннє перевірено:
- Офіційне джерело: OpenStax Introductory Statistics 2e, section 4.2 Mean or Expected Value and Standard Deviation
Поширені запитання
What does an expected value of 2.33 mean if no outcome is 2.33?
It is a long-run average, not a single result. If you played many times, your average winnings per game would get close to 2.33.
How do I know if a game is fair?
Enter the cost to play. If the expected winnings equal the cost, the expected gain is zero and the game is fair; a negative gain means the organiser profits in the long run.
Can I type probabilities as fractions?
Yes. 1/6, 0.1667 and 16.67 % are all accepted. Fractions avoid rounding errors when probabilities must add up to exactly 1.
Where do costs go in a decision tree?
Put a cost as a negative amount on the branch where it is paid, such as −10,000 on the branch "Run a survey". Payoffs at the end points are the final results of each path.
What do the double bars on branches mean?
They mark branches rejected at a decision node because another branch has a better rolled-back value. The thick branches show the recommended plan.
Can I keep several homework trees?
Yes. Save to history stores the outcome table and the whole tree on this device, and you can restore any saved problem later.
