Week 9: LP Sensitivity Analysis & Shadow Prices
This week’s big question: you solved the LP and Solver handed back a plan. But the numbers in that model (the profit per product, the hours of each resource) are not facts, they are estimates that wobble for real reasons (wax prices move, wages change, a melter goes down for repairs). How much can each number drift before your “best plan” stops being best, and what is one more hour of a scarce resource actually worth? Sensitivity analysis answers those “what-if” questions straight off one report, without re-solving the LP every time a price ticks.
Before the week
Read: Taylor, Introduction to Management Science (13e), Chapter 3, pp. 104–115, then two worked models from Chapter 4, pp. 135–143. Chapter 4 has eight examples and you do not need them all. The chapter PDFs are in Canvas Files.
| Pages | Section | This week |
|---|---|---|
| 104–109 | Sensitivity Analysis; Changes in Objective Function Coefficients | Read. Monday: the range over which the plan holds |
| 109–113 | Changes in Constraint Quantity Values; Other Forms of Sensitivity Analysis | Read. Monday: the RHS range (the book says “constraint quantity values”) and what the report cannot answer |
| 113–115 | Shadow Prices | Read. Monday: the value of an extra resource unit |
| 135–143 | Chapter 4: A Product Mix Example; A Diet Example | Read both. Formulation with more than two variables, which the take-home needs |
Stop where the Summary begins on p. 115, and where “An Investment Example” begins on p. 143. One warning: reduced cost is never defined in the book. It appears only as a column header in Exhibits 3.11 and 3.12, where its value happens to be 0, so Monday teaches it from scratch.
Then the warm-up self-check, on binding constraints and reading a corner:
This week we follow one running example all the way through. A small candle workshop makes pillar candles (\(x\)) and jar candles (\(y\)). Each pillar candle earns \$4 profit, each jar candle \$3. The wax melter runs 10 hours a day and each pillar candle needs 2 melter-hours to a jar candle’s 1; labor gives 8 hours and each candle needs 1; and the workshop has 40 ounces of fragrance oil a day, of which a pillar candle takes 1 and a jar candle 3. So:
\[\begin{aligned} \max\ \ & 4x + 3y \\ \text{s.t.}\ \ & 2x + y \le 10 && \text{(melter)} \\ & x + y \le 8 && \text{(labor)} \\ & x + 3y \le 40 && \text{(fragrance oil)} \\ & x, y \ge 0. \end{aligned}\]Evaluate the objective at each corner: \((5, 0)\) earns \$20, \((0, 8)\) earns \$24, and the crossing \((2, 6)\) earns \$26. So Solver (or the graph) returns the optimal plan 2 pillar candles, 6 jar candles, for profit \$26, at the corner where the melter and labor lines cross, and both bind there: the plan uses all 10 melter-hours and all 8 labor-hours. Fragrance oil does not bind. The plan uses \(2 + 3(6) = 20\) of the 40 ounces, so fragrance oil has 20 ounces of slack, and its line never touches the region: even \((0, 8)\), the corner that uses the most fragrance oil, needs only 24. Hold that solution in mind; Monday asks “what happens to it when something changes?” The Answer Report describes the plan and which limits bind. The Sensitivity Report says what would happen if a number moved: Monday the profits and resources, then the cost of an unmade product. One small but important point of form: the report only reads right when the model is in standard form: every decision variable on the left, the constant on the right (\(2x + y \le 10\), not \(2x \le 10 - y\)). The ranges you read are computed against the constraints written that way.
Chapter 4’s two worked models are two shapes to recognize on sight, and the workshop can wear both. The product mix is the shape you already have: the products are the variables, each resource is a \(\le\) limit, and you maximize profit (the take-home’s sign shop is the same shape with three products). The diet example turns every part around. Suppose the workshop blends two bought waxes into its own candle wax: the pounds of each wax are the variables, each property the blend must have (hard enough for a pillar to stand, a melting point high enough for a summer shelf) is a \(\ge\) floor the blend must meet, and the objective is the lowest cost that meets every floor. Same Solver, same report; what changes is what you choose, what limits or floors it, and which way the objective points.
Session 1: Mon, Oct 19 · Sensitivity analysis: coefficients, resources & reduced cost
How far can a coefficient move before the optimal corner jumps, and what is an extra resource unit worth? We work through both questions and reduced cost today, using the candle workshop throughout. The last 25 minutes are the garden group practice, a photo of your attempt, and the instructor’s walkthrough. The Week 9 take-home is due Sunday, October 25, at 11:59 PM.
🧩 Puzzle
The price of wax is on the move. Your pillar candles are poured in beeswax, whose price the supplier resets every month, and your accountant says the profit on a pillar candle might drift anywhere from about \$3 to \$5 this month. Does that mean you should re-plan the workshop every time the number moves? At what point does the optimal plan itself, make 2 pillar candles and 6 jar candles, actually change?
Build the skill 1: the optimum holds over a range of coefficients
The optimal corner is fixed by which constraints meet there, not by the exact profit numbers. At \$4 a pillar candle the objective line \(4x + 3y = Z\) has slope \(-\tfrac{4}{3}\), which sits between the melter line’s \(-2\) and the labor line’s \(-1\), so \((2,6)\) is the last point the line touches as it sweeps out of the region. Nudge the profit on a pillar candle up or down a little, the slope moves a little, and the same corner \((2,6)\) still wins. The answer is stable. Push far enough, though, and the line tilts past one of those two slopes, a different corner becomes best, and the plan jumps. Drag the profit per pillar candle slider and watch the objective line tilt while the ringed optimal corner stays put at \((2,6)\); then find the two values where it hops, to \((0,8)\) on the way down and to \((5,0)\) on the way up. The fragrance-oil line, top right, never reaches the region, so it plays no part:
Build the skill 2: the allowable range, and why it ends where it does
The band of profit-per-pillar-candle values over which \((2,6)\) stays optimal is the allowable range (or range of optimality) for that coefficient. Inside the range, the plan does not change (you keep making 2 pillar candles and 6 jar candles) even though the profit total \(Z = 4x + 3y\) does move as the coefficient moves. Outside the range, the objective line has tilted enough that a neighboring corner pays more, and Solver would switch the plan.
You can also find the endpoints by comparing the neighboring plans. Keep the jar profit at \$3 and call pillar profit \(c\). The current plan earns \(2c+18\); the all-jar plan earns 24; the all-pillar plan earns \(5c\).
| For \((2,6)\) to stay at least as good as… | Compare profits | Solve for \(c\) |
|---|---|---|
| \((0,8)\), all jars | \(2c+18 \ge 24\) | \(c \ge 3\) |
| \((5,0)\), all pillars | \(2c+18 \ge 5c\) | \(c \le 6\) |
Both comparisons must hold, giving \(3 \le c \le 6\). The graph explains why these are the two endpoints. At a profit of \(c_{\text{pillar}}\) per pillar candle the objective line \(c_{\text{pillar}}\,x + 3y = Z\) has slope \(-\tfrac{c_{\text{pillar}}}{3}\). As you raise the pillar profit, the line tilts steeper; the corner \((2,6)\) keeps winning until the objective line becomes parallel to the melter line (\(2x + y = 10\), slope \(-2\)), which happens at pillar profit \(= \$6\): there \((2,6)\) ties \((5,0)\) at \$30, and past \$6 the plan jumps to all pillar candles. Lower the pillar profit instead and the line flattens until it is parallel to the labor line (\(x + y = 8\), slope \(-1\)), at pillar profit \(= \$3\): there \((2,6)\) ties \((0,8)\) at \$24, and below \$3 the plan jumps to all jar candles. So the computed range of optimality is
\(\$3 \le \text{pillar profit} \le \$6\), with the jar candle’s profit held at \$3. Solver prints the same band without a picture, as two allowances from the \$4 you typed: an allowable decrease of 1 (down to \$3) and an allowable increase of 2 (up to \$6).
The total moves linearly while the plan stands still: at \((2,6)\) the profit is \(Z = 2c + 18\) for a profit of \(c\) per pillar candle, so every cent on a pillar candle moves \(Z\) by two cents.
| Profit per pillar candle | Best plan | \(Z\) | Why |
|---|---|---|---|
| \$2.50 | \((0,8)\), all jar candles | 24 | below the band: the plan jumped |
| \$3.50 | \((2,6)\) | 25 | inside: \(2(3.5) + 18\) |
| \$4.00 | \((2,6)\) | 26 | today |
| \$5.00 | \((2,6)\) | 28 | inside: \(2(5) + 18\) |
| \$6.50 | \((5,0)\), all pillar candles | 32.5 | above the band: the plan jumped |
Outside the band the new corner’s value is easy to check: \((5,0)\) earns \(5c\), which beats \(2c + 18\) once \(c > 6\), and \((0,8)\) earns 24, which beats \(2c + 18\) once \(c < 3\).
Your accountant’s \$3–\$5 estimate sits inside that band, so the plan is safe. Look at both ends before you say so, though: the lower edge, \$3, is right on the boundary. At exactly \$3 the corners \((2,6)\) and \((0,8)\) tie at \$24 (multiple optima), and a cent below it the plan flips to all jar candles. A range endpoint is a knife edge; treat a coefficient sitting near one with the caution you would give a number that has already changed. This is the whole point of sensitivity analysis: you do not need a precise profit figure, only to know it sits inside the allowable range.
On the Sensitivity Report the band is one row of the Variable Cells block, one row per product:
| Variable | Final value | Reduced cost | Objective coefficient | Allowable increase | Allowable decrease |
|---|---|---|---|---|---|
| pillar candles \(x\) | 2 | 0 | 4 | 2 | 1 |
| jar candles \(y\) | 6 | 0 | 3 | 1 | 1 |
The pillar-candle row is the band you just drew: \$4, up 2 to \$6, down 1 to \$3, read off two columns with no slopes. The jar-candle row asks the same question of the other coefficient, with the pillar candle’s \$4 held still: the objective \(4x + py\) has slope \(-4/p\), parallel to the melter line at \(p = 2\) and to the labor line at \(p = 4\), so the jar candle’s \$3 holds from \$2 to \$4. Reduced cost is the next column we will interpret: it is 0 for a product the plan makes, and the interesting case is a product it does not.
In practice: the range assumes everything else holds still
- One number at a time (the most-tested trap). The allowable range for the profit per pillar candle is computed holding the jar candle’s profit, and every constraint, fixed. You may change only one coefficient at a time and trust the simple range. Changing several together is the classic exam mistake; simultaneous changes are not covered by the one-at-a-time ranges (the standard OR fix is the “100% rule,” which is beyond Taylor 13e and beyond this week).
- “Infinite allowable increase” is not “unbounded profit.” A Sensitivity Report sometimes prints an infinite allowable increase for a coefficient. That just means raising that profit number never changes which plan is optimal, not that profit grows without limit. It is a real report value students misread.
- Ranges come from the model, not the world. Solver’s Sensitivity Report prints these ranges, but they inherit every assumption in your LP. A mis-estimated coefficient gives a confidently wrong range. Read a range as “safe while nothing else moves,” and say so when you quote it.
Back to the puzzle
The plan “2 pillar candles, 6 jar candles” changes at exactly two points: if the pillar candle’s profit falls below \$3 it jumps to all jar candles, \((0,8)\), and above \$6 to all pillar candles, \((5,0)\). Your accountant’s \$3–\$5 sits inside that \$3 to \$6 range of optimality, so you do not re-plan every time the wax price moves. You re-plan only if the pillar candle’s profit escapes the range, and you watch the \$3 end: the quote reaches it, and there the plan ties with all jar candles. One report answers a month of “should we change the plan?” questions.
Before the practice: value one more resource unit by re-solving
Changing a profit number keeps the feasible region fixed. Changing a resource total moves a boundary. To value that change, keep the profit rates at 4 dollars per pillar candle and 3 per jar candle, change one resource, and solve again. Start from \(2x+y=10\) and \(x+y=8\): subtracting the second equation from the first gives \(x=2\), then \(y=6\) and profit 26.
| Resource change | Binding equations after the change | Best plan \((x,y)\) | New profit | Gain over 26 |
|---|---|---|---|---|
| One more melter-hour | \(2x+y=11\); \(x+y=8\) | \((3,5)\) | \(4(3)+3(5)=27\) | 1 dollar |
| One more labor-hour | \(2x+y=10\); \(x+y=9\) | \((1,8)\) | \(4(1)+3(8)=28\) | 2 dollars |
| One more ounce of fragrance oil | Original plan still uses only 20 of 41 ounces | \((2,6)\) | 26 | 0 dollars |
Each changed plan is feasible, and the other corners earn less. The value of an added unit is the gain, not the new total. The report calls this local rate the shadow price. We next check how many extra units you can value at that same rate. The group practice uses this re-solve-and-subtract method, so you can do it without a Sensitivity Report.
🧩 Puzzle: what is one more resource unit worth?
You can rent the melter for one more hour. The workshop is at its optimum: 2 pillar candles, 6 jar candles, \$26 profit, and both the melter and labor are fully used. A neighboring workshop offers to rent you one extra melter-hour. What is that hour worth to your profit, and how much rent would you pay for it?
Build the skill 1: the shadow price is the slope of optimal profit
A constraint that is used up at the optimum is binding: here the melter and labor both bind at \((2,6)\), and fragrance oil, with 20 ounces to spare, does not. The shadow price of a binding constraint is the rate at which optimal profit \(Z^{*}\) rises for each extra unit of that resource. (You will see the same idea under other names: a Solver report may call it the dual price or the marginal value. Taylor defines it as “the dollar amount one would be willing to pay for one additional resource unit.” Same number, three labels.) Slide the melter hours right from 10 and watch \(Z^{*}\) climb; the slope of that line is the shadow price, and the readout prints it:
Going from 10 to 11 melter-hours moves the optimum from \((2,6)\) to \((3,5)\), and profit rises from \$26 to \$27. That \$1 gain per extra melter-hour is the melter’s shadow price. In symbols the shadow price is a ratio, \(\Delta Z^{*} / \Delta \text{RHS}\): how much the best profit moves, per unit added to the right-hand side of \(2x + y \le 10\). For the melter it is \$1 of profit over 1 added hour: \$1 per melter-hour. Translate it the way a manager would: the hour is worth \$1 to you, so any rent below \$1 is pure profit, exactly \$1 breaks even, and anything above \$1 loses money. The shadow price is the break-even price for that resource.
Build the skill 2: shadow prices rank your bottlenecks (and hold only over a range)
Start with the range, because the widget above draws exactly this. Go back to it, with labor held at 8 hours, and slide the melter hours right from 10: \(Z^{*}\) climbs \$1 an hour until 16, then goes flat. Slide it left from 10 and the line falls \$1 an hour down to 8, then falls faster, \$3 an hour. So the line is three straight pieces, and its slope changes at 8 and at 16 melter-hours. Read the readout’s shadow price inside a piece; right on a breakpoint it averages the two slopes on either side.
- From 8 to 16 melter-hours, slope \$1. The optimum is the crossing of the melter and labor lines, at \((b - 8,\ 16 - b)\) for \(b\) melter-hours, and \(Z^{*} = b + 16\). Each extra hour adds exactly \$1: the shadow price.
- Past 16 hours, slope \$0. The labor line caps the plan at \((8, 0)\) and \(Z^{*}\) sits at \$32. The melter has slack, so an extra melter-hour is worth \$0. That is diminishing returns: \$1 an hour while it bites, then nothing.
- Below 8 hours, slope \$3. A different corner takes over: the optimum moves onto the jar-candle axis at \((0, b)\), \(Z^{*} = 3b\), and each melter-hour is worth \$3. The \$1 rate fails on the way down too.
So the melter’s \$1 shadow price is valid only across 8 to 16 melter-hours, the range of feasibility, and that range is bounded on both sides. The report prints it as two allowances from the 10 hours you have: allowable increase 6, allowable decrease 2. Inside that window each hour is worth exactly \$1; outside it, the bottleneck has moved and the rate is different.
Not every resource is worth the same at the margin, either. Run the same one-more-hour move on labor, with the melter fixed at 10: raising labor from 8 to 9 hours slides the corner along the melter line to \((1, 8)\), and profit goes from \$26 to \(4 + 24 = \$28\). So the labor shadow price is \$2 per hour, twice the melter’s. Run it on fragrance oil and nothing moves at all: the plan uses 20 of the 40 ounces, so a 41st ounce would sit on the shelf beside the other 20 spares, and fragrance oil’s shadow price is \$0. For one free extra hour of either resource, labor gives the larger gain. For a purchase, compare each gain with its quoted price; the larger shadow price alone does not settle the purchase. And buy inside its range: a shadow price is a local rate, and the report says how far it reaches.
A shadow price and its range together also price an offer. Someone donating a block of a resource is offering units, so the offer is worth its resource’s shadow price times the units offered, counted only as far as that resource’s allowable increase, because past that edge the printed rate is no longer the right one. Six free melter-hours are worth \(6 \times \$1 = \$6\), because six is exactly the melter’s allowable increase; a seventh hour is past 16, where labor caps the plan and a melter-hour is worth \$0. Three free labor-hours are worth only \(2 \times \$2 = \$4\), because labor’s allowable increase stops at 2 and the third hour falls outside the range. The bigger rate does not always win the bigger offer, which is why you read the price and its range together.
Build the skill 3: the other half of the report: reduced cost
Shadow prices live on the constraint side of the Sensitivity Report. The variable side answers a different question: why is a product left out of the plan, and what would change that? Suppose the workshop considers a third product (tea-light packs) at \$2 profit a pack, using 1 melter-hour and 1 labor-hour per pack (tea lights go unscented, so they use no fragrance oil). Solver still makes 0 packs. Why? Those same resources are worth \(1\,\text{hr} \times \$1 + 1\,\text{hr} \times \$2 = \$3\) at the current shadow prices, but a pack only earns \$2: it loses \$1 of value versus making pillar and jar candles. That \$1 gap is the tea-light pack’s reduced cost: \(\$2 - \$3 = -\$1\). The pack stays at zero until its profit rises by the magnitude of its negative reduced cost (here, until its profit reaches \$3) at which point making a pack finally breaks even and it can enter the plan. Reading the reduced-cost column tells you exactly how far a sidelined product is from being worth making.
Beyond the book. Taylor 13e’s sensitivity chapter covers objective-coefficient ranges, right-hand-side ranges, and shadow/dual values; reduced cost is a column Excel’s Solver Sensitivity Report adds, which we include here because you will see it on screen. The concept is standard, the variable-side mirror of a shadow price; it is just not part of Taylor’s prose.
Reading the Sensitivity Report: a quick legend
Everything this week lives in one of two blocks of the Excel report. We first read the Variable Cells block (one row per product): Final Value (how many to make), Reduced Cost (skill 3 above), Objective Coefficient (the profit you typed), and Allowable Increase / Decrease (Session 1’s range of optimality). The Constraints block (one row per resource) describes the resource changes, and for the workshop it prints:
| Constraint | Final value | Shadow price | Constraint R.H. side | Allowable increase | Allowable decrease |
|---|---|---|---|---|---|
| melter, \(2x + y \le 10\) | 10 | 1 | 10 | 6 | 2 |
| labor, \(x + y \le 8\) | 8 | 2 | 8 | 2 | 3 |
| fragrance oil, \(x + 3y \le 40\) | 20 | 0 | 40 | 1E+30 | 20 |
Final Value is the left-hand side used (melter and labor are used up, so both bind), Shadow Price (a Solver report may say dual price) is the value of one more unit, and the two allowances give the range of feasibility. The melter’s \$1 holds from \(10 - 2 = 8\) to \(10 + 6 = 16\) hours: the middle piece of the widget’s line, printed as two numbers. Labor’s \$2 holds from 5 to 10 hours, and that is how you price a rental: offered labor at \$1.50 an hour, hours 9 and 10 each net \(\$2 - \$1.50 = \$0.50\), and an eleventh hour is worth \$0, because at 10 labor-hours the plan is \((0, 10)\) for \$30, where the labor line meets the melter line on the jar-candle axis, and the melter now caps it. The fragrance-oil row is what room to spare looks like: 20 of the 40 ounces used, a shadow price of 0, and an allowable increase of 1E+30, Excel’s way of printing infinity: no amount of extra fragrance oil changes anything. Its allowable decrease, 20, is exactly its slack: the workshop could lose up to 20 ounces of fragrance oil and the plan would not change. Shadow price and its range on the Constraints block; reduced cost and the objective range on the Variable Cells block. That is the whole legend, and the map for the take-home.
In practice: shadow prices are per-unit, local, and one-at-a-time
- One change at a time. Each shadow price assumes you change that one right-hand side and nothing else. Buying more melter time and more labor together requires a check of the combined change or a new solve. The two printed ranges alone do not guarantee that both shadow prices still apply, the same one-at-a-time discipline as the objective ranges.
- Non-binding means \$0, and you can lose its slack for free. A constraint with slack left over has a shadow price of \$0: more of it buys nothing, which is the fragrance-oil row. The mirror image is also true. You could give up an amount of that resource equal to its slack (20 ounces of fragrance oil) before anything in the plan changes. Do not pay for slack, and do not panic about losing a little of it.
- Some “what-ifs” break the report entirely. The simple ranges cover changing one RHS or one objective coefficient. They do not cover changing a technological coefficient (say a larger pillar candle that needs 3 melter-hours instead of 2) or adding a brand-new constraint (a daily limit on curing-shelf space). Those reshape the feasible region. You must re-solve, not read a range.
Back to the puzzle
One extra melter-hour is worth \$1 of profit (the melter’s shadow price), so pay rent up to \$1: below \$1 is profit, \$1 is break-even, above \$1 is a loss. An hour of labor is worth \$2, so a free labor-hour helps more than a free melter-hour. For paid hours, compare gain minus rent; and buy no fragrance oil at all, since with 20 ounces to spare its shadow price is \$0. Both hourly prices hold only within their allowable RHS ranges (the melter’s \$1 across 8 to 16 hours, labor’s \$2 across 5 to 10); buy too much and the bottleneck shifts and the price drops to \$0.
In-class group practice (wrap-up)
To close Session 1, work out by hand, in your group, which of two scarce resources is worth more: add one unit of each, re-solve, and take the gain.
Write every member’s name on the sheet. You have 15 minutes for the practice, then two minutes to photograph your group’s own attempt before the solutions are shown. One member uploads the photo to Canvas by the end of class; participation credit is for attempting the work.
The instructor uses the final eight minutes to demonstrate the handout’s method, check the main results with units, and explain a common mistake. This demonstration closes the session.
- Download: Week 9 group practice (Word)
Session 2: Wed, Oct 21 · Midterm only
This session is reserved for laptop setup and the midterm, administered by the TA. Bring the laptop with Respondus LockDown Browser installed. Setup starts at 2:20 PM, and the planned test is 2:40–3:10 PM: 20 questions in 30 minutes, worth 10 points, covering Weeks 1–8. Use the Canvas calculator; Excel, notes, and AI are unavailable during the test. The rest of the session is for submission checks and technical contingencies. You may leave once the TA verifies your submission. Existing accommodation arrangements apply. See Exams for preparation and the make-up process.
After-class check
Questions spanning objective-coefficient ranges, binding vs. non-binding constraints, shadow prices, reduced cost, and reading a Solver sensitivity report. Retry freely; nothing is submitted.
Weekly take-home (graded: submit on Canvas)
Everything for the take-home goes in one Excel workbook: a city sign shop making three products against three limits, with a business association offering to donate more of one resource. You formulate the model from the brief and wire it up as live formulas yourself, and in the Your model block you commit to a prediction about which limits will bind before you solve. Then you run Solver, take its Sensitivity Report, and read off the shadow prices, the range over which a shadow price still applies, the range over which your plan stays optimal, and the reduced cost of the one product your plan does not make. One resource turns out to be worth nothing at the margin. The report tells you which, and the exact price at which the unmade product would be worth making. Two short responses plus the required AI-use disclosure go on the Free responses sheet. Upload the completed .xlsx on Canvas. That one file is your entire submission.