UPI Study › Courses › Quantitative Analysis › Free lessons › Lesson 10.1 Free with a free account
What Sensitivity Analysis Is
Quantitative Analysis · Chapter 10: Sensitivity AnalysisSection 10.1 · lesson 45 of 5512 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Quantitative Analysis.
Lesson complete
Earn the 3 college credits for Quantitative Analysis
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: When the Numbers Move →← Beyond the PrintoutNext lesson: When the Numbers Move →
In this lesson
Why every LP solution needs it.
- Explain why every LP parameter is an estimate
- Contrast sensitivity analysis with re-solving the model
- Name the two dimensions and the question each answers
- Apply the 100% rule to simultaneous changes
Transcript
Everything said in the video, section by section (1,709 words). Read along, or search it.
Sensitivity Analysis · Section 10.1
What Sensitivity Analysis Is
Welcome to section ten point one of Quantitative Analysis. A linear programming solution is only as good as the data that produced it. The optimal product mix, the optimal shipping plan, the optimal staffing schedule. Each of them rests on coefficients that were estimated, not measured with certainty. Profit margins are forecasts. Resource availabilities are planning figures a supplier email can revise, and demand bounds shift. So sensitivity analysis exists to answer one essential question. How much can the inputs change before the recommendation changes? Without it, an LP recommendation is a brittle number with no context. With it, that same recommendation becomes a tool that quantifies its own uncertainty.
Estimates, Not Facts
A Solution Is Only as Good as Its Data
Every LP model has two families of input parameters. The first is the objective function coefficients: per unit profits, costs, or returns. The second is the right hand side values: resource availabilities, demand minimums, and capacity limits. In practice, neither set is known exactly. Profit per unit rests on a forecasted price and a forecasted cost, and both carry error bars. Commodity costs, exchange rates, and labour rates move during the planning horizon, sometimes daily. Stated machine capacity assumes nominal downtime, but actual downtime varies. And the data was collected weeks before the decision. The world does not pause for optimisation. So here is the distinction that matters most in this section. A solution robust to a twenty per cent swing in prices is one kind of object. A solution that flips to a new product mix at a two per cent swing is another. The numerical recommendation can be identical. The decision quality is not.
Two Approaches
Read the Tableau, Do Not Re-Solve
A naive response to uncertainty is to re-run the model for every plausible scenario. Change one coefficient, re-solve. Change another, re-solve. For small models that is perfectly feasible. For real industrial problems with thousands of variables, it is wasteful and slow. Sensitivity analysis avoids that brute force loop entirely. It uses the current optimal basis, the set of basic variables defining the current solution. From that it derives the ranges analytically, straight out of the final simplex tableau. Within those ranges the basis is provably still optimal, so no re-solve is needed. The work has already been done by the simplex algorithm, and sensitivity analysis simply reads the answer. Reading is essentially free. Re-solving can cost minutes to hours per scenario. So use the ranges when inputs vary moderately around their estimates. Re-solve when they move beyond those ranges, or when the model structure itself changes.
Two Dimensions
Where the Uncertainty Lives
Sensitivity analysis splits cleanly along the structure of the linear program. One family of questions asks what happens when the numbers in the objective function change. The other asks what happens when the numbers on the right of the constraints change. Each is answered independently, and each produces a different kind of insight. Objective coefficient changes test the stability of the product mix. They answer the question, how far can a margin move before I change my plan? Right hand side changes test the stability of the shadow prices. They answer the question, what is one more unit of this resource actually worth? Notice that these are the two questions a decision maker already has in mind. The structure of the LP is what lets us answer them separately.
Dimension One
How Far Can a Profit Margin Move?
Take dimension one, the objective function coefficients. Suppose the profit per unit of Product A is currently estimated at forty-eight dollars. The question is how much that estimate can change before the optimal mix changes. The sensitivity report answers with two numbers. An allowable increase, say twelve dollars, and an allowable decrease, say eight dollars. That gives a band running from forty dollars up to sixty dollars. Anywhere inside that band the optimal basis does not change, and neither does the production plan. Here is the part students find counter intuitive. The objective value at the new optimum does scale linearly with the coefficient. But the recommended action is completely stable. Only when the coefficient crosses outside the range does the mix flip to another corner.
Geometry
A Tilt That Does Not Move the Corner
The geometric picture makes the range intuitive. The objective function is a family of parallel lines, or hyperplanes in higher dimensions. The optimum sits at a corner of the feasible region. Changing an objective coefficient tilts those lines. As long as the tilt is small, the same corner is still the highest one touched. The optimum does not move. Only its value changes. Once the tilt is large enough, an adjacent corner is reached first. At that point the optimum jumps from corner C to corner D. So the allowable range is the band of tilts for which the current corner still wins. That is the whole idea, stated geometrically. Outside the band, the linear program genuinely has to be re-solved.
Dimension Two
Shadow Prices and the RHS Range
Now dimension two, the right hand side values, where the question is a different one. How much can the available quantity of a resource change before its shadow price changes? The shadow price is the marginal value of one extra unit of that resource. It is the amount the optimal objective would improve if one more unit became available. Like the objective coefficients, right hand side values have an allowable range. Inside it the shadow price is constant. So we can value extra units, or scarcer units, at exactly that rate. Outside it the binding constraints shift, the basis changes, and the shadow price moves. Every major solver emits a sensitivity report next to the optimal solution. Excel Solver, Gurobi, CPLEX, and the linear program routine in Python's scipy library. Look for four columns per parameter, and the last two are the ones you want. Final value, reduced cost or shadow price, allowable increase, and allowable decrease.
The Basis
Why the Ranges Come Free
All of this rests on a single concept: the optimal basis. Every LP solution can be described by listing which variables are basic. A basic variable takes a non-zero value in the tableau; the rest are held at zero. That set of basic variables is the optimal basis. In product mix language, the basis tells you which products to make, and which constraints are tight. Now the formal definition of a sensitivity range. It is the interval of values a parameter can take, while the current basis stays optimal. Inside the range, the recommendation does not change. Outside it, the simplex algorithm must pivot to a new basis. That means re-solving. And this is exactly why sensitivity analysis is computationally free. The optimal basis already sits in the final tableau, and so do the bounding ratios. No additional pivoting is performed at all.
Simultaneous Changes
The 100% Rule
There is an assumption hiding inside every individual sensitivity range. It assumes that only one parameter changes at a time. Real life is rarely that tidy. A recession depresses several profit margins at once, and a supply shock tightens several resource limits. For these joint changes we use the hundred per cent rule. For each parameter, take the proposed change and its allowable range in that direction. Use the allowable increase if the change is positive, the decrease if it is negative. The ratio is the absolute value of the change, divided by that range. The rule says the current basis stays optimal whenever the ratios sum to at most one. That is, whenever they consume at most one hundred per cent of the budget. If the sum exceeds one, the rule goes silent. It does not say the basis has changed. The basis may still be optimal, but the guarantee is gone, so re-solving is the safe action.
Worked Example
Three Coefficients, One Budget
Let us work the rule through with numbers, on an LP with three objective coefficients. Their allowable increases are ten dollars, eight dollars, and five dollars. A manager proposes simultaneous increases of four, three, and two dollars. Take the first. Four divided by ten is zero point four. The second. Three divided by eight is zero point three seven five. The third. Two divided by five is zero point four again. Now add the three ratios together. Zero point four, plus zero point three seven five, plus zero point four. That comes to one point one seven five, which is above one, so the rule fails. Notice that no single change was anywhere near its own limit. Each one used less than half of its allowable range. Together they still overspend the budget, and the model should be re-solved.
In Practice
The "I Trust the Model" Conversation
Here is a conversation you will have in your career. A manager looks at the output and says, I trust the model, just give me the number. The temptation, especially for a junior analyst, is simply to comply. The professional response is more useful, and it is the point of this whole section. You do not undermine the model. The model is sound, and the recommendation is there. You then show which inputs the recommendation is sensitive to, and which it is not. Three properties make this a default step rather than an optional extra. First, it costs nothing. The report comes from the tableau that produced the optimum. Skipping it throws away information you have already paid for. Second, it quantifies risk the point estimate hides, since two models can give identical recommendations with different ranges. Third, it tells you where to invest in better data: narrow ranges deserve better forecasts, wide ones do not. It is a free upgrade to the recommendation, and that is why it is not optional.
Summary
What to Carry Forward
Let us gather the ideas worth carrying forward. LP parameters are estimates, so the optimal solution inherits their uncertainty. Sensitivity analysis uses the optimal basis to derive stability ranges analytically, and for free. The optimal basis is the set of basic, non-zero variables defining the current solution. An allowable increase or decrease says how far one parameter can move, all others fixed. A shadow price is the gain from one more unit of a binding constraint. It is valid only inside that constraint's own right hand side range. The hundred per cent rule extends this to simultaneous changes: if the ratios sum to at most one, the basis is preserved. Above one, the rule is silent, and re-solving is the honest move. How much can profits shift before I change my plan, and what is a resource worth? Skipping sensitivity analysis is not a time saving. It is information thrown away.
About Quantitative Analysis at UPI Study
Quantitative Analysis (Math 250) is a self-paced online course of 55 video lessons in 13 chapters, from decision analysis and simulation to inventory and queuing models, project scheduling, linear programming and transportation models. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Math courses Every course with PRO →
Compare: Statistics vs Quantitative Analysis
Why take it here
Why students take Quantitative Analysis with UPI Study
Where the credit goes
Universities that work with NCCRS
Quantitative Analysis carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About What Sensitivity Analysis Is
What is sensitivity analysis in linear programming?
Why doesn't sensitivity analysis require re-solving the model?
What do the allowable increase and allowable decrease mean for an objective coefficient?
What is the 100% rule in sensitivity analysis?
About the Quantitative Analysis course
How many college credits is Quantitative Analysis?
How much does Quantitative Analysis cost and what is included?
Which universities accept UPI Study credits?
How long does Quantitative Analysis take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Quantitative Analysis.
55 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →