Lesson 3
Sensitivity Ranges and Scenario Analysis
How much can a coefficient change before the optimal basis changes?
1 Modelling context
The optimal solution of an LP is valid only for the specific values of the coefficients and the right-hand sides. In practice, those values are estimates. The objective coefficients come from price forecasts; the constraint bounds come from capacity plans; the constraint coefficients come from engineering estimates. All carry uncertainty.
The natural question is: how much can each coefficient change before the optimal solution changes? The sensitivity range is the answer. Within the range, the optimal basis (the set of binding constraints and positive variables) does not change, and the shadow prices remain valid. Beyond the range, a new basis takes over and the shadow prices change.
This lesson covers the sensitivity ranges for objective coefficients and right-hand sides, their interpretation, and the extensions required when the changes exceed the ranges. Together with the duality theory of Lessons 1 and 2, this completes the analytical toolkit for LP models.
Sensitivity ranges are local
A sensitivity range describes the valid range for a change in one coefficient, holding all others fixed. If several coefficients change simultaneously, the analysis is more complex — the "100 percent rule" gives a sufficient condition for the basis to remain optimal, but not necessary.
2 Learning objectives
By the end of this lesson you will be able to
- Define the sensitivity range of an objective coefficient and of a constraint's right-hand side.
- Read sensitivity ranges from a solver's sensitivity report.
- Interpret the ranges in decision-relevant terms.
- Assess the robustness of the optimal decision to changes within the ranges.
- Identify when a change exceeds the sensitivity range and requires re-solving.
- Design a scenario analysis for changes that exceed the ranges.
3 Prerequisite review
- Optimal basis
- The set of basic variables (positive variables) and binding constraints at the optimal vertex. Within a sensitivity range, the basis does not change.
- Shadow price
- The marginal value of a constraint. Valid only within the sensitivity range of the constraint's RHS.
- Reduced cost
- The opportunity cost of a variable. Valid only within the sensitivity range of the variable's objective coefficient.
- Allowable increase / decrease
- The amount by which an objective coefficient or RHS can increase or decrease without changing the optimal basis. Reported by LP solvers in the sensitivity report.
4 Mathematical formulation
Sensitivity range for a right-hand side
Let b_i be the RHS of the i-th constraint,
and let y*_i be its shadow price at the current optimum.
The sensitivity range for b_i is the
interval [b_i − Δ⁻_i, b_i + Δ⁺_i] such that:
-
For any
b_iwithin this interval (all other data unchanged), the optimal basis remains the same. -
Within this interval, the objective changes linearly:
z* = z*_current + y*_i · (b_i − b_i,current). - Beyond the interval, a new basis becomes optimal and the shadow price changes.
The values Δ⁻_i (allowable decrease) and
Δ⁺_i (allowable increase) are reported by LP solvers in
the sensitivity report. For a non-binding constraint, the shadow
price is zero and the allowable increase is often reported as
infinite; the constraint can be tightened arbitrarily without
affecting the current optimum, so long as it remains non-binding.
Sensitivity range for an objective coefficient
Let c_j be the objective coefficient of variable
x_j. The sensitivity range for
c_j is the interval [c_j − Δ⁻_j, c_j + Δ⁺_j]
such that the optimal values of the decision variables do not change.
Key features:
- For a basic variable (positive at the optimum), the range is typically finite on both sides. Beyond the range, a different basis becomes optimal.
- For a non-basic variable (zero at the optimum), the allowable increase is typically infinite. Increasing its objective coefficient beyond the current reduced cost would make it enter the basis; decreasing it makes the variable even less attractive.
The 100 percent rule
When several objective coefficients change simultaneously, the following sufficient (not necessary) condition guarantees that the optimal basis remains unchanged. Let each coefficient's change be expressed as a fraction of its allowable range:
f_j = |Δc_j| / (allowable increase or decrease of c_j)
If Σ f_j ≤ 1, the current basis remains optimal. If the
sum exceeds 1, the basis may or may not change; re-solve to check.
The analogous rule applies to changes in right-hand sides.
Scenario analysis
When a change exceeds the sensitivity range, the shadow price no longer applies. The correct response is to re-solve the LP at the new values. This is scenario analysis: running the model under alternative sets of assumptions and comparing the results.
Scenario analysis is closely related to the sensitivity analysis of Module 7 but operates within the LP framework. A well-designed scenario study:
- Defines a small number of named scenarios (e.g. "low demand," "high material cost," "expansion of capacity").
- Specifies the changes to the input data for each scenario.
- Re-solves the LP for each scenario and records the optimal solution and the objective value.
- Reports the differences across scenarios and identifies which decisions are robust.
5 Worked example
Sensitivity analysis for the production planning LP
Return to the LP from Lesson 1:
maximize 40 x_A + 30 x_B
subject to 2 x_A + x_B ≤ 100 (labour)
x_A + 3 x_B ≤ 90 (material)
x_A ≤ 40 (demand A)
x_B ≤ 30 (demand B)
x_A, x_B ≥ 0
Step 1 — Baseline solution.
x_A = 40, x_B = 16.67, z* = 2100
Binding constraints: material (y_M = 10), demand A (y_A = 30)
Non-binding: labour (y_L = 0), demand B (y_B = 0)
Step 2 — Sensitivity report.
The solver's sensitivity report gives the following ranges (illustrative values):
| Constraint | Shadow price | Allowable increase | Allowable decrease |
|---|---|---|---|
| Labour | 0 | ∞ | 10 |
| Material | 10 | 10 | 25 |
| Demand A | 30 | 10 | 25 |
| Demand B | 0 | ∞ | 13.33 |
| Variable | Objective coefficient | Allowable increase | Allowable decrease |
|---|---|---|---|
| x_A | 40 | 20 | 20 |
| x_B | 30 | 20 | 7.5 |
Step 3 — Interpret the RHS ranges.
-
Material. Between
90 − 25 = 65and90 + 10 = 100kilograms, the shadow price remains $10 per kilogram. Below 65 or above 100, the shadow price changes. -
Demand A. Between
40 − 25 = 15and40 + 10 = 50units, the shadow price remains $30 per unit. - Labour. The constraint can be tightened by up to 10 hours without affecting the optimum; increasing the labour bound has no effect.
- Demand B. Can be tightened by up to 13.33 units without affecting the optimum.
Step 4 — Interpret the objective coefficient ranges.
-
Profit of A. Between $20 and $60 per unit, the
optimal values of
x_Aandx_Bare unchanged. Below $20, the optimum shifts; above $60, it also shifts. - Profit of B. Between $22.50 and $50 per unit, the optimum is unchanged.
Step 5 — Decision implications.
- If material cost could be reduced to make additional material worth more than $10 per kilogram, purchasing it (within the range up to 100 kg) would improve profit.
- If a customer offers to pay for additional demand for product A (up to 50 units total), the change is worth $30 per additional unit.
- The result is robust to a substantial change in the profit margins: profits from A would have to change by more than $20 per unit to alter the optimum.
Step 6 — Scenario analysis.
Suppose we want to investigate a large increase in the demand cap for product B — say, from 30 to 60 units. This exceeds the allowable increase of 13.33 units, so the shadow price of zero cannot be extrapolated. We re-solve the LP with the new bound:
Solve with x_B ≤ 60:
x_A = 40, x_B = 16.67, z* = 2100 (unchanged)
Interpretation: even with the higher cap, demand for B remains
non-binding at the optimum. The optimum does not change.
Now suppose the material supply is reduced from 90 to 50 kilograms, well below the allowable decrease of 25:
Solve with material ≤ 50:
x_A = ?, x_B = ?
(new basis; recompute)
The result must be computed rather than extrapolated from the shadow price. This is scenario analysis: it is not sensitivity analysis, because the change exceeds the range of validity.
6 Verification check
Checks to perform
- Confirm the reported ranges by direct experiment. Change a coefficient by a small amount inside the range, re-solve, and confirm the optimal values are unchanged. Change it by an amount outside the range and confirm they change.
- Check that the shadow price is constant within the range. For several RHS values inside the range, the change in the objective should equal the shadow price times the change in the RHS.
- Check the sign of the ranges. Allowable increase and decrease are both nonnegative. If a reported decrease is negative, there is a units or convention error.
- Check the 100 percent rule. For simultaneous changes, verify that the sum of the fraction changes is within 1 before concluding the basis is unchanged.
- Check the baseline. The current RHS or coefficient should lie within the reported sensitivity range (by definition).
7 Interpretation
Sensitivity ranges convert an LP solution from a single point into a statement about robustness. They tell the decision-maker how much the inputs can change before the analysis becomes invalid.
Three interpretive points:
- A wide range means the solution is robust. If the optimal decision is unchanged across a wide range of objective coefficients, the decision does not depend on a precise estimate of those coefficients.
- A narrow range means the decision is fragile. If the optimum changes when a coefficient moves by 5%, the model's conclusions depend on the accuracy of that coefficient.
- Beyond the range, re-solve. Sensitivity ranges do not extend to arbitrary changes. Scenario analysis is required when the changes are large.
Reporting sensitivity analysis
A complete sensitivity report includes the sensitivity range for each objective coefficient and each RHS, the shadow price of each constraint, and a statement of which conclusions are robust across the ranges. For changes outside the ranges, a scenario analysis should be added.
8 Uncertainty and limitations
Sensitivity ranges are exact for single-coefficient changes but limited for simultaneous changes.
| Limitation | Effect |
|---|---|
| Single-coefficient changes only | The ranges do not account for interactions between coefficients |
| 100 percent rule is sufficient, not necessary | The basis may remain optimal even when the sum exceeds 1 |
| Model form assumed correct | Sensitivity analysis does not address the linearity assumption itself |
| Degeneracy complicates the ranges | At a degenerate optimum, the sensitivity report may understate the valid range |
Sensitivity is not uncertainty
Sensitivity ranges describe the valid range for a change in each coefficient. They do not describe the probability distribution of the coefficient, nor the probability that the optimum changes. For that, a stochastic analysis is needed — but this is beyond the scope of standard LP software.
9 Common implementation errors
Watch for these
- Applying shadow prices outside the sensitivity range. The shadow price of $10 per kilogram of material is valid only within the range. Beyond the range, the marginal value may be different.
- Interpreting the allowable increase as the maximum change. It is the maximum change without changing the basis. Larger changes are possible; they just require re-solving.
- Misreading the solver's report. Different software packages report sensitivity in different ways. Verify the units and sign conventions.
- Ignoring the 100 percent rule. For simultaneous changes, the ranges do not apply individually. The 100 percent rule provides a sufficient condition.
- Not re-solving when the range is exceeded. The "extrapolation" of a shadow price beyond its range is a common and serious error.
- Confusing the sensitivity range with the feasible range. The feasible range of a variable is determined by the constraints. The sensitivity range is determined by the proximity to a different optimal basis.
10 Independent modelling task
Your turn
- Use the LP from Lesson 2's task. Generate the solver's sensitivity report.
- Record the sensitivity range for each objective coefficient and each RHS. State the range in the units of the problem.
- For each binding constraint, verify that the shadow price is constant within the range by re-solving at several values of the RHS inside the range.
- For each objective coefficient, verify that the optimal solution is unchanged within the range by re-solving at several values.
- Identify one change that exceeds the range. Design a scenario analysis: what inputs change, what is the new optimum, and how does the recommendation change?
- Write a one-page sensitivity report for the decision-maker: which conclusions are robust, which are sensitive, and what happens under one alternative scenario.
This exercise completes Laboratory 12 and the sensitivity component of Assignment 5.
11 Reflection prompt
Reflect before continuing
An LP solution is optimal across a wide sensitivity range for every coefficient. Does this mean the recommendation is robust?
Two or three sentences. Consider the difference between single-coefficient sensitivity and the possibility of simultaneous changes, and the possibility that the model form itself is wrong.
12 Lesson summary
Key takeaways
- The sensitivity range is the interval over which a coefficient can change without changing the optimal basis. Within the range, the shadow prices and the optimal decision are unchanged.
- The sensitivity report lists the allowable increase and decrease for each objective coefficient and each RHS.
- Shadow prices are valid only within the sensitivity range of the corresponding constraint.
- For simultaneous changes, the 100 percent rule provides a sufficient condition. If the sum of fraction changes is at most 1, the current basis remains optimal.
- Beyond the range, re-solve. Scenario analysis is the appropriate response to large changes.
Module 6 complete
You have formulated LPs, solved them in a spreadsheet, verified the solutions, constructed the dual, interpreted shadow prices and reduced costs, and analysed sensitivity and scenarios. The next module turns to the verification, validation, and decision-support practices that surround every modelling project.
§ Self-quiz, practice, and homework
Self-quiz
Q1
The sensitivity range of an objective coefficient is:
Show answer
The range over which the coefficient can change without changing the optimal basis.
Q2
A shadow price is valid:
Show answer
Only within the sensitivity range of the constraint.
Q3
The 100 percent rule states that:
Show answer
If the sum of fraction changes is ≤ 1, the current basis remains optimal. This is a sufficient, not necessary, condition.
Q4
When a change exceeds the sensitivity range, you should:
Show answer
Re-solve the LP at the new value.
Q5
Sensitivity analysis differs from uncertainty analysis because:
Show answer
Sensitivity is deterministic; uncertainty is probabilistic. Sensitivity asks how the output changes; uncertainty asks what the distribution of the output is.
Practice exercises
- For the production planning LP, determine the maximum material supply above which the shadow price of $10 no longer applies.
- For the same LP, suppose the profit on A increases from $40 to $55. Is the current solution still optimal? Justify using the sensitivity range.
- Suppose the material supply changes from 90 to 80 and the demand for A changes from 40 to 45. Use the 100 percent rule to determine whether the current basis remains optimal.
- Sketch the sensitivity range for the RHS of the material constraint on a graph of
z*versus the material bound.
Homework problems
- Sensitivity report. For an LP of your choice, produce a sensitivity report that includes the range for each objective coefficient and each RHS, with units. Verify the ranges by re-solving at several points. 500–700 words.
- 100 percent rule application. For the same LP, apply the 100 percent rule to a simultaneous change in three coefficients. Verify by re-solving.
- Scenario analysis. For the same LP, design three scenarios that exceed the sensitivity ranges. Re-solve the LP for each scenario and report the changes in the optimal solution and the objective. Discuss which decisions are robust and which are sensitive.
Mini project
Produce a sensitivity and scenario analysis for an LP model of your choice. Include: the sensitivity range for each coefficient and RHS, the shadow prices, the 100 percent rule applications, and three scenarios that exceed the ranges. Recommend which decisions are robust and which depend on precise estimates. Submit the spreadsheet and the report. This completes Laboratory 12 and the sensitivity component of Assignment 5.