A forecast becomes useful when it changes a decision
A plant must complete the same cooling cycle in one of two available windows. One model forecasts electricity price, another energy consumption. Multiplying their averages seems a natural scheduling rule. Yet price and consumption may move together: the cheaper scenario may require more energy. How can two correct forecasts, combined incorrectly, lead to the wrong choice?
Abstract. Analyze one discrete decision with two synthetic scenarios. Calculate scenario costs before expected cost, derive the role of covariance, and compare mean-based, expected-value and probability-robust decisions. Finally quantify the value of knowing the scenario before choosing. No model is trained and no real prices are used: the analysis isolates the forecast-to-optimization step often hidden behind a precise-looking dashboard.
Start with units and feasible alternatives
Call the windows A and B. Execute the job exactly once; either window can complete it. Different operating conditions may change energy demand, but final service is assumed equivalent. Prices in euros per megawatt-hour and energy in kilowatt-hours require conversion: one megawatt-hour is a thousand kilowatt-hours. Variable cycle cost is price times energy divided by 1000. Fixed charges, startup, penalties, maintenance and dynamic thermal constraints are excluded; including them changes the model.
Scenarios S1 and S2 initially have probability one half each. A scenario jointly describes what may happen; its columns are not independent predictions. In S1, A costs 30 euros/MWh and needs 4 kWh; in S2, 90 and 1 kWh. B always costs 55 euros/MWh and needs 2 kWh. These educational values make the calculation transparent; they are not market data, compressor measurements or EL-AI savings.
| Window / scenario | Price EUR/MWh | Energy kWh | Cost EUR |
|---|---|---|---|
| A / S1 | 30 | 4 | 0.120 |
| A / S2 | 90 | 1 | 0.090 |
| B / S1 | 55 | 2 | 0.110 |
| B / S2 | 55 | 2 | 0.110 |
Average bills differ from bills computed from averages
A costs 12 cents in S1 and 9 in S2, averaging 10.5 cents, below B’s 11. But averaging inputs first gives A a price of 60 euros/MWh and consumption of 2.5 kWh, whose product gives 15 cents. That procedure chooses B. Neither input average is wrong; the lost information is which prices occur together with which energy demands.
Use expectation E, a probability-weighted average, and covariance Cov, which measures how two quantities depart jointly from their means. P denotes price and Q energy. Expanding the product of deviations gives the following exact identity; it needs finite moments, not Gaussian distributions.
For A the deviations are −30 and +1.5 in S1, +30 and −1.5 in S2. Both products equal −45, so covariance is −45 in EUR/MWh times kWh. Dividing by a thousand corrects cost by −0.045 euros: 0.150 − 0.045 = 0.105. Here higher prices accompany lower demand, so multiplying means overestimates cost. Positive dependence reverses the error. Fixed Q or zero covariance makes multiplying means correct for this linear objective.
The decision must precede the scenario
Let x_A and x_B equal one for the chosen window and zero otherwise. The constraint x_A + x_B = 1 enforces one execution. Scenario s costs c_As x_A + c_Bs x_B; expected cost weights this by probability π_s and sums over scenarios. Choose the feasible pair with lowest expected cost. Two windows require enumerating only two alternatives, not a sophisticated solver.
The same x must apply in both scenarios because booking precedes knowing which occurs. This is nonanticipativity: decisions cannot use unavailable information. Allowing scenario-specific choices gives B in S1 and A in S2, averaging 0.5 × 0.11 + 0.5 × 0.09 = 0.10 euros. Lower than 0.105, it answers a different question: what if the future were known before booking?
The 0.005-euro difference is this model’s value of perfect information, not guaranteed AI forecast savings. It bounds the improvement from scenario information alone with unchanged actions, costs and timing. Imperfect forecasts may be worth less, costly sensing may erase benefits, and immutable bookings may prevent using information. The code does not simulate these extensions.
How much probability change reverses the decision?
Let p now be S1’s probability and 1 − p S2’s. A’s expected cost is 0.12p + 0.09(1 − p) = 0.09 + 0.03p; B stays at 0.11. Equality gives p = 2/3. Below it A minimizes expected cost; above it B does; at the threshold they tie. This sensitivity is more useful than one recommendation without its supporting margin.
![A’s expected cost increases with S1 probability; B is constant. They cross at p = 2/3. The shaded hypothetical interval [0.4, 0.8] crosses that threshold, showing why confidence in estimated probability matters.](/api/media/file/elai-20260929-scheduling-figure-en.png)
Suppose p is only considered plausible between 0.4 and 0.8. A decision robust to this interval minimizes the worst expected cost over allowed probabilities. A’s worst is at p = 0.8, costing 0.114 euros; B always costs 0.110, so this criterion chooses B. The interval is assumed for comparison, not estimated or claimed as a confidence interval. Different endpoints may change the result.
Do not confuse this with minimizing the worst individual scenario. That compares 0.120 for A and 0.110 for B: B again, for a different reason. One method retains a set of probability distributions; the other prepares for the costliest single outcome. Agreement here does not make them equivalent. Accepting variability to reduce mean cost can justify A at p = 0.5 without mathematical error.
What the forecasting system must provide
Connecting AI forecasts to this decision requires more than two averages: joint scenarios or an equivalent dependence representation, plus information availability times. Independently shuffling price and consumption columns destroys the association that changed the choice. Forecast quality should also be judged against decisions: small errors near 2/3 may matter more than larger errors where the choice remains unchanged. This article neither proposes a training loss nor demonstrates a particular AI model’s scenario reliability.
At equal probabilities A beats B by just half a cent per cycle. Arbitrarily multiplying by millions of cycles would not establish annual savings without frequency, capacity, additional costs and validated assumptions. Lower monetary cost also does not imply lower energy or emissions. Environmental evaluation needs another objective and consistent emissions-intensity data. The chosen objective defines what better means.
Result, limitations and reproduction
Average price alone is insufficient when energy also varies and the quantities correlate. Our executed example gives B from multiplied means, A from equal-probability expected cost, and B from interval-robust expected cost. These are not contradictions: the first loses dependence; the other two express different assumptions and objectives. Before asking when to operate, specify the cost objective, plausible scenarios and information available at decision time.
Python computes costs with rational fractions, converting only outputs to decimals. No seed is needed because two scenarios and two actions are enumerated exactly. The graph evaluates 101 values of p. K actions and S scenarios need O(KS) direct evaluations; many jobs with shared constraints may create combinatorially many schedules. That calls for a larger optimization model while retaining consistent information across scenarios.
PySP illustrates decisions before and after uncertainty is revealed through a farming model. We read its model and scenario structure without reproducing results or executing PySP. The energy example and covariance, sensitivity and perfect-information calculations are developed here. The snippet shows the key step: weight costs within scenarios, then sum. The archive also includes robust comparisons and numerical assertions.
from fractions import Fraction as F
cost = {'A': [F(30*4,1000), F(90*1,1000)],
'B': [F(55*2,1000), F(55*2,1000)]}
for probability in [F(1,2), F(2,3), F(4,5)]:
expected = {k: probability*v[0]+(1-probability)*v[1]
for k,v in cost.items()}
print(float(probability), {k: float(v) for k,v in expected.items()})
Code, data, and instructions · JSON. Educational calculations executed with Python 3.14.0; figures with Matplotlib 3.11.2. AI-assisted analysis, without claiming peer review or human review. Original illustrative ImageGen cover: it does not document EL-AI people, premises, or installations. Sources accessed 29 September 2026.

