Sensitivity
Analysis
Discover how small changes in parameters affect optimal solutions in linear programming: what stays the same, what breaks, and why it matters.
What Is Sensitivity Analysis?
After solving a linear programming problem, you have an optimal solution. But what happens if the data changes slightly? Sensitivity analysis answers: how sensitive is the optimal solution to changes in the problem's parameters?
The LP Foundation
Recall: a linear program has an objective function and constraints. We optimize:
Graphical Intuition
Two Core Questions
Objective Coefficient Ranges
Consider maximizing \( Z = c_1 x_1 + c_2 x_2 \). The iso-profit lines have slope \( -c_1/c_2 \). The optimal vertex stays optimal as long as this slope stays between the slopes of the two binding constraint lines.
Shadow Prices & RHS Ranges
The shadow price (or dual value) of constraint \( i \) measures the rate of improvement in \( Z \) per unit increase in \( b_i \), assuming all other data stays fixed.
Objective Range vs. RHS Range
| Objective Coefficient Range | RHS (Resource) Range | |
|---|---|---|
| What changes? | Profit/cost coefficient \( c_j \) | Resource limit \( b_i \) |
| What stays the same? | Optimal basis (same vertex) | Same set of binding constraints |
| Effect on \( Z^{*} \)? | \( Z^{*} \) changes (new coefficient, same point) | \( Z^{*} \) changes by \( y_i^{*} \cdot \Delta b_i \) |
| Key output | Allowable increase/decrease for \( c_j \) | Shadow price \( y_i^{*} \) + allowable range for \( b_i \) |
How to Apply Sensitivity Analysis
Example 1: Problem Setup
To find the optimal solution, we solve both constraints as equalities (since the optimum lies at their intersection):
Example 1: Verification
Let's verify both constraints are binding at \( (7.5, 35) \):
Example 1: Reading the Report
The shadow prices are found from the dual: \( 2y_1 + 4y_2 = 40 \) and \( 3y_1 + 2y_2 = 50 \), giving \( y_1 = 15 \) and \( y_2 = 2.5 \). The sensitivity report gives us:
| Constraint | Shadow Price \( y_i^{*} \) | Allowable Increase | Allowable Decrease |
|---|---|---|---|
| Wood (\( b_1 = 120 \)) | 15 | 30 | 70 |
| Labor (\( b_2 = 100 \)) | 2.5 | 140 | 20 |
Example 2: Objective Coefficient Change
Now suppose the profit per table changes from \( c_2 = 50 \) to \( c_2 = 60 \). The sensitivity report says:
| Variable | Current \( c_j \) | Allowable Increase | Allowable Decrease |
|---|---|---|---|
| \( x_1 \) (Chairs) | 40 | 60 | 6.67 |
| \( x_2 \) (Tables) | 50 | 10 | 30 |
Example 3: Outside the Allowable Range
What if wood supply drops to \( b_1 = 40 \)? That's a change of \( \Delta b_1 = -80 \).
Visualizing RHS Changes
Common Mistakes
Summary of Key Concepts
| Concept | Definition | Key Insight |
|---|---|---|
| Shadow Price | Rate of \( Z^{*} \) change per unit of \( b_i \) | Only valid within RHS range |
| Allowable Increase | Max upward change before basis changes | Basis stays optimal up to this limit |
| Allowable Decrease | Max downward change before basis changes | Check magnitude, not sign |
| Binding Constraint | Constraint with zero slack | Shadow price \( > 0 \) (typically) |
| Non-binding | Constraint with positive slack | Shadow price \( = 0 \) |
Question 1 of 5
A constraint has a shadow price of 8 and an allowable increase of 15. If the RHS increases by 10 units, by how much does \( Z^{*} \) change?
Question 2 of 5
A non-binding constraint has 12 units of slack. What is its shadow price?
Question 3 of 5
The allowable increase for the objective coefficient \( c_1 \) is 20 and the allowable decrease is 10. If \( c_1 \) currently equals 30, for which new value of \( c_1 \) does the current basis remain optimal?
Question 4 of 5
Changing an objective coefficient \( c_j \) within its allowable range affects:
Question 5 of 5
A constraint's RHS has an allowable decrease of 25. If you decrease the RHS by 30, what should you do?