{"id":38,"date":"2025-04-21T03:24:57","date_gmt":"2025-04-21T03:24:57","guid":{"rendered":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/?post_type=chapter&#038;p=38"},"modified":"2025-09-13T14:35:36","modified_gmt":"2025-09-13T14:35:36","slug":"constrained-optimization","status":"publish","type":"chapter","link":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/chapter\/constrained-optimization\/","title":{"raw":"Constrained Optimization","rendered":"Constrained Optimization"},"content":{"raw":"<div class=\"textbox\">\r\n<p class=\"import-epf\">Edgeworth\u2019s simplification was this assumption: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">every<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">man<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">[person]<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">is<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">a<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">pleasure<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">machine<\/em><\/span>.<\/p>\r\n<p class=\"import-ept\" style=\"text-align: right;\">Robert Heilbroner<\/p>\r\n\r\n<\/div>\r\n<h1 class=\"import-ahaft\">6.1 Maximizing Utility<\/h1>\r\n[caption id=\"\" align=\"aligncenter\" width=\"558\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p174-1.png\" alt=\"AI-generated photo of cigars and brandies\" width=\"558\" height=\"558\" \/> <strong>Figure 6.1: Computer-generated image of cigars and brandies.<\/strong> <br \/>Source: <a href=\"https:\/\/stablediffusionweb.com\/\">Stable Diffusion, 2023<\/a><em>\/\u00a0<\/em><a href=\"https:\/\/stablediffusionweb.com\/license.html\">License.<\/a>[\/caption]\r\n<p class=\"import-pf\">Figure 6.1 shows two things, cigars and brandies, that we will pretend that you enjoy. Economists model the satisfaction and happiness provided by consumption of goods and services by using a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">utility<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">function<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility function is given by this equation:<\/p>\r\n<p class=\"import-eqs\" style=\"text-align: center;\">[latex]U = 18B \u2212 3B^2 + 20C \u2212 C^2[\/latex].<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your job is to choose the number of brandies (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span>) and cigars (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>) that maximize your utility (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><\/span>).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This optimization problem can be solved analytically, with calculus and algebra, but we will use Excel\u2019s Solver instead. As you recall, Solver is a numerical approach to finding the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We need to recast the problem in a way that Excel can understand it, then run Solver to find the optimal values of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The work that follows assumes that you have done the lifeguard problem (in chapter 2) and remember some of it. If you have not or do not remember it, you can continue working, but you will learn more if you review the lifeguard problem before you begin this material.<\/p>\r\n\r\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\r\n<p class=\"import-paft\">Optimization problems always have three parts:<\/p>\r\n\r\n<ol>\r\n \t<li>Goal (objective function)<\/li>\r\n \t<li>Endogenous variables<\/li>\r\n \t<li>Exogenous variables<\/li>\r\n<\/ol>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We know we want to maximize the utility function, so that is our goal. It has to be a formula in a cell that depends on other cells in the spreadsheet.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your endogenous, or choice, variables are <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>. We implement this part of the problem with cells that Solver will use for trial solutions. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box, these are called the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">changing<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">cells<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Finally, the exogenous variables are things the decision-maker cannot change. They are part of the environment. In this problem, your exogenous variables are the coefficients (18, \u22123, 20, and \u22121) and exponents in the utility function. We could set up cells for these exogenous variables, but we will keep things simple and just enter the utility function as is.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Open a blank Excel workbook and save it as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span>. In cell A1, enter a 1, and in cell B1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Brandies<\/em><\/span>. In cell A2, enter a 1, and in cell B2, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cigars<\/em><\/span>. In cell A4, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=18*A1-3*A1\u02c62+20*A2-A2\u02c62<\/em><\/span> and press the <a id=\"_Hlk191054033\"><\/a><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Enter<\/em><\/span> key.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel displays 34 in cell A4 because if you smoke one cigar and sip one brandy, your utility function says that you get 34 utils of satisfaction. Now, there is no such thing as a util, but we will ignore this inconvenient truth, and utils will be the units of measurement of satisfaction.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Change cell A1 to 2.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility rises to 43 utils. This is an improvement in your happiness, but you do not want to simply improve; you want to maximize utility. What are the best values of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>, the ones that make utility the largest number possible?<\/p>\r\n\r\n<h2 class=\"import-bh\">Solving the Problem in Excel<\/h2>\r\n<p class=\"import-paft\">Once we have implemented the problem in Excel, with a formula for the objective function that depends on other cells, we can utilize Solver. It will explore the objective function, trying many solutions. It follows an algorithm, or recipe, when deciding where to move next.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many different optimization algorithms. Sometimes, one fails, but another works. Some are good for several different kinds of problems and others are only useful for specific applications. There is no single algorithm that is better than the others.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Open the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box by clicking the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Data<\/em><\/span> tab and clicking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span>. If it is not there, use the keyboard shortcut <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Alt<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">t<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">i<\/em><\/span> to bring up the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Manager<\/em><\/span> and install it. Click in the objective function field, click on cell A4, click in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Changing <\/em><em class=\"import-i\">Variable Cells<\/em><\/span> field, and select both A1 and A2. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solve<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span> when Excel displays a dialog box reporting that it has found a solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver\u2019s answer is really close to the exact solution, which is to drink 3 brandies and smoke 10 cigars. This yields a utility of 127. You may not believe it, but you will see that it is impossible to get utility higher than 127.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Remember that Solver is hunting and pecking, plugging and chugging through many trial solutions. It changes direction when it does worse and continues forward when it is doing better. It stops when it does not improve by very much. Hence, it sometimes gets the exact right answer, but mostly it just gets very close.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Let\u2019s make sure it is clear that Solver\u2019s answer is not exactly right by widening column A and displaying more decimal points until you see a few zeroes (click the <span class=\"import-ccust1\">Increase decimal<\/span> button repeatedly in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Number<\/em><\/span> group in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your screen should look similar to Figure 6.2. We would never report all those digits because they are meaningless and exhibit false precision. We interpret Solver\u2019s answer as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 3 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 10 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 127, which is the correct answer.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"392\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p177-1.png\" alt=\"screen-capture of cells showing the optimal solution to the cigars and brandies problem\" width=\"392\" height=\"143\" \/> <strong>Figure 6.2: Solver results.<\/strong>[\/caption]\r\n<h2 class=\"import-bh\">Displaying the Optimal Solution<\/h2>\r\n<p class=\"import-paft\">To visualize the optimal solution, we first use a 3D Surface chart. In the next section, we will create a 2D graph, since economists and mathematicians often use contour plots to display two-variable optimization problems.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To create a chart in Excel, we need data. The 3D chart requires a specific layout, with the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis in a row, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis in a column, and the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">z<\/em><\/span>-axis (vertical) in the interior of the table.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cells D2 to D12, enter 0 to 10 by 1. In cells, E1 to Y1, enter 0 to 20 by 1. These are the two horizontal axes in our 3D plot. In cell E2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=18*$D2-3*$D2\u02c62+20*E$1-E$1\u02c62<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice how the $ is being used. We are going to fill this formula down and then right. When we fill it down, it will change the row number for the brandies and continue to use row 1 for the cigars part of the utility function.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Fill your formula in E2 down and then examine the formulas in cells E3 and E12 to confirm that the row number is changing for column D but stays constant at 1 for column E.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select cells E2 to E12, then fill right. Examine the formulas in cells Y3 and Y12 to confirm that column D stays constant but the cigars part of the utility function has changing columns.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Our clever use of the $ has enabled us to create a table that shows how utility varies with changing amounts of brandies (in column D) and cigars (in row 1). The interior of the table displays values of utility.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is easy to see that the maximum utility value is in cell O5. It is surrounded by lower values. Solver reached the top of this hill by crawling up until it got to the top, at 3 brandies and 10 cigars.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select cell O5 and make its background color yellow by clicking the bucket icon in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Font<\/em><\/span> group in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We are now ready to create a chart. As you know, there are three steps: (1) Select the data, (2) choose the desired chart type, and perhaps most important, (3) clean up the chart.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select range D1 (notice that this cell is empty, but you need to select it to get all the rows and columns in the table) to Y12. Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Insert<\/em><\/span> tab and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Recommended<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Charts<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">All<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Charts<\/em><\/span> and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">3-D<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel places a chart that looks like an elongated hill on your spreadsheet. It decided to put cigars (in row 1) on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis because it has more cells, but this is not what we want. We need to clean up this chart.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The first thing to do is to put the brandies axis in the front and the cigars on the side.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab (if needed) and click the <span class=\"import-ccust1\">Switch Row\/Column<\/span> button.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">That looks much better, but we have more cleaning up to do.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Remove the legend (select it and press the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">delete<\/em><\/span> key) and add axes titles for each axis. Click the <span class=\"import-ccust1\">Add Chart Element<\/span> button and select Axis Titles. Use <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Brandies<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Primary<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Horizontal<\/em><\/span> title, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cigars<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Depth<\/em><\/span> title, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Primary<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Vertical<\/em><\/span> title. Change the chart title field text to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Maximization<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is now really looking like something we would be proud to put our name on, but we can do one final improvement: Add more color bands to clearly see that it is a hill.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Double-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> axis to bring up the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Format<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Axis: Axis<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Options<\/em><\/span> screen on the right. Change the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Major<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Units<\/em><\/span> field from 50 to 10.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart now looks like Figure 6.3. The crowded numbers on the Utility axis are not great, but the extra color bands make it easy to see that there is a clear top to this surface.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"728\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p179-1.png\" alt=\"plot in 3D of the utility function with colored rings as elevation rises\" width=\"728\" height=\"436\" \/> <strong>Figure 6.3: A 3D visualization of utility maximization.<\/strong>[\/caption]\r\n<h2 class=\"import-bh\">Contour Plot<\/h2>\r\n<p class=\"import-paft\">Although a 3D plot like Figure 6.3 is useful, solutions to optimization problems with two endogenous variables often use a 2D contour plot that highlights the choice variables.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A contour plot, also called a level curve, displays a 3-dimensional surface by graphing constant vertical slices of the surface, called contours, on a 2-dimensional chart. It is easier to see what it is than to describe it.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy the 3D chart you just made and paste it. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab, click the <span class=\"import-ccust1\">Change Chart Type<\/span> button. Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Contour<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Plot<\/em><\/span> type (with the shaded region that signals the use of color) and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparing the color bands on the two charts makes clear how they are related. The light blue at the top of the hill in the 3D plot is the light blue oval in the contour plot. The orange band is a little lower on the hill, and it is a bigger oval on the contour plot.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is as if you flew on a plane and looked straight down at the hill. The vertical axis is suppressed on the contour plot, but we could put labels with numbers of the vertical height on each slice. This is exactly what a topographic map does.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use your favorite browser to search for \u201ccontour plot hiking map.\u201d Click on a few hits to see how 2D maps can show elevation by displaying numbers on each contour. On a hiking map with concentric squiggly rings, if you stayed on a single ring (which is also known as a contour) as you walked, you would never go up or down.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Contour plots are also used on weather maps. Isobars are contour plots showing the same atmospheric pressure.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Let\u2019s clean up Excel\u2019s contour chart by improving the title and moving the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis from right to left.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click on the title and make it <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility Maximization: Contour Plot<\/em><\/span>. Double-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis and change the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Label<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Position<\/em><\/span> to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">High<\/em><\/span> as shown in Figure 6.4.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"396\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p181-1.png\" alt=\"screen-capture showing how to format an axis in Excel\" width=\"396\" height=\"534\" \/> <strong>Figure 6.4: Moving the y-axis from right to left.<\/strong><br \/>Source: Screenshot of Excel interface, \u00a9 Microsoft Corporation.[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A final enhancement involves placing a point on the optimal solution and labeling it with a callout box (in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> collection in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Insert<\/em><\/span> tab), as shown in Figure 6.5.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"477\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p181-2.png\" alt=\"plot of utility maximization in 2D, with colors showing how to read a contour plot\" width=\"477\" height=\"392\" \/> <strong>Figure 6.5: A 2D contour plot of utility maximization.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparing the 3D and 2D visualizations of this utility maximization problem reveals advantages of each. The 3D version makes clear that the surface is a hill with a maximum, but it is difficult to read the optimal number of brandies and cigars.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">On the other hand, the 2D contour plot makes it really easy to see the max and the values of brandies and cigars that will maximize utility. The trick is that you have to know how to read a contour plot, and now you do.<\/p>\r\n\r\n<h2 class=\"import-bh\">Make It Stick<\/h2>\r\n<p class=\"import-paft\">If we used Solver earlier when we did the lifeguard problem, why are we doing it again? Repeating material is a learning strategy that has been proven to work.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Suppose you want to improve your free throw shooting, and you really cared about this, so you decided to practice for one hour per day for two weeks. Most people would think that actually standing at the free throw line and shooting free throws would be the best use of your time, but this is wrong.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A much better use of your one hour per day is to shoot from all over the court\u2014spending 10 minutes in one spot, then moving to another spot, varying distance from, say, 10 to 20 feet (a free throw is 15 feet from the basket). This is called interleaved practice, and it also works for learning!<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">By doing the lifeguard problem, then doing other things and returning to a slightly different optimization problem, you are burying deeper channels in your brain about Solver and optimization.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Every time you repeat something in Excel, especially in the context of a different situation, you get a little better at it. The novelty of the new problem is important so that you are not doing the exact same thing, but you are making connections and learning.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If you want to know more about the neuroscience behind how you learn and other optimal learning strategies, search for Brown et al.\u2019s 2014 book <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Make It Stick<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Watch <a href=\"http:\/\/dub.sh\/howtostudy\">dub.sh\/howtostudy<\/a>\u00a0to see some of these ideas applied to optimal studying.<\/p>\r\n[embed]https:\/\/www.youtube.com\/watch?v=CPxSzxylRCI[\/embed]\r\n<div class=\"textbox textbox--key-takeaways\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Takeaways<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">We revisited work we did earlier using Solver, Excel\u2019s numerical optimization add-in.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel\u2019s Solver easily found the optimal solution to a simple two-variable utility maximization problem.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver applies an iteration procedure and stops when it cannot improve by very much. This produces an answer that is not exactly correct, even though the many decimal places it reports seem like it is giving a really precise answer, a phenomenon common to numerical algorithms known as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">false<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">precision<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Two Excel chart types were used to visualize the optimal solution: 3D surface and contour plot.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The 2D contour plot is the best-practice way to display the problem because it highlights the two endogenous variables (one on each axis) and makes it easy to see the numerical values of the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Learning also involves optimization, with better and worse ways to use your time. You definitely want to study and learn optimally.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">References<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"hanging-indent\">The epigraph is from p. 173 of the 7th edition of Robert Heilbroner\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Worldly<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Philosophers<\/em><\/span>. First published in 1953, this classic tells the story of how economics was born and came to be the mathematical discipline that it is today. It is an easy read, and until <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Freakonomics<\/em><\/span> (by Stephen J. Dubner and Steven Levitt) exploded on the scene in 2009, Heilbroner\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The <\/em><em class=\"import-i\">Worldly<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Philosophers<\/em><\/span> had the highest sales of any economics book.<\/p>\r\n<p class=\"hanging-indent\">Francis Edgeworth was a key player in the mathematization of economics. <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Mathematical<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Psychics<\/em><\/span>, published in 1881, was an early application of optimization and comparative statics.<\/p>\r\n<p class=\"hanging-indent\">Brown, P., Roediger, H., III, and McDaniel, M. (2014). <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Make It Stick: The Science of Successful Learning<\/em><\/span> (Belknap Press).<\/p>\r\n<p class=\"hanging-indent\">Memorize Academy. (2016, Dec. 15). <em data-start=\"398\" data-end=\"481\">How to Study Effectively for School or College \u2013 Top\u202f6\u202fScience\u2011Based Study Skills<\/em> [Video]. YouTube. <a class=\"\" href=\"https:\/\/www.youtube.com\/watch?v=CPxSzxylRCI\" target=\"_new\" rel=\"noopener\" data-start=\"500\" data-end=\"543\">https:\/\/www.youtube.com\/watch?v=CPxSzxylRCI.<\/a><\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<h1 class=\"import-ah\">6.2 Constrained Utility Maximization<\/h1>\r\n<p class=\"import-paft\">Your doctor says that you are killing yourself by smoking too many cigars and drinking too much brandy. She restricts your consumption to a total of 5.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You can have 5 brandies and no cigars or 2, 3, or any other combination that adds up to 5 or fewer. You can choose fractional amounts like one-third of a brandy and four and two-thirds cigars or 1.5 and 3.5.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You cannot, however, maintain your current daily consumption of 3 and 10. That adds up to 13 and violates the constraint.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility function remains the same:<\/p>\r\n<p class=\"import-eqs\" style=\"text-align: center;\">[latex]U = 18B \u2212 3B^2 + 20C \u2212 C^2[\/latex].<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">But we need to add the constraint to properly state this optimization problem. Mathematically, the doctor said that <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2264 5. Formally, we write the problem like this, where s.t. stands for \u201csubject to\u201d:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\underset{B , C}{max} U = 18 B - 3 B^{2} + 20 C - C^{2}[\/latex]\r\n[latex]\\text{s} .\\text{t} . B + C \\leq 5[\/latex]<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You wonder how you are going to solve this problem. It can be done analytically, but you ask yourself if Solver can do it. Yes, of course it can.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As usual, we will have to implement the problem in Excel. Then we can run Solver to find the optimal solution.<\/p>\r\n\r\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\r\n<p class=\"import-paft\">We have the unconstrained version of the problem already set up, so we start from there.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make a copy of the sheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook by right-clicking the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Sheet1<\/em><\/span> sheet tab in the bottom left, selecting <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Move<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">or<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Copy<\/em><em class=\"import-i\">\u00a0.\u00a0.\u00a0.<\/em><\/span>, checking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Create<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">a<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">copy<\/em><\/span>, and clicking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Rename the sheet <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><em class=\"import-i\">on<\/em><em class=\"import-i\">O<\/em><em class=\"import-i\">pt<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The new information that we have to implement is the constraint. It is convenient to rewrite the constraint as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2212 5 \u2264 0. This way, violations of the constraint occur whenever <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2212 5 is positive.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell A6, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=A1+A2-5<\/em><\/span>. In cell B6, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">constraint<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now we are ready to call Solver. Excel will include the choices you entered before in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box, but we have to add the constraint.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Data<\/em><\/span> tab, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span>. Confirm that the objective function, max, and changing cells are correct, then click the <span class=\"import-ccust1\">Add<\/span> button. From the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add Constraint<\/em><\/span> dialog box, click on cell A6 for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cell<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Reference<\/em><\/span> field, choose <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">le<\/em><\/span>, and enter a 0 in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Constraint<\/em><\/span> field. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Notice that Excel adds the constraint to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solve<\/em><\/span>. Excel announces success! Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We interpret Solver\u2019s answer as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 79, which is the correct answer. To maximize utility subject to the constraint of no more than 5 combined units of cigars and brandies, the best combination is 1 brandy and 4 cigars. This yields a utility of 79 and cannot be beaten by any other combination of brandies and cigars that does not violate the constraint.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice that the constraint cell is not exactly zero, but it is very close to zero. Cell A6 shows something like 5.02825E-08. This is a number expressed in scientific notation, and it means 5.02825 \u00d7 10<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">\u2212<\/sup><sup class=\"import-sup\">8<\/sup><\/span>. This is a tiny number. You can make it exactly zero if you wish by changing cells A1 and A2 to 1 and 4, respectively.<\/p>\r\n\r\n<h2 class=\"import-bh\">Visualizing the Optimal Solution<\/h2>\r\n<p class=\"import-paft\">Figure 6.6 displays a 3D surface and contour plot of the constrained utility maximization problem. On the 3D surface plot, the constraint is a barrier that blocks attainment of the unconstrained max at the top of the hill. On the contour plot, the constraint is a line, because if you looked straight down at the barrier from directly above, you would see just a line.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"780\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p186-1.png\" alt=\"plots of 3D and 2D visualizations of constrained optimization\" width=\"780\" height=\"288\" \/> <strong>Figure 6.6: Visualizing constrained utility maximization.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make two separate lists of things you like and do not like for the 3D surface plot and the contour plot. See the appendix if you need help, but do not immediately go there. Try to make the lists yourself before looking at the appendix.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">One thing that is extremely important about the contour plot is that it clearly reveals the optimal solution. We can use Excel\u2019s wireframe version of the contour plot to see this.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy and paste your contour plot, then click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Change<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Chart<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Type<\/em><\/span> in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab. Select the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wireframe<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Contour<\/em><\/span> in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> group of charts.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is now much easier to see the contour lines. Since there is a contour line for every value of utility, there is actually an infinity of contour lines. Your chart shows only a few of them.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Carefully place a line (use the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Line<\/em><\/span> object in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> collection) from the point 0, 5 to 5, 0 as shown in Figure 6.7.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"789\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p187-1.png\" alt=\"plot using Excel's wireframe option to show contours clearly\" width=\"789\" height=\"607\" \/> <strong>Figure 6.7: Understanding contour lines with the Wireframe chart.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">At the optimal solution (at 1, 4), there is a contour slightly above and another below. The curve above has a utility value greater than 79, and the one below is less than 79. There is a curve not shown in Figure 6.7 that is in between the two contours above and below point 1, 4. This contour just touches the constraint line, and it has a utility value of exactly 79. This contour is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">tangent<\/em><\/span> to the diagonal constraint.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A point of tangency means that there is contact at a single point but no crossing. Figure 6.8 shows why tangency is a visualization of the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If the constraint line cuts or intersects a curve, we immediately know this is not the optimal solution. If we are cutting a contour, we can move along the constraint line to reach a higher contour.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">In Figure 6.8, the highest curve (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">&gt;<\/em><\/span> 79) is beyond our reach. The one that just touches the line is the best we can do. Tangency instantly reveals the solution and explains why the 2D contour plot is used to visualize constrained optimization.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"183\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p188-1.png\" alt=\"rough sketch of contours and constraint to explain tangency as the optimal solution\" width=\"183\" height=\"130\" \/> <strong>Figure 6.8: Tangency displays the optimal solution.<\/strong>[\/caption]\r\n\r\n<div class=\"textbox textbox--key-takeaways\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Takeaways<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">Excel\u2019s Solver add-in can handle constrained optimization. You provide a cell with the constraint and then add the constraint in Solver\u2019s dialog box.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is a conventional graph that is used to visualize constrained optimization problems. It relies on the point of tangency in a contour plot to instantly highlight the solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To read a contour plot, remember that it is a top-down view of a 3D surface.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel has several 3D surface and contour charts. The chart can be augmented with a variety of drawing objects and text boxes.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Appendix<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">Figure 6.9 shows a few pros and cons of the two charts. The only con for the contour plot is the prerequisite knowledge needed to read it.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"747\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p188-2.png\" alt=\"table layour of pros and cons of 3D and 2D visualizations\" width=\"747\" height=\"172\" \/> <strong>Figure 6.9: Comparing 3D surface and 2D contour plots.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">For those in the know, a 2D contour plot is preferred because of the way the tangency draws attention to the optimal solution. It is easy to see the values that solve the constrained optimization problem.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<h1 class=\"import-ah\">6.3 Comparative Statics with CSWiz<\/h1>\r\n<p class=\"import-paft\">Your doctor is some kind of evil genius (or an economist), and she wants to explore your response to different values of the total allowed units of cigars and brandies.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This is formally known as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">comparative<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">statics<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">analysis<\/em><\/span>. We change one exogenous variable, and we see what effect it has on the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There\u2019s an Excel add-in for that\u2014it is called the Comparative Statics Wizard (CSWiz). After explaining comparative statics in more detail, we will use the CSWiz add-in on the constrained optimization version of the cigars-and-brandies problem.<\/p>\r\n\r\n<h2 class=\"import-bh\">The Logic of Comparative Statics<\/h2>\r\n<p class=\"import-paft\">We did comparative statics analysis earlier with the lifeguard problem (in chapter 2). We turned the lifeguard into a freakish combination of Michael Phelps and Usain Bolt. The optimal solution had us running more, since we were so much faster.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We also did comparative statics analysis when we changed the product price facing the farmer (in section 2.4). As the product price rises, the farmer responds by buying more seed.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There were two more comparative statics examples when we combined Monte Carlo simulation and optimization. The first involved pooled testing (in section 3.3). We lowered the infection rate from 5% to 1%, and this made the optimal group size bigger. The second explored how lowering the cost of searching led to more searches (in section 3.4).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">All these examples worked the same way. We solved an optimization problem, then we changed a single exogenous variable and kept everything else the same. We focused on the effect the change had on the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Before we do another example, let\u2019s repeat and make crystal clear the logic of comparative statics. It involves a four-step procedure:<\/p>\r\n\r\n<ol>\r\n \t<li>We set up the problem and find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">initial<\/em><\/span> solution.<\/li>\r\n \t<li>We change a single exogenous variable, called the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">shock<\/em><\/span>, holding all other exogenous variables constant. We use a Latin phrase, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ceteris paribus<\/em><\/span>, as shorthand. This literally means \u201cwith other things held equal,\u201d and we use the phrase to mean <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">everything<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">else<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">held<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">constant<\/em><\/span>.<\/li>\r\n \t<li>We find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">new<\/em><\/span> optimal solution.<\/li>\r\n \t<li>Finally, we <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">compare<\/em><\/span> the new to the initial solution to see how the optimal solution responded to the shock.<\/li>\r\n<\/ol>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparative statics is the fundamental methodology of economics. It gives a framework for interpreting observed behavior. This framework has been given many names, including the method of economics, the economic approach, the economic way of thinking, and economic reasoning.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As you know, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">comparative<\/em><\/span> clearly points to the comparison between the new and initial solution, but the meaning of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">statics<\/em><\/span> (not to be confused with statistics) is less obvious. It means that we are going to focus on optimal (or equilibrium) positions and not worry about the path of the solution as it moves from the initial to the new point.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We have several ways of comparing the new and initial solutions. A qualitative comparison focuses only on direction (up or down), while quantitative comparisons compute magnitudes of the change in response (as either a difference or a percentage change).<\/p>\r\n\r\n<h2 class=\"import-bh\">Another Example<\/h2>\r\n<p class=\"import-paft\">We start with the initial constrained optimization problem, which can be formally written like this:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\underset{B , C}{max} U = 18 B - 3 B^{2} + 20 C - C^{2} [\/latex]\r\n[latex]\\text{s} .\\text{t} . B + C \\leq 5[\/latex]<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We know that the initial solution is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 79.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your doctor surprises you at your next appointment. She is happy with your latest test results and says that you can safely have one more brandy or cigar, so your total allowed amount is now 6. How will you respond to this new development?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>From your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ConOpt<\/em><\/span> sheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook, change the 5 in cell A6 to 6. What happens?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The constraint cell is now negative. This means that you are below the constraint. The barrier has moved upward, so you have room to climb higher up the utility hill. But what exactly will you do?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Run Solver. What happens?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">With a total of 6 cigars and brandies allowed, your new optimal solution is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1.25 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4.75, yielding a maximum utility of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 90.25.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This makes sense. You take advantage of the loosened constraint to sip a little more brandy and smoke more cigars. That is a qualitative or directional statement. It is like saying that when the price goes down, you buy more.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A quantitative or magnitude statement would be to compute how much more you drink and smoke. You went from 1 to 1.25 brandies as the total amount allowed went from 5 to 6, so that increase is 0.25 brandies. The delta (or difference) for cigars is 0.75, since you went from 4 to 4.75.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is another way to make a quantitative statement using elasticity. The Comparative Statics Wizard and the results it generates will help us explain how to compute and interpret an elasticity.<\/p>\r\n\r\n<h2 class=\"import-bh\">The Comparative Statics Wizard<\/h2>\r\n<p class=\"import-paft\">We use a free Excel add-in, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CSWiz.xla<\/em><\/span>, to do comparative statics analysis. It works with Solver to find the optimal solution given different values of an exogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Download the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CSWiz.xla<\/em><\/span> file from <a href=\"http:\/\/dub.sh\/addins\">dub.sh\/addins<\/a>\u00a0and use the Add-ins Manager (File \u2192 Options \u2192 Add-ins \u2192 Go or keyboard shortcut <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Alt<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">t<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">i<\/em><\/span>) to install it. Once installed, click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> tab to see that it is under the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> group.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To use the CSWiz add-in, we need to modify our Excel implementation of the constrained optimization problem. Instead of hard-coding the total allowed amount of cigars and brandies, we need to make a cell for this exogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell B8 of your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ConOpt<\/em><\/span> sheet, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>. In cell A8, enter the number 5. Connect this total value to the constraint cell in A6 by changing the constraint formula to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=A1+A2<\/em><em class=\"import-i\">-<\/em><em class=\"import-i\">A8<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We are now ready to run the Comparative Statics Wizard. We will provide information in a series of steps.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> tab, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span>, and then <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Comp<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Statics<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As you walk through the steps, be sure to read carefully and think about the information you are providing. The following is the input you need to give as you walk through the steps:<\/p>\r\n\r\n<ol>\r\n \t<li>Clicking the <span class=\"import-ccust1\">Input<\/span> button produces an input box that asks for the objective function cell. Click on cell A4 and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. A second box asks for the endogenous variables. Select cells A1 and A2 (both of them) and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. The final input box asks for the exogenous variables. Click on cell A8 and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Usually, there is more than one exogenous variable, so you would select all of them. When done, you return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> dialog box, but your inputs are displayed. Confirm that they are correct and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\r\n \t<li>Click the <span class=\"import-ccust1\">Run Solver<\/span> button to call Solver and run it. Solver needs to successfully find the correct solution to continue. If not, we cannot do comparative statics analysis. When done, you return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> dialog box. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\r\n \t<li>This step is like the first one in that you are asked three questions. Click the <span class=\"import-ccust1\">Input<\/span> button. Click cell A8 because this is the cell that we want to vary to see how the optimal solution responds. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. In the second input box, enter the number 1. This will change cell A8 by 1. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. In the final input box, leave the default choice of 5. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. You return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span>, and the results of your input are displayed. Confirm that everything is correct and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\r\n \t<li>The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> now has all the information it needs. Clicking the <span class=\"import-ccust1\">Run Comparative Statics Analysis<\/span> button will do just that. Excel will solve the problem for total values from 5 to 10 by 1. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Progress<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Bar<\/em><\/span> will advance quickly because this problem is simple, and we only asked for 5 shocks. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\r\n \t<li>Read the message on the final screen and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Finish<\/em><\/span>.<\/li>\r\n<\/ol>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You are taken to a new worksheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook that displays the results of the comparative statics analysis that you just performed. We use these results to figure out and explain how changing the total allowed amount affects the optimal consumption of brandies and cigars.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>We did not name any cells, so the results show cell addresses. We can fix this by entering the names of the variables. Cells A5 and A8 are <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>. Cells B8, C8, and D8 are Utility<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, and C<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, respectively. Widen the columns if needed to display the results neatly.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The results confirm our work for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span> = 5 and 6, but the results extend the comparative statics analysis to total allowed amounts of 7, 8, 9, and 10. Of course, Solver\u2019s numbers suffer from false precision, but we know how to interpret them.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Enter the text DB\/DTotal in cell E8. In the formula bar, select the first D and change the font to Symbol (in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab). Repeat for the second D.<\/p>\r\n\r\n<div class=\"textbox\">\r\n<p class=\"import-bxt\" style=\"padding-left: 40px;\"><span style=\"color: #339966;\"><strong><em>EXCEL TIP <\/em><\/strong><\/span>Excel allows you to apply formatting to individual characters in a cell. This means you can use different fonts, colors, and sizes for different parts of a cell.<\/p>\r\n\r\n<\/div>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell E10, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=(C10<\/em><\/span>-<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C9)\/(A10<\/em><\/span>-<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">A9)<\/em><\/span> and fill it down.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">That is interesting\u2014every time you get an extra total amount allowed, you devote 0.25 of it to brandies (and 3<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">\/<\/em><\/span>4 to cigars). In other words, the relationship between optimal brandies and the total amount allowed is linear. We can confirm this with a graph.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make a chart of B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> as a function of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"723\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p194-1.png\" alt=\"plot of how brandy consumption increases as total allowed increases\" width=\"723\" height=\"442\" \/> <strong>Figure 6.10: How brandy consumption responds to the total allowed.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart should look like Figure 6.10. Notice that we are not displaying an optimal solution. Instead, this chart is tracking how the optimal solution responds to changes in an exogenous variable. This is a common way to present the results of comparative statics analysis.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is a similar chart of optimal cigars. The relationship is linear, but the slope is bigger, so the line is steeper. It would be good practice to compute the slope and make this chart.<\/p>\r\n\r\n<div class=\"textbox textbox--key-takeaways\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Takeaways<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">People often think that economics is defined by its content. They think that if you study something like unemployment or money, then you are doing economics.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Actually, modern economics is defined by its methodology. Economists use optimization and comparative statics on anything involving choice. Economics can be applied to war, marriage, and many other \u201cnoneconomic\u201d questions.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You can be sure that optimization and comparative statics will be applied if you ever see a title that begins with \u201cAn Economic Analysis of\u201d\u2014this means that whatever is being studied will be analyzed and seen as an optimization problem.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We use comparative statics to interpret changes in behavior (you sipped more brandy when the constraint loosened) and to predict responses (lowering the price will trigger an increase in quantity demanded).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The Comparative Statics Wizard is a numerical approach, as opposed to analytical approaches that use mathematics.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">CSWiz.xla is an Excel add-in that takes advantage of Excel\u2019s Solver add-in. The user provides information about the problem and which variable is to be shocked. CSWiz does the tedious work of solving the problem at different values of the exogenous variable and keeps track of the optimal solutions.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Once you have the results, further analysis can be performed. Often, we are interested in the relationship between variables, and we draw graphs to visualize how an endogenous variable responds to an exogenous shock.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<h1 class=\"import-ah\">6.4 Elasticity<\/h1>\r\n<p class=\"import-paft\">You probably have heard of the price elasticity of demand, but you may not know what it means or how to use the concept.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Our goal is to truly understand elasticity and be comfortable using it. At its most fundamental level, it is simply a numerical measure of responsiveness.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">In the initial version of the lifeguard problem, the lifeguard entered the water after running roughly 56 meters. When maximum running speed doubled to 10 m\/sec, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ceteris paribus<\/em><\/span>, the optimal solution changed to running almost 80 meters. We can (and did) show this on a graph, but is there a faster way to summarize comparative statics analysis? Yes\u2014in a word, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">elasticity<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We have been working on a constrained optimization problem where you sipped 1 brandy and smoked 4 cigars when the doctor set a limit of 5 total brandies and cigars. When that limit was relaxed and you were allowed a total of 6 units, you chose 1.25 brandies and 4.75 cigars. Again, we can (and did) show this on a graph, but elasticity captures the relationship between the amount consumed and the total allowed in a single number.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We proceed by reviewing a few general ideas about elasticity and what it is trying to convey. Then we move to actual computations and practice interpreting elasticity values.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The more examples you see, the more the concept will stick. Be sure to keep an eye out for the repeated pattern in the elasticity. We always have an optimal solution that is responding to a shock, and the elasticity measures if the response is weak or strong.<\/p>\r\n\r\n<h2 class=\"import-bh\">Elasticity Basics<\/h2>\r\n<p class=\"import-paft\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Elasticity<\/em><\/span> is a pure number (it has no units) that measures the sensitivity or responsiveness of one variable when another changes. <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Elasticity<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">responsiveness<\/em><\/span>, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">sensitivity<\/em><\/span> are synonyms. An elasticity number expresses the impact one variable has on another. The closer the elasticity is to zero, the more insensitive or inelastic the relationship is between two variables.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity is often expressed as \u201cthe something elasticity of something,\u201d like the price elasticity of demand. The first something, the price, is always the exogenous variable; the second something\u2014in this case, demand (the amount purchased)\u2014is the response or optimal value being tracked.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A less common, but perhaps clearer, way to express the cause and effect is to say, \u201cThe elasticity of something with respect to something.\u201d The elasticity of demand with respect to price makes it clear that demand depends on and responds to the price.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Unlike the difference between the new and initial values, elasticity is computed as the ratio of percentage changes in the values. The endogenous or response variable always goes in the numerator, and the exogenous or shock variable is always in the denominator. Thus, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> is [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex].<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The percentage change, [latex]\\frac{new - initial}{initial}[\/latex], is the change (or difference), new minus initial, divided by the initial value. This affects the units in the computation. The units in the numerator and denominator of the percentage change cancel, and we are left with a percent as the units. If we compute the percentage change in apples from 2 to 3 apples, we get a 50% increase. The change (or delta), however, is +1 apple.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If we divide one percentage change by another, as we do with an elasticity computation, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], the percentages cancel, and we get a unitless number. Thus, elasticity is a pure number with no units. So if the price elasticity of demand for apples is \u22121.2, there are no apples, dollars, percents, or any other units. It\u2019s just \u22121.2.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The \u22121.2 can be used to compute the percentage change in apples if the price of apples increases by 10%. We simply multiply \u22121.2 by 10% to get \u221212%. Or if the price of apples falls by 20%, we know that the quantity demanded of apples will rise by 24% (\u22121.2 \u00d7 \u221220%).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can also use an elasticity to compute the exogenous shock needed to produce a given percentage change in the endogenous variable. If ApplesRUs Inc. knew that the price elasticity of demand for apples was \u22121.2 and they wanted to increase apples sold by 6%, then they would lower prices by 5% (6% divided by \u22121.2).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity is a ratio of percentage changes, so there are three numbers involved: the elasticity, the percentage change in the numerator, and the percentage change in the denominator. We are given and use two of the three to find the third one:<\/p>\r\n<p class=\"import-nlf\" style=\"margin-left: 18pt; text-indent: 18pt;\">1. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> and %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, find the elasticity: [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex].<\/p>\r\n<p class=\"import-nl\" style=\"margin-left: 18pt; text-indent: 18pt;\">2. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> and elasticity, find the %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">elasticity<\/em><\/span> \u00d7 %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>.<\/p>\r\n<p class=\"import-nll\" style=\"margin-left: 18pt; text-indent: 18pt;\">3. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> and elasticity, find the %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x:\u00a0<\/em>[latex]\\frac{\\%\\Delta y}{elasticity}[\/latex]<\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The lack of units in an elasticity measure means we can compare wildly different things. No matter the underlying units of the variables, we can put the dimensionless elasticity number on a common yardstick and interpret it.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.11 shows the possible values that an elasticity can take, along with the names we give particular values.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"874\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p198-1.png\" alt=\"rough sketch of a number line with labels for elasticity ranges and their names\" width=\"874\" height=\"327\" \/> <strong>Figure 6.11: Elasticity on the number line.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Empirically, elasticities are usually low numbers around 1 (in absolute value). An elasticity of +2 is extremely responsive or elastic because the response is twice the shock. It means that a 1% increase in the exogenous variable generates a 2% increase in the endogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The sign of the elasticity indicates direction (a qualitative statement about the relationship between the two variables). Zero means that there is no relationship\u2014that is, the exogenous variable does not influence the response variable at all. Thus, \u22122 is extremely responsive like +2, but the variables are inversely related, so a 1% <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">increase<\/em><\/span> in the exogenous variable leads to a 2% <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">decrease<\/em><\/span> in the endogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">One (both positive and negative) is an important marker on the elasticity number line because it tells you if the given percentage change in an exogenous variable results in a smaller percentage change (when the elasticity is less than 1), an equal percentage change (elasticity equal to 1), or greater percentage change (elasticity greater than 1) in the endogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The adjective <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">perfectly<\/em><\/span> is used to identify two extreme cases. If the elasticity is 0, it is perfectly inelastic, and this means there is no response at all to a shock. This is rare; usually optimal values of endogenous variables adjust to changes in the environment.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">\u201cPerfectly elastic\u201d means the elasticity measure is infinity (positive or negative). This means that the tiniest little change in an exogenous variable triggers a massive response in the endogenous variable. Again, this is a rare, limiting case for elasticity.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticities can be confusing. There is a lot to remember. The following are six common misconceptions and issues surrounding elasticity. Reading these typical mistakes will help you better understand this fundamental but easily misinterpreted concept.<\/p>\r\n\r\n<ol>\r\n \t<li>Elasticity is about the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">relationship<\/em><\/span> between two variables, not just the change in one variable. Thus, do not interpret a negative elasticity as meaning that the response variable must decrease. The negative means that the two variables move in opposite directions. So if the age elasticity of time playing sports is negative, that means that both time playing sports falls as age increases and time playing sports rises as age decreases.<\/li>\r\n \t<li>Elasticity is a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">local<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">phenomenon<\/em><\/span>. The elasticity will usually change if we analyze a different initial value of the exogenous variable. Thus, any one measure of elasticity is a local or point value that applies only to the change in the exogenous variable under consideration from that starting point. You should not think of a price elasticity of demand of \u22120.6 as applying to an entire demand curve. Instead, it is a statement about the movement in price from one value to another value close by\u2014say, $3.00\/unit to $3.01\/unit. The price elasticity of demand from $4.00\/unit to $4.01\/unit may be different. There are constant elasticity functions, where the elasticity is the same all along the function, but they are a special case.<\/li>\r\n \t<li>Elasticity can be calculated for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">different<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">size<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">changes<\/em><\/span>. To compute the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, we can go from one point to another, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], but the size of the change in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> can vary. The computed elasticity will be different depending on the size of the shock if the relationship is nonlinear.<\/li>\r\n \t<li>Elasticity always puts the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">response<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">variable<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">in<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">the<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">numerator<\/em><\/span>. Do not confuse the numerator and denominator in the computation. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> is the exogenous or shock variable and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> is the endogenous or response variable. Students will often compute the reciprocal of the correct elasticity. Avoid this common mistake by always checking to make sure that the variable in the numerator responds to or is driven by the variable in the denominator.<\/li>\r\n \t<li>Remember that elasticity is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">unitless<\/em><\/span>. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> of 0.2 is not 20%. It is 0.2. It means that a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> leads to a 0.2% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>.<\/li>\r\n \t<li>Perhaps the single most confusing thing about elasticity is its relationship to the slope: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Do not confuse elasticity with slope.<\/em><\/span> This is easy to forget and deserves careful consideration. Remember that elasticity is a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">percentage<\/em><\/span> change calculation, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], while a slope is merely the rise over the run, [latex]\\frac{\\Delta y}{\\Delta x}[\/latex].<\/li>\r\n<\/ol>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Economists, unlike chemists or physicists, often gloss over the units of variables and results. If we carefully consider the units involved, we can ensure that the difference between the slope and elasticity is crystal clear.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The slope is a quantitative measure in the units of the two variables being compared. If [latex]Q^* = \\frac{P}{2}[\/latex], then the slope [latex]\\frac{\\Delta Q^*}{\\Delta P} = \\frac{1}{2}[\/latex]. This says that an increase in P of $1\/unit will lead to an increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>* of 1\/2 a\u00a0unit. Thus, the slope would be measured in units squared per dollar (so that when multiplied by the price, we end up with just units of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity, on the other hand, is a quantitative measure based on percentage changes and is therefore unitless. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>* = 1 says that a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span> leads to a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>*. It does not say anything about the actual numerical $\/unit increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span>, but it does speak of the percentage increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span>. Elasticity focuses on the percentage change in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>*, not the change in terms of number of units.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Thus, elasticity and slope are two different ways to measure the responsiveness of a variable as another variable changes. Elasticity uses percentage changes, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], while the slope does not, [latex]\\frac{\\Delta y}{\\Delta x}[\/latex]. They are two different ways to measure the effect of a shock, and confusing them is a common mistake.<\/p>\r\n\r\n<h2 class=\"import-bh\">Computing Elasticity<\/h2>\r\n<p class=\"import-paft\">When the total allowed for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> went from 5 to 6, you changed B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> from 1 to 1.25 and C<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> from 4 to 4.75. We can compute two elasticities with these numbers.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of brandies is<\/p>\r\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta B^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta B^{*}}{B^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\frac{n e w B - i n i t i a l B}{i n i t i a l B}}{\\frac{n e w T - i n i t i a l T}{i n i t i a l T}} = \\frac{\\frac{1.25 - 1}{1}}{\\frac{6 - 5}{5}} = \\frac{0.25}{0.2} = 1.25[\/latex]<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of brandies is 1.25 because we had a 20% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> (from 5 to 6), and this led to a slightly bigger 25% increase in brandies (from 1 to 1.25). Thus, we say that the brandies response is elastic, or pretty responsive. Figure 6.11 shows that any elasticity greater than 1 in absolute value is said to be elastic.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of cigars is<\/p>\r\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta C^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta C^{*}}{C^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\frac{n e w C - i n i t i a l C}{i n i t i a l C}}{\\frac{n e w T - i n i t i a l T}{i n i t i a l T}} = \\frac{\\frac{4.75 - 4}{4}}{\\frac{6 - 5}{5}} = \\frac{0.1875}{0.2} = 0.9375[\/latex]<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of cigars is 0.9375 because we had a 20% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> (from 5 to 6), and this led to a slightly smaller 18.75% increase in cigars (from 4 to 4.75). Thus, we say that the cigars response is inelastic, or unresponsive. Figure 6.11 shows that any elasticity less than 1 in absolute value is said to be inelastic.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Since we know the slope of the optimal brandies as a function of total allowed is 0.25 and the total allowed elasticity of brandies is 1.25, that is conclusive proof that elasticity and slope are different. Another way we can show the difference is with a little algebra:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta B^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta B^{*}}{B^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\Delta B^{*}}{B^{*}} \\frac{T}{\\Delta T} = \\frac{\\Delta B^{*}}{\\Delta T} \\frac{T}{B^{*}}[\/latex]<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The last term shows we can compute the elasticity by multiplying the slope by [latex]\\frac{T}{B^*}[\/latex]. This shows that elasticity is slope times the ratio of the exogenous to the endogenous variable values. In this example, 0.25 times 5\/1 is 1.25.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can also show that elasticity changes as you change the point from which it is measured.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CS1<\/em><\/span> sheet, put the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">%DB\/%DT<\/em><\/span> in cell F8 and then change the two <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">D<\/em><\/span>s to Symbol font. In cell F10, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=((C10<\/em><\/span>-<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C9)\/C9)\/((A10<\/em><\/span>-<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">A9)\/A9)<\/em><\/span> and fill it down.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Cell F10 reproduces the 1.25 elasticity we computed earlier, but notice how the elasticities get smaller as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> rises. Again, this shows that elasticity is not slope, since the slope stays constant while the elasticity changes.<\/p>\r\n\r\n<h2 class=\"import-bh\">Elasticity Practice<\/h2>\r\n<p class=\"import-paft\">Work on these elasticity computations and questions to improve your understanding. Answers are provided in the appendix (according to step number).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>1. Compute the max run speed elasticity of distance on sand in the lifeguard problem as max run speed is increased from 5 m\/sec to 10 m\/sec. Interpret your result.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>2. Compute the IR (infection rate) elasticity of group size as IR falls from 5% to 2%. Recall that optimal group size rose from 5 to 8. Interpret your result.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>3. Compute the slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) and use it to compute the total allowed elasticity of cigars at <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 5. Does your number agree with the 0.9375 value we found earlier?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>4. Compute the slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) and the total allowed elasticity of cigars from <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 9 to 10. Does the slope or elasticity change compared to the elasticity from <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 5 to 6? What does this show?<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"923\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p203-1.png\" alt=\"plot showing smoking reached a peak in US earlier than Japan\" width=\"923\" height=\"611\" \/> Figure 6.12: Smoking rates in Japan and the United States. <br \/>Source: <a href=\"http:\/\/ourworldindata.org\/smoking\">Our World in Data<\/a> \/ <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY 4.0.<\/a>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Cigarettes have been extensively studied. The average number of cigarettes sold per day in the United States and Japan since 1900 is shown in Figure 6.12.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Visit <span style=\"border: none windowtext 0pt; padding: 0;\"><span class=\"import-url\">ourworldindata.org\/smoking<\/span><\/span> to see an interactive version of this chart and to add other countries. The pattern is the same around the world\u2014rising smoking rates reach a peak, then they decline. Today, a little over 10% of American adults smoke, down from 40% at the peak.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Governments want to reduce cigarette consumption to improve public health. Banning advertising is common, as is taxing cigarettes. The idea is that increasing the total price consumers must pay (the price plus the tax) will reduce consumption. Whether this works depends on the price elasticity of demand (the quantity purchased).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>5. To reduce cigarette consumption in response to a tax, what are governments hoping is true about the price elasticity of demand for cigarettes?<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>6. What do you think is a good guess for the price elasticity of demand for cigarettes? Explain your answer.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>7. How do you think the price elasticity of demand for cigarettes compares between adult and teenage smokers? Explain your answer.<\/p>\r\n\r\n<div class=\"textbox textbox--key-takeaways\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Takeaways<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">Comparative statics is how economists view the world, and elasticity is how they communicate comparative statics results.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You want to be able to interpret and compute it:<\/p>\r\n<p class=\"hanging-indent\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Interpret:<\/em><\/span> The closer an elasticity is to zero, the less responsive the endogenous variable is to a particular shock.<\/p>\r\n<p class=\"hanging-indent\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Compute:<\/em><\/span> The exogenous variable elasticity of the endogenous variable is always the percentage change in the endogenous variable divided by the percentage change in the exogenous variable.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are other ways to compute elasticities. The ratio of percentage changes is the simplest, most basic approach.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">References<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"hanging-indent\">The economics literature on cigarette smoking is vast: Sloan, F. A., Smith, V. K., and Taylor, D. H. (2002). \u201cInformation, Addiction, and Bad \u2018Choices\u2019: Lessons from a Century of Cigarettes.\u201d <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Economics Letters<\/em><\/span> 77, pp. 147\u2013155, is an accessible, informative starting point.<\/p>\r\n<p class=\"hanging-indent\">For a broader, historical review, see Brandt, A. M. (2007). <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The Cigarette Century: The Rise, Fall, and Deadly Persistence of the Product That Defined America<\/em><\/span> (Basic Books).<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Appendix<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<ol>\r\n \t<li>The max run speed elasticity of distance on sand is 0.43 and this is quite inelastic, or unresponsive. Max run speed was doubled (so a 100% increase), and distance on sand did increase, but only by 43%.<\/li>\r\n \t<li>The IR elasticity of group size is \u22121, and this is unit elastic. IR fell by 60% (from 5 to 2), and group size rose by 60% (from 5 to 8). The minus sign means the two variables are inversely related.<\/li>\r\n \t<li>The slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) is 3\/4, so multiplying this by 5\/4 is 15\/16, which does agree with the 0.9375 value in the text.<\/li>\r\n \t<li>The slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) stays constant at 0.75, but the elasticity increases from 0.9375 to roughly 0.9643. This shows that elasticity is a local phenomenon that changes depending on the value of the exogenous variable at which it is computed.<\/li>\r\n \t<li>Governments hope that the cigarette demand is elastic, meaning that the price elasticity of demand is high. This way, small increases in taxes will produce big decreases in cigarette consumption.<\/li>\r\n \t<li>Many studies have produced a variety of results, but the price elasticity of demand for cigarettes is expected to be inelastic, so less than 1 in absolute value. A good guess would be \u22120.6.<\/li>\r\n \t<li>Teenage smokers are more price sensitive, since they are not as addicted yet and typically have lower incomes than adults. If adults are at \u22120.6, teenagers might be at \u22121.4.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<h1 class=\"import-ah\">6.5 Cost Minimization<\/h1>\r\n<p class=\"import-paft\">You are on the factory floor of a manufacturing business. The CEO calls and says, \u201cWe need to make 300 units today.\u201d<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your production function is simple: [latex]Q = \\sqrt{L} + \\sqrt{K}[\/latex], where <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> is the amount of labor hours and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> is the number of machines. You get to choose how much <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> to use, but you must produce 300 units.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You could, for example, use 90,000 hours of labor and no machines or 40,000 machines and 10,000 hours of labor. There are many other combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that would meet the required quantity of output (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>).<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You have to pay for the inputs. The wage rate (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>) is $20 per hour, and the rental rate of machines (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>) is $40 per machine.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your goal is to find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that minimize <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span> (total costs of production). Formally, your constrained optimization problem looks like this:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\underset{L , K}{min} T C = 20 L + 40 K[\/latex]<br>\r\n[latex]\r\n\\text{s.t.} \\sqrt{L} + \\sqrt{K} = 300\r\n[\/latex]<\/p>\r\n\r\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\r\n<p class=\"import-paft\">You know that optimization problems always have three parts:<\/p>\r\n\r\n<ol>\r\n \t<li>Goal (objective function) \u2192 min <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>.<\/li>\r\n \t<li>Endogenous variables \u2192 <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>.<\/li>\r\n \t<li>Exogenous variables \u2192 <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span>, and the function [latex]\\sqrt{L} = \\sqrt{K} = q[\/latex].<\/li>\r\n<\/ol>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We will organize our spreadsheet with these parts, but first we want to visualize the problem.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell A1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>, and in cell B1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>. In cells A2 to A20, enter numbers 0 to 90000 by 5000. In cell B2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=(300-SQRT(A2))<\/em><\/span>\u02c6<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">2<\/em><\/span> and fill it down. Finally, make a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scatter<\/em><\/span> chart of the data in cells A1:B20.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart is displaying an <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">isoquant<\/em><\/span>. Since the prefix <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">iso<\/em><\/span> means equal (like an isosceles triangle), an isoquant shows all the combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that make the same amount of output.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many isoquants, one for each level of output. Your chart shows the isoquant for 300 units of output. It is the constraint for this optimization problem. The solution is on the isoquant, but we do not know which combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> is the least expensive.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Add a point on the chart and a scroll bar on the sheet to visualize that you can choose any combination on the isoquant. See the appendix if you need help.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">So how do we find the cheapest combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that produces 300 units of output? With Solver, of course, but first we have to implement the problem in the spreadsheet.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Label cells N1 and N2 as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, respectively. Cells N4, N5, and N6 have labels <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span>, respectively. Cell N8 is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span> and N10 is the constraint. In cells M4, M5, and M6, enter the exogenous variable values. In cells M8 and M10, enter formulas. See the appendix if you need help.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now you are ready to run Solver.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Properly configure Solver and run it to find the optimal solution. See the appendix if you need help.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver should find a solution close to the exact answer of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>* = 40,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>* = 10, 000 with a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>* = $1,200,000. This solution makes sense, since <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> are equally productive, but capital is twice as expensive as labor.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can see that this solution is correct by computing the total cost of the points on the isoquant in columns A and B.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell C1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>. In cell C2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=20*A2+40*B2<\/em><\/span> and fill it down.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is easy to see that the cheapest way to make 300 units of output is the 40,000 and 10,000 combination.<\/p>\r\n\r\n<h2 class=\"import-bh\">Visualizing the Optimal Solution<\/h2>\r\n<p class=\"import-paft\">Recall that the cigars-and-brandies utility maximization problem was visualized with a tangency condition between the utility contours and the constraint. Does the same apply here? Yes, it does.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We first create 3D surface and 2D contour plots of the total cost function, then we can draw a graph of the optimal solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><em class=\"import-hemb-i\">STEP<\/em> Copy cells A2:A20, insert a new sheet in your workbook, select cell A2, and paste. Select cell B1 and paste transpose (click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Paste<\/em><\/span> down arrow and select the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Transpose<\/em><\/span> icon as shown in Figure 6.13). Enter a formula that computes the total cost for the given labor in column A and capital in column B. See the appendix if you need help. Make <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">3D<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> and 2D contour plots.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"235\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p208-1.png\" alt=\"screen-capture showing how to paste transpose in Excel\" width=\"235\" height=\"459\" \/> <strong>Figure 6.13: Paste transpose.<\/strong><br \/>Source: Screenshot of Excel interface, \u00a9 Microsoft Corporation.[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The surface is like a sheet of paper, and the contours are straight lines. Each contour is called an <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">isocost<\/em><\/span> because it represents combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> with the same cost.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use Excel\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> group of drawing objects to add straight lines to your isoquant chart. Your lines must have a slope of 0.5 because <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>\/<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span> is 20\/40. The lowest feasible isocost is a line with <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>-intercept of 30,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>-intercept of 60,000. All your isocost lines must be parallel.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.14 shows a visualization of the optimal solution. The curve is the constraint and the lines are isocosts. You want to be on the lowest isocost on the constraint.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"723\"]<img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p209-1.png\" alt=\"plot showing the optimal solution as a 2D graph for the input cost minimization problem\" width=\"723\" height=\"476\" \/> <strong>Figure 6.14: Visualizing the optimal solution.<\/strong>[\/caption]\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many more isocost lines than the three shown. The point on the isoquant and the highest isocost is feasible in that you could make 300 units with this combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, but you would not be minimizing costs. The lowest isocost has lower costs than the optimal solution (40,000 hours of labor and 10,000 machines), but since it is below the isoquant, it violates the constraint, and no combination of inputs on that isocost is an eligible solution.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Return to your chart and make sure you have an isocost line that is tangent to the isoquant at the optimal solution. Add a red dot (use Excel\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> objects again) at point <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> = 40,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> = 10,000 (as shown in Figure 6.14). Finally, improve Figure 6.14. What is it missing? See the appendix if needed.<\/p>\r\n\r\n<h2 class=\"import-bh\">Comparative Statics<\/h2>\r\n<p class=\"import-paft\">We finish this problem by considering what would happen if the CEO called and changed the needed output level. We will compute the output elasticity of total cost.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use the Comparative Statics Wizard to explore how the optimal solution changes as you vary <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span> from 300 to 400 by 10. Make a chart of the minimum total cost as a function of quantity.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You have made a graph of the cost function. This tells us how costs of production vary as output changes.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use your CSWiz results to compute the slope of the cost function and the output elasticity of total cost as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span> rises by 10.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The slope of the cost function is rising slowly as quantity increases, which agrees with the shape of your cost function (it is increasing at an increasing rate). The output elasticity of total cost is decreasing as quantity goes up, but very slightly. Of more importance is its value of a little over 2\u2014this means that total cost is quite responsive to output in this example.<\/p>\r\n\r\n<div class=\"textbox textbox--key-takeaways\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Takeaways<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">Input cost minimization is a constrained optimization problem where we are asked to find the cheapest way to produce a given output.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver can do this problem, and the Comparative Statics Wizard can be used to explore how the optimal solution changes as quantity changes.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The optimal solution is visualized as a tangency between the isoquant and isocost lines.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice how many other concepts and skills were repeated as you worked through this problem. Once you get the pattern, it is easier to understand other applications.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Appendix<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"import-paft\">To add controls to a spreadsheet, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> tab needs to be visible on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>. If it is not, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">File<\/em><\/span>, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Options<\/em><\/span>, then click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Customize<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>, and check the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> item.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy cell range A2:B2 and paste it below your chart. To add this one point to your chart, copying, pasting, and editing the SERIES formula is an easy way to do this. You need to replace the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>- and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis arguments in the pasted SERIES formula with the cell that has the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis value and the cell that has the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis value.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Next, we add the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control, but it has a maximum value of 30,000. As a simple work-around, we can connect the scroll bar to a different cell\u2014say, the cell below the 0 value (that you should have as the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-coordinate value)\u2014and then the control can be connected to that cell.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Suppose your x-y coordinate pair is in cells F22 and G22. Change the 0 value in cell F22 to 10 times the cell below it by entering the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=10*F22<\/em><\/span> in cell F23. Right-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control and make the cell link be F23 by entering F23 in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cell link<\/em><\/span> input box. Finally, the scroll bar maximum should be set to 9000.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now when you set cell F23, for example, to 5,000, cell F22 is 50,000. Thus, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control can range from 0 to 9,000 in cell F23, and this produces values from 0 to 90,000 in cell F22.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> tab on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>, click the down arrow in the <span class=\"import-ccust1\">Insert<\/span> button, and select the scroll bar icon (in the top, form control group). Click and drag on the spreadsheet (roughly under the chart) to create the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control and link it to the appropriate cell on your spreadsheet.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Be careful to avoid selecting the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Spinner<\/em><\/span> control instead of the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scrollbar<\/em><\/span>. When you click the down arrow on the <span class=\"import-ccust1\">Insert<\/span> button, if you float the cursor over each control, Excel displays its name. This helps you choose the right control.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To use Solver to find the cost-minimizing combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, cells M4, M5, and M6 are 20, 40, and 300, respectively. Cell M8 has formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=M4*M1+M5*M2<\/em><\/span> and should be formatted as $. The constraint is in cell M10 with the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=SQRT(M1)+SQRT(M2)-M6<\/em><\/span>.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">For Solver, the objective function is M8, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Min<\/em><\/span> radio button should be checked, and the changing cells are M1 and M2. The constraint should be that M10 = 0.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The formula in cell B2 needed to make a 3D chart is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=20*$A2+40*B$1<\/em><\/span>. Format as $ with no decimals and fill down and right.<\/p>\r\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.14 can be improved by adding an appropriate title and labeling the axes.<\/p>\r\n\r\n<\/div>\r\n<\/div>","rendered":"<div class=\"textbox\">\n<p class=\"import-epf\">Edgeworth\u2019s simplification was this assumption: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">every<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">man<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">[person]<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">is<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">a<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">pleasure<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">machine<\/em><\/span>.<\/p>\n<p class=\"import-ept\" style=\"text-align: right;\">Robert Heilbroner<\/p>\n<\/div>\n<h1 class=\"import-ahaft\">6.1 Maximizing Utility<\/h1>\n<figure style=\"width: 558px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p174-1.png\" alt=\"AI-generated photo of cigars and brandies\" width=\"558\" height=\"558\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.1: Computer-generated image of cigars and brandies.<\/strong> <br \/>Source: <a href=\"https:\/\/stablediffusionweb.com\/\">Stable Diffusion, 2023<\/a><em>\/\u00a0<\/em><a href=\"https:\/\/stablediffusionweb.com\/license.html\">License.<\/a><\/figcaption><\/figure>\n<p class=\"import-pf\">Figure 6.1 shows two things, cigars and brandies, that we will pretend that you enjoy. Economists model the satisfaction and happiness provided by consumption of goods and services by using a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">utility<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">function<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility function is given by this equation:<\/p>\n<p class=\"import-eqs\" style=\"text-align: center;\">[latex]U = 18B \u2212 3B^2 + 20C \u2212 C^2[\/latex].<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your job is to choose the number of brandies (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span>) and cigars (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>) that maximize your utility (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><\/span>).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This optimization problem can be solved analytically, with calculus and algebra, but we will use Excel\u2019s Solver instead. As you recall, Solver is a numerical approach to finding the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We need to recast the problem in a way that Excel can understand it, then run Solver to find the optimal values of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The work that follows assumes that you have done the lifeguard problem (in chapter 2) and remember some of it. If you have not or do not remember it, you can continue working, but you will learn more if you review the lifeguard problem before you begin this material.<\/p>\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\n<p class=\"import-paft\">Optimization problems always have three parts:<\/p>\n<ol>\n<li>Goal (objective function)<\/li>\n<li>Endogenous variables<\/li>\n<li>Exogenous variables<\/li>\n<\/ol>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We know we want to maximize the utility function, so that is our goal. It has to be a formula in a cell that depends on other cells in the spreadsheet.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your endogenous, or choice, variables are <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>. We implement this part of the problem with cells that Solver will use for trial solutions. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box, these are called the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">changing<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">cells<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Finally, the exogenous variables are things the decision-maker cannot change. They are part of the environment. In this problem, your exogenous variables are the coefficients (18, \u22123, 20, and \u22121) and exponents in the utility function. We could set up cells for these exogenous variables, but we will keep things simple and just enter the utility function as is.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Open a blank Excel workbook and save it as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span>. In cell A1, enter a 1, and in cell B1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Brandies<\/em><\/span>. In cell A2, enter a 1, and in cell B2, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cigars<\/em><\/span>. In cell A4, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=18*A1-3*A1\u02c62+20*A2-A2\u02c62<\/em><\/span> and press the <a id=\"_Hlk191054033\"><\/a><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Enter<\/em><\/span> key.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel displays 34 in cell A4 because if you smoke one cigar and sip one brandy, your utility function says that you get 34 utils of satisfaction. Now, there is no such thing as a util, but we will ignore this inconvenient truth, and utils will be the units of measurement of satisfaction.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Change cell A1 to 2.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility rises to 43 utils. This is an improvement in your happiness, but you do not want to simply improve; you want to maximize utility. What are the best values of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>, the ones that make utility the largest number possible?<\/p>\n<h2 class=\"import-bh\">Solving the Problem in Excel<\/h2>\n<p class=\"import-paft\">Once we have implemented the problem in Excel, with a formula for the objective function that depends on other cells, we can utilize Solver. It will explore the objective function, trying many solutions. It follows an algorithm, or recipe, when deciding where to move next.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many different optimization algorithms. Sometimes, one fails, but another works. Some are good for several different kinds of problems and others are only useful for specific applications. There is no single algorithm that is better than the others.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Open the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box by clicking the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Data<\/em><\/span> tab and clicking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span>. If it is not there, use the keyboard shortcut <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Alt<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">t<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">i<\/em><\/span> to bring up the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Manager<\/em><\/span> and install it. Click in the objective function field, click on cell A4, click in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Changing <\/em><em class=\"import-i\">Variable Cells<\/em><\/span> field, and select both A1 and A2. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solve<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span> when Excel displays a dialog box reporting that it has found a solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver\u2019s answer is really close to the exact solution, which is to drink 3 brandies and smoke 10 cigars. This yields a utility of 127. You may not believe it, but you will see that it is impossible to get utility higher than 127.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Remember that Solver is hunting and pecking, plugging and chugging through many trial solutions. It changes direction when it does worse and continues forward when it is doing better. It stops when it does not improve by very much. Hence, it sometimes gets the exact right answer, but mostly it just gets very close.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Let\u2019s make sure it is clear that Solver\u2019s answer is not exactly right by widening column A and displaying more decimal points until you see a few zeroes (click the <span class=\"import-ccust1\">Increase decimal<\/span> button repeatedly in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Number<\/em><\/span> group in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your screen should look similar to Figure 6.2. We would never report all those digits because they are meaningless and exhibit false precision. We interpret Solver\u2019s answer as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 3 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 10 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 127, which is the correct answer.<\/p>\n<figure style=\"width: 392px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p177-1.png\" alt=\"screen-capture of cells showing the optimal solution to the cigars and brandies problem\" width=\"392\" height=\"143\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.2: Solver results.<\/strong><\/figcaption><\/figure>\n<h2 class=\"import-bh\">Displaying the Optimal Solution<\/h2>\n<p class=\"import-paft\">To visualize the optimal solution, we first use a 3D Surface chart. In the next section, we will create a 2D graph, since economists and mathematicians often use contour plots to display two-variable optimization problems.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To create a chart in Excel, we need data. The 3D chart requires a specific layout, with the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis in a row, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis in a column, and the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">z<\/em><\/span>-axis (vertical) in the interior of the table.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cells D2 to D12, enter 0 to 10 by 1. In cells, E1 to Y1, enter 0 to 20 by 1. These are the two horizontal axes in our 3D plot. In cell E2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=18*$D2-3*$D2\u02c62+20*E$1-E$1\u02c62<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice how the $ is being used. We are going to fill this formula down and then right. When we fill it down, it will change the row number for the brandies and continue to use row 1 for the cigars part of the utility function.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Fill your formula in E2 down and then examine the formulas in cells E3 and E12 to confirm that the row number is changing for column D but stays constant at 1 for column E.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select cells E2 to E12, then fill right. Examine the formulas in cells Y3 and Y12 to confirm that column D stays constant but the cigars part of the utility function has changing columns.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Our clever use of the $ has enabled us to create a table that shows how utility varies with changing amounts of brandies (in column D) and cigars (in row 1). The interior of the table displays values of utility.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is easy to see that the maximum utility value is in cell O5. It is surrounded by lower values. Solver reached the top of this hill by crawling up until it got to the top, at 3 brandies and 10 cigars.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select cell O5 and make its background color yellow by clicking the bucket icon in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Font<\/em><\/span> group in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We are now ready to create a chart. As you know, there are three steps: (1) Select the data, (2) choose the desired chart type, and perhaps most important, (3) clean up the chart.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Select range D1 (notice that this cell is empty, but you need to select it to get all the rows and columns in the table) to Y12. Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Insert<\/em><\/span> tab and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Recommended<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Charts<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">All<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Charts<\/em><\/span> and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span>. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">3-D<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel places a chart that looks like an elongated hill on your spreadsheet. It decided to put cigars (in row 1) on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis because it has more cells, but this is not what we want. We need to clean up this chart.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The first thing to do is to put the brandies axis in the front and the cigars on the side.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab (if needed) and click the <span class=\"import-ccust1\">Switch Row\/Column<\/span> button.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">That looks much better, but we have more cleaning up to do.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Remove the legend (select it and press the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">delete<\/em><\/span> key) and add axes titles for each axis. Click the <span class=\"import-ccust1\">Add Chart Element<\/span> button and select Axis Titles. Use <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Brandies<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Primary<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Horizontal<\/em><\/span> title, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cigars<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Depth<\/em><\/span> title, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Primary<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Vertical<\/em><\/span> title. Change the chart title field text to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Maximization<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is now really looking like something we would be proud to put our name on, but we can do one final improvement: Add more color bands to clearly see that it is a hill.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Double-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility<\/em><\/span> axis to bring up the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Format<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Axis: Axis<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Options<\/em><\/span> screen on the right. Change the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Major<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Units<\/em><\/span> field from 50 to 10.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart now looks like Figure 6.3. The crowded numbers on the Utility axis are not great, but the extra color bands make it easy to see that there is a clear top to this surface.<\/p>\n<figure style=\"width: 728px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p179-1.png\" alt=\"plot in 3D of the utility function with colored rings as elevation rises\" width=\"728\" height=\"436\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.3: A 3D visualization of utility maximization.<\/strong><\/figcaption><\/figure>\n<h2 class=\"import-bh\">Contour Plot<\/h2>\n<p class=\"import-paft\">Although a 3D plot like Figure 6.3 is useful, solutions to optimization problems with two endogenous variables often use a 2D contour plot that highlights the choice variables.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A contour plot, also called a level curve, displays a 3-dimensional surface by graphing constant vertical slices of the surface, called contours, on a 2-dimensional chart. It is easier to see what it is than to describe it.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy the 3D chart you just made and paste it. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab, click the <span class=\"import-ccust1\">Change Chart Type<\/span> button. Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Contour<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Plot<\/em><\/span> type (with the shaded region that signals the use of color) and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparing the color bands on the two charts makes clear how they are related. The light blue at the top of the hill in the 3D plot is the light blue oval in the contour plot. The orange band is a little lower on the hill, and it is a bigger oval on the contour plot.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is as if you flew on a plane and looked straight down at the hill. The vertical axis is suppressed on the contour plot, but we could put labels with numbers of the vertical height on each slice. This is exactly what a topographic map does.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use your favorite browser to search for \u201ccontour plot hiking map.\u201d Click on a few hits to see how 2D maps can show elevation by displaying numbers on each contour. On a hiking map with concentric squiggly rings, if you stayed on a single ring (which is also known as a contour) as you walked, you would never go up or down.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Contour plots are also used on weather maps. Isobars are contour plots showing the same atmospheric pressure.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Let\u2019s clean up Excel\u2019s contour chart by improving the title and moving the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis from right to left.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click on the title and make it <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Utility Maximization: Contour Plot<\/em><\/span>. Double-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis and change the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Label<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Position<\/em><\/span> to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">High<\/em><\/span> as shown in Figure 6.4.<\/p>\n<figure style=\"width: 396px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p181-1.png\" alt=\"screen-capture showing how to format an axis in Excel\" width=\"396\" height=\"534\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.4: Moving the y-axis from right to left.<\/strong><br \/>Source: Screenshot of Excel interface, \u00a9 Microsoft Corporation.<\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A final enhancement involves placing a point on the optimal solution and labeling it with a callout box (in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> collection in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Insert<\/em><\/span> tab), as shown in Figure 6.5.<\/p>\n<figure style=\"width: 477px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p181-2.png\" alt=\"plot of utility maximization in 2D, with colors showing how to read a contour plot\" width=\"477\" height=\"392\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.5: A 2D contour plot of utility maximization.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparing the 3D and 2D visualizations of this utility maximization problem reveals advantages of each. The 3D version makes clear that the surface is a hill with a maximum, but it is difficult to read the optimal number of brandies and cigars.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">On the other hand, the 2D contour plot makes it really easy to see the max and the values of brandies and cigars that will maximize utility. The trick is that you have to know how to read a contour plot, and now you do.<\/p>\n<h2 class=\"import-bh\">Make It Stick<\/h2>\n<p class=\"import-paft\">If we used Solver earlier when we did the lifeguard problem, why are we doing it again? Repeating material is a learning strategy that has been proven to work.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Suppose you want to improve your free throw shooting, and you really cared about this, so you decided to practice for one hour per day for two weeks. Most people would think that actually standing at the free throw line and shooting free throws would be the best use of your time, but this is wrong.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A much better use of your one hour per day is to shoot from all over the court\u2014spending 10 minutes in one spot, then moving to another spot, varying distance from, say, 10 to 20 feet (a free throw is 15 feet from the basket). This is called interleaved practice, and it also works for learning!<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">By doing the lifeguard problem, then doing other things and returning to a slightly different optimization problem, you are burying deeper channels in your brain about Solver and optimization.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Every time you repeat something in Excel, especially in the context of a different situation, you get a little better at it. The novelty of the new problem is important so that you are not doing the exact same thing, but you are making connections and learning.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If you want to know more about the neuroscience behind how you learn and other optimal learning strategies, search for Brown et al.\u2019s 2014 book <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Make It Stick<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Watch <a href=\"http:\/\/dub.sh\/howtostudy\">dub.sh\/howtostudy<\/a>\u00a0to see some of these ideas applied to optimal studying.<\/p>\n<p><iframe id=\"oembed-1\" title=\"How to Study Effectively for School or College [Top 6 Science-Based Study Skills]\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/CPxSzxylRCI?feature=oembed&#38;rel=0\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<div class=\"textbox textbox--key-takeaways\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Takeaways<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">We revisited work we did earlier using Solver, Excel\u2019s numerical optimization add-in.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel\u2019s Solver easily found the optimal solution to a simple two-variable utility maximization problem.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver applies an iteration procedure and stops when it cannot improve by very much. This produces an answer that is not exactly correct, even though the many decimal places it reports seem like it is giving a really precise answer, a phenomenon common to numerical algorithms known as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">false<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">precision<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Two Excel chart types were used to visualize the optimal solution: 3D surface and contour plot.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The 2D contour plot is the best-practice way to display the problem because it highlights the two endogenous variables (one on each axis) and makes it easy to see the numerical values of the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Learning also involves optimization, with better and worse ways to use your time. You definitely want to study and learn optimally.<\/p>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">References<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"hanging-indent\">The epigraph is from p. 173 of the 7th edition of Robert Heilbroner\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Worldly<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Philosophers<\/em><\/span>. First published in 1953, this classic tells the story of how economics was born and came to be the mathematical discipline that it is today. It is an easy read, and until <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Freakonomics<\/em><\/span> (by Stephen J. Dubner and Steven Levitt) exploded on the scene in 2009, Heilbroner\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The <\/em><em class=\"import-i\">Worldly<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Philosophers<\/em><\/span> had the highest sales of any economics book.<\/p>\n<p class=\"hanging-indent\">Francis Edgeworth was a key player in the mathematization of economics. <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Mathematical<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Psychics<\/em><\/span>, published in 1881, was an early application of optimization and comparative statics.<\/p>\n<p class=\"hanging-indent\">Brown, P., Roediger, H., III, and McDaniel, M. (2014). <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Make It Stick: The Science of Successful Learning<\/em><\/span> (Belknap Press).<\/p>\n<p class=\"hanging-indent\">Memorize Academy. (2016, Dec. 15). <em data-start=\"398\" data-end=\"481\">How to Study Effectively for School or College \u2013 Top\u202f6\u202fScience\u2011Based Study Skills<\/em> [Video]. YouTube. <a class=\"\" href=\"https:\/\/www.youtube.com\/watch?v=CPxSzxylRCI\" target=\"_new\" rel=\"noopener\" data-start=\"500\" data-end=\"543\">https:\/\/www.youtube.com\/watch?v=CPxSzxylRCI.<\/a><\/p>\n<\/div>\n<\/div>\n<h1 class=\"import-ah\">6.2 Constrained Utility Maximization<\/h1>\n<p class=\"import-paft\">Your doctor says that you are killing yourself by smoking too many cigars and drinking too much brandy. She restricts your consumption to a total of 5.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You can have 5 brandies and no cigars or 2, 3, or any other combination that adds up to 5 or fewer. You can choose fractional amounts like one-third of a brandy and four and two-thirds cigars or 1.5 and 3.5.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You cannot, however, maintain your current daily consumption of 3 and 10. That adds up to 13 and violates the constraint.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your utility function remains the same:<\/p>\n<p class=\"import-eqs\" style=\"text-align: center;\">[latex]U = 18B \u2212 3B^2 + 20C \u2212 C^2[\/latex].<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">But we need to add the constraint to properly state this optimization problem. Mathematically, the doctor said that <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2264 5. Formally, we write the problem like this, where s.t. stands for \u201csubject to\u201d:<\/p>\n<p style=\"text-align: center;\">[latex]\\underset{B , C}{max} U = 18 B - 3 B^{2} + 20 C - C^{2}[\/latex]<br \/>\n[latex]\\text{s} .\\text{t} . B + C \\leq 5[\/latex]<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You wonder how you are going to solve this problem. It can be done analytically, but you ask yourself if Solver can do it. Yes, of course it can.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As usual, we will have to implement the problem in Excel. Then we can run Solver to find the optimal solution.<\/p>\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\n<p class=\"import-paft\">We have the unconstrained version of the problem already set up, so we start from there.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make a copy of the sheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook by right-clicking the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Sheet1<\/em><\/span> sheet tab in the bottom left, selecting <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Move<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">or<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Copy<\/em><em class=\"import-i\">\u00a0.\u00a0.\u00a0.<\/em><\/span>, checking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Create<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">a<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">copy<\/em><\/span>, and clicking <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Rename the sheet <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><em class=\"import-i\">on<\/em><em class=\"import-i\">O<\/em><em class=\"import-i\">pt<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The new information that we have to implement is the constraint. It is convenient to rewrite the constraint as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2212 5 \u2264 0. This way, violations of the constraint occur whenever <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> + <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> \u2212 5 is positive.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell A6, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=A1+A2-5<\/em><\/span>. In cell B6, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">constraint<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now we are ready to call Solver. Excel will include the choices you entered before in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box, but we have to add the constraint.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Data<\/em><\/span> tab, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span>. Confirm that the objective function, max, and changing cells are correct, then click the <span class=\"import-ccust1\">Add<\/span> button. From the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add Constraint<\/em><\/span> dialog box, click on cell A6 for the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cell<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Reference<\/em><\/span> field, choose <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">le<\/em><\/span>, and enter a 0 in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Constraint<\/em><\/span> field. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Notice that Excel adds the constraint to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solver<\/em><\/span> dialog box. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Solve<\/em><\/span>. Excel announces success! Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We interpret Solver\u2019s answer as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 79, which is the correct answer. To maximize utility subject to the constraint of no more than 5 combined units of cigars and brandies, the best combination is 1 brandy and 4 cigars. This yields a utility of 79 and cannot be beaten by any other combination of brandies and cigars that does not violate the constraint.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice that the constraint cell is not exactly zero, but it is very close to zero. Cell A6 shows something like 5.02825E-08. This is a number expressed in scientific notation, and it means 5.02825 \u00d7 10<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">\u2212<\/sup><sup class=\"import-sup\">8<\/sup><\/span>. This is a tiny number. You can make it exactly zero if you wish by changing cells A1 and A2 to 1 and 4, respectively.<\/p>\n<h2 class=\"import-bh\">Visualizing the Optimal Solution<\/h2>\n<p class=\"import-paft\">Figure 6.6 displays a 3D surface and contour plot of the constrained utility maximization problem. On the 3D surface plot, the constraint is a barrier that blocks attainment of the unconstrained max at the top of the hill. On the contour plot, the constraint is a line, because if you looked straight down at the barrier from directly above, you would see just a line.<\/p>\n<figure style=\"width: 780px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p186-1.png\" alt=\"plots of 3D and 2D visualizations of constrained optimization\" width=\"780\" height=\"288\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.6: Visualizing constrained utility maximization.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make two separate lists of things you like and do not like for the 3D surface plot and the contour plot. See the appendix if you need help, but do not immediately go there. Try to make the lists yourself before looking at the appendix.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">One thing that is extremely important about the contour plot is that it clearly reveals the optimal solution. We can use Excel\u2019s wireframe version of the contour plot to see this.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy and paste your contour plot, then click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Change<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Chart<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Type<\/em><\/span> in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Design<\/em><\/span> tab. Select the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wireframe<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Contour<\/em><\/span> in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> group of charts.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is now much easier to see the contour lines. Since there is a contour line for every value of utility, there is actually an infinity of contour lines. Your chart shows only a few of them.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Carefully place a line (use the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Line<\/em><\/span> object in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> collection) from the point 0, 5 to 5, 0 as shown in Figure 6.7.<\/p>\n<figure style=\"width: 789px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p187-1.png\" alt=\"plot using Excel's wireframe option to show contours clearly\" width=\"789\" height=\"607\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.7: Understanding contour lines with the Wireframe chart.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">At the optimal solution (at 1, 4), there is a contour slightly above and another below. The curve above has a utility value greater than 79, and the one below is less than 79. There is a curve not shown in Figure 6.7 that is in between the two contours above and below point 1, 4. This contour just touches the constraint line, and it has a utility value of exactly 79. This contour is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">tangent<\/em><\/span> to the diagonal constraint.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A point of tangency means that there is contact at a single point but no crossing. Figure 6.8 shows why tangency is a visualization of the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If the constraint line cuts or intersects a curve, we immediately know this is not the optimal solution. If we are cutting a contour, we can move along the constraint line to reach a higher contour.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">In Figure 6.8, the highest curve (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">&gt;<\/em><\/span> 79) is beyond our reach. The one that just touches the line is the best we can do. Tangency instantly reveals the solution and explains why the 2D contour plot is used to visualize constrained optimization.<\/p>\n<figure style=\"width: 183px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p188-1.png\" alt=\"rough sketch of contours and constraint to explain tangency as the optimal solution\" width=\"183\" height=\"130\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.8: Tangency displays the optimal solution.<\/strong><\/figcaption><\/figure>\n<div class=\"textbox textbox--key-takeaways\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Takeaways<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">Excel\u2019s Solver add-in can handle constrained optimization. You provide a cell with the constraint and then add the constraint in Solver\u2019s dialog box.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is a conventional graph that is used to visualize constrained optimization problems. It relies on the point of tangency in a contour plot to instantly highlight the solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To read a contour plot, remember that it is a top-down view of a 3D surface.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Excel has several 3D surface and contour charts. The chart can be augmented with a variety of drawing objects and text boxes.<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Appendix<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">Figure 6.9 shows a few pros and cons of the two charts. The only con for the contour plot is the prerequisite knowledge needed to read it.<\/p>\n<figure style=\"width: 747px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p188-2.png\" alt=\"table layour of pros and cons of 3D and 2D visualizations\" width=\"747\" height=\"172\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.9: Comparing 3D surface and 2D contour plots.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">For those in the know, a 2D contour plot is preferred because of the way the tangency draws attention to the optimal solution. It is easy to see the values that solve the constrained optimization problem.<\/p>\n<\/div>\n<\/div>\n<h1 class=\"import-ah\">6.3 Comparative Statics with CSWiz<\/h1>\n<p class=\"import-paft\">Your doctor is some kind of evil genius (or an economist), and she wants to explore your response to different values of the total allowed units of cigars and brandies.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This is formally known as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">comparative<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">statics<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">analysis<\/em><\/span>. We change one exogenous variable, and we see what effect it has on the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There\u2019s an Excel add-in for that\u2014it is called the Comparative Statics Wizard (CSWiz). After explaining comparative statics in more detail, we will use the CSWiz add-in on the constrained optimization version of the cigars-and-brandies problem.<\/p>\n<h2 class=\"import-bh\">The Logic of Comparative Statics<\/h2>\n<p class=\"import-paft\">We did comparative statics analysis earlier with the lifeguard problem (in chapter 2). We turned the lifeguard into a freakish combination of Michael Phelps and Usain Bolt. The optimal solution had us running more, since we were so much faster.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We also did comparative statics analysis when we changed the product price facing the farmer (in section 2.4). As the product price rises, the farmer responds by buying more seed.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There were two more comparative statics examples when we combined Monte Carlo simulation and optimization. The first involved pooled testing (in section 3.3). We lowered the infection rate from 5% to 1%, and this made the optimal group size bigger. The second explored how lowering the cost of searching led to more searches (in section 3.4).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">All these examples worked the same way. We solved an optimization problem, then we changed a single exogenous variable and kept everything else the same. We focused on the effect the change had on the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Before we do another example, let\u2019s repeat and make crystal clear the logic of comparative statics. It involves a four-step procedure:<\/p>\n<ol>\n<li>We set up the problem and find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">initial<\/em><\/span> solution.<\/li>\n<li>We change a single exogenous variable, called the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">shock<\/em><\/span>, holding all other exogenous variables constant. We use a Latin phrase, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ceteris paribus<\/em><\/span>, as shorthand. This literally means \u201cwith other things held equal,\u201d and we use the phrase to mean <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">everything<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">else<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">held<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">constant<\/em><\/span>.<\/li>\n<li>We find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">new<\/em><\/span> optimal solution.<\/li>\n<li>Finally, we <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">compare<\/em><\/span> the new to the initial solution to see how the optimal solution responded to the shock.<\/li>\n<\/ol>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Comparative statics is the fundamental methodology of economics. It gives a framework for interpreting observed behavior. This framework has been given many names, including the method of economics, the economic approach, the economic way of thinking, and economic reasoning.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As you know, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">comparative<\/em><\/span> clearly points to the comparison between the new and initial solution, but the meaning of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">statics<\/em><\/span> (not to be confused with statistics) is less obvious. It means that we are going to focus on optimal (or equilibrium) positions and not worry about the path of the solution as it moves from the initial to the new point.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We have several ways of comparing the new and initial solutions. A qualitative comparison focuses only on direction (up or down), while quantitative comparisons compute magnitudes of the change in response (as either a difference or a percentage change).<\/p>\n<h2 class=\"import-bh\">Another Example<\/h2>\n<p class=\"import-paft\">We start with the initial constrained optimization problem, which can be formally written like this:<\/p>\n<p style=\"text-align: center;\">[latex]\\underset{B , C}{max} U = 18 B - 3 B^{2} + 20 C - C^{2}[\/latex]<br \/>\n[latex]\\text{s} .\\text{t} . B + C \\leq 5[\/latex]<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We know that the initial solution is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 79.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your doctor surprises you at your next appointment. She is happy with your latest test results and says that you can safely have one more brandy or cigar, so your total allowed amount is now 6. How will you respond to this new development?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>From your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ConOpt<\/em><\/span> sheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook, change the 5 in cell A6 to 6. What happens?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The constraint cell is now negative. This means that you are below the constraint. The barrier has moved upward, so you have room to climb higher up the utility hill. But what exactly will you do?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Run Solver. What happens?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">With a total of 6 cigars and brandies allowed, your new optimal solution is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 1.25 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 4.75, yielding a maximum utility of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">U<\/em><sup class=\"import-sup\">*<\/sup><\/span> = 90.25.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">This makes sense. You take advantage of the loosened constraint to sip a little more brandy and smoke more cigars. That is a qualitative or directional statement. It is like saying that when the price goes down, you buy more.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A quantitative or magnitude statement would be to compute how much more you drink and smoke. You went from 1 to 1.25 brandies as the total amount allowed went from 5 to 6, so that increase is 0.25 brandies. The delta (or difference) for cigars is 0.75, since you went from 4 to 4.75.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is another way to make a quantitative statement using elasticity. The Comparative Statics Wizard and the results it generates will help us explain how to compute and interpret an elasticity.<\/p>\n<h2 class=\"import-bh\">The Comparative Statics Wizard<\/h2>\n<p class=\"import-paft\">We use a free Excel add-in, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CSWiz.xla<\/em><\/span>, to do comparative statics analysis. It works with Solver to find the optimal solution given different values of an exogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Download the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CSWiz.xla<\/em><\/span> file from <a href=\"http:\/\/dub.sh\/addins\">dub.sh\/addins<\/a>\u00a0and use the Add-ins Manager (File \u2192 Options \u2192 Add-ins \u2192 Go or keyboard shortcut <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Alt<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">t<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">i<\/em><\/span>) to install it. Once installed, click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> tab to see that it is under the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> group.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To use the CSWiz add-in, we need to modify our Excel implementation of the constrained optimization problem. Instead of hard-coding the total allowed amount of cigars and brandies, we need to make a cell for this exogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell B8 of your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ConOpt<\/em><\/span> sheet, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>. In cell A8, enter the number 5. Connect this total value to the constraint cell in A6 by changing the constraint formula to <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=A1+A2<\/em><em class=\"import-i\">&#8211;<\/em><em class=\"import-i\">A8<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We are now ready to run the Comparative Statics Wizard. We will provide information in a series of steps.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Add-ins<\/em><\/span> tab, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span>, and then <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Comp<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Statics<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">As you walk through the steps, be sure to read carefully and think about the information you are providing. The following is the input you need to give as you walk through the steps:<\/p>\n<ol>\n<li>Clicking the <span class=\"import-ccust1\">Input<\/span> button produces an input box that asks for the objective function cell. Click on cell A4 and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. A second box asks for the endogenous variables. Select cells A1 and A2 (both of them) and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. The final input box asks for the exogenous variables. Click on cell A8 and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. Usually, there is more than one exogenous variable, so you would select all of them. When done, you return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> dialog box, but your inputs are displayed. Confirm that they are correct and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\n<li>Click the <span class=\"import-ccust1\">Run Solver<\/span> button to call Solver and run it. Solver needs to successfully find the correct solution to continue. If not, we cannot do comparative statics analysis. When done, you return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> dialog box. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\n<li>This step is like the first one in that you are asked three questions. Click the <span class=\"import-ccust1\">Input<\/span> button. Click cell A8 because this is the cell that we want to vary to see how the optimal solution responds. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. In the second input box, enter the number 1. This will change cell A8 by 1. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. In the final input box, leave the default choice of 5. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">OK<\/em><\/span>. You return to the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span>, and the results of your input are displayed. Confirm that everything is correct and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\n<li>The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Wizard<\/em><\/span> now has all the information it needs. Clicking the <span class=\"import-ccust1\">Run Comparative Statics Analysis<\/span> button will do just that. Excel will solve the problem for total values from 5 to 10 by 1. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Progress<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Bar<\/em><\/span> will advance quickly because this problem is simple, and we only asked for 5 shocks. Click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Next<\/em><\/span>.<\/li>\n<li>Read the message on the final screen and click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Finish<\/em><\/span>.<\/li>\n<\/ol>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You are taken to a new worksheet in your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">UtilityMax.xlsx<\/em><\/span> workbook that displays the results of the comparative statics analysis that you just performed. We use these results to figure out and explain how changing the total allowed amount affects the optimal consumption of brandies and cigars.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>We did not name any cells, so the results show cell addresses. We can fix this by entering the names of the variables. Cells A5 and A8 are <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>. Cells B8, C8, and D8 are Utility<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, and C<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span>, respectively. Widen the columns if needed to display the results neatly.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The results confirm our work for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span> = 5 and 6, but the results extend the comparative statics analysis to total allowed amounts of 7, 8, 9, and 10. Of course, Solver\u2019s numbers suffer from false precision, but we know how to interpret them.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Enter the text DB\/DTotal in cell E8. In the formula bar, select the first D and change the font to Symbol (in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Home<\/em><\/span> tab). Repeat for the second D.<\/p>\n<div class=\"textbox\">\n<p class=\"import-bxt\" style=\"padding-left: 40px;\"><span style=\"color: #339966;\"><strong><em>EXCEL TIP <\/em><\/strong><\/span>Excel allows you to apply formatting to individual characters in a cell. This means you can use different fonts, colors, and sizes for different parts of a cell.<\/p>\n<\/div>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell E10, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=(C10<\/em><\/span>&#8211;<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C9)\/(A10<\/em><\/span>&#8211;<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">A9)<\/em><\/span> and fill it down.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">That is interesting\u2014every time you get an extra total amount allowed, you devote 0.25 of it to brandies (and 3<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">\/<\/em><\/span>4 to cigars). In other words, the relationship between optimal brandies and the total amount allowed is linear. We can confirm this with a graph.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Make a chart of B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> as a function of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Total<\/em><\/span>.<\/p>\n<figure style=\"width: 723px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBA-p194-1.png\" alt=\"plot of how brandy consumption increases as total allowed increases\" width=\"723\" height=\"442\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.10: How brandy consumption responds to the total allowed.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart should look like Figure 6.10. Notice that we are not displaying an optimal solution. Instead, this chart is tracking how the optimal solution responds to changes in an exogenous variable. This is a common way to present the results of comparative statics analysis.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There is a similar chart of optimal cigars. The relationship is linear, but the slope is bigger, so the line is steeper. It would be good practice to compute the slope and make this chart.<\/p>\n<div class=\"textbox textbox--key-takeaways\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Takeaways<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">People often think that economics is defined by its content. They think that if you study something like unemployment or money, then you are doing economics.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Actually, modern economics is defined by its methodology. Economists use optimization and comparative statics on anything involving choice. Economics can be applied to war, marriage, and many other \u201cnoneconomic\u201d questions.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You can be sure that optimization and comparative statics will be applied if you ever see a title that begins with \u201cAn Economic Analysis of\u201d\u2014this means that whatever is being studied will be analyzed and seen as an optimization problem.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We use comparative statics to interpret changes in behavior (you sipped more brandy when the constraint loosened) and to predict responses (lowering the price will trigger an increase in quantity demanded).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The Comparative Statics Wizard is a numerical approach, as opposed to analytical approaches that use mathematics.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">CSWiz.xla is an Excel add-in that takes advantage of Excel\u2019s Solver add-in. The user provides information about the problem and which variable is to be shocked. CSWiz does the tedious work of solving the problem at different values of the exogenous variable and keeps track of the optimal solutions.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Once you have the results, further analysis can be performed. Often, we are interested in the relationship between variables, and we draw graphs to visualize how an endogenous variable responds to an exogenous shock.<\/p>\n<\/div>\n<\/div>\n<h1 class=\"import-ah\">6.4 Elasticity<\/h1>\n<p class=\"import-paft\">You probably have heard of the price elasticity of demand, but you may not know what it means or how to use the concept.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Our goal is to truly understand elasticity and be comfortable using it. At its most fundamental level, it is simply a numerical measure of responsiveness.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">In the initial version of the lifeguard problem, the lifeguard entered the water after running roughly 56 meters. When maximum running speed doubled to 10 m\/sec, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">ceteris paribus<\/em><\/span>, the optimal solution changed to running almost 80 meters. We can (and did) show this on a graph, but is there a faster way to summarize comparative statics analysis? Yes\u2014in a word, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">elasticity<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We have been working on a constrained optimization problem where you sipped 1 brandy and smoked 4 cigars when the doctor set a limit of 5 total brandies and cigars. When that limit was relaxed and you were allowed a total of 6 units, you chose 1.25 brandies and 4.75 cigars. Again, we can (and did) show this on a graph, but elasticity captures the relationship between the amount consumed and the total allowed in a single number.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We proceed by reviewing a few general ideas about elasticity and what it is trying to convey. Then we move to actual computations and practice interpreting elasticity values.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The more examples you see, the more the concept will stick. Be sure to keep an eye out for the repeated pattern in the elasticity. We always have an optimal solution that is responding to a shock, and the elasticity measures if the response is weak or strong.<\/p>\n<h2 class=\"import-bh\">Elasticity Basics<\/h2>\n<p class=\"import-paft\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Elasticity<\/em><\/span> is a pure number (it has no units) that measures the sensitivity or responsiveness of one variable when another changes. <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Elasticity<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">responsiveness<\/em><\/span>, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">sensitivity<\/em><\/span> are synonyms. An elasticity number expresses the impact one variable has on another. The closer the elasticity is to zero, the more insensitive or inelastic the relationship is between two variables.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity is often expressed as \u201cthe something elasticity of something,\u201d like the price elasticity of demand. The first something, the price, is always the exogenous variable; the second something\u2014in this case, demand (the amount purchased)\u2014is the response or optimal value being tracked.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">A less common, but perhaps clearer, way to express the cause and effect is to say, \u201cThe elasticity of something with respect to something.\u201d The elasticity of demand with respect to price makes it clear that demand depends on and responds to the price.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Unlike the difference between the new and initial values, elasticity is computed as the ratio of percentage changes in the values. The endogenous or response variable always goes in the numerator, and the exogenous or shock variable is always in the denominator. Thus, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> is [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex].<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The percentage change, [latex]\\frac{new - initial}{initial}[\/latex], is the change (or difference), new minus initial, divided by the initial value. This affects the units in the computation. The units in the numerator and denominator of the percentage change cancel, and we are left with a percent as the units. If we compute the percentage change in apples from 2 to 3 apples, we get a 50% increase. The change (or delta), however, is +1 apple.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">If we divide one percentage change by another, as we do with an elasticity computation, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], the percentages cancel, and we get a unitless number. Thus, elasticity is a pure number with no units. So if the price elasticity of demand for apples is \u22121.2, there are no apples, dollars, percents, or any other units. It\u2019s just \u22121.2.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The \u22121.2 can be used to compute the percentage change in apples if the price of apples increases by 10%. We simply multiply \u22121.2 by 10% to get \u221212%. Or if the price of apples falls by 20%, we know that the quantity demanded of apples will rise by 24% (\u22121.2 \u00d7 \u221220%).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can also use an elasticity to compute the exogenous shock needed to produce a given percentage change in the endogenous variable. If ApplesRUs Inc. knew that the price elasticity of demand for apples was \u22121.2 and they wanted to increase apples sold by 6%, then they would lower prices by 5% (6% divided by \u22121.2).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity is a ratio of percentage changes, so there are three numbers involved: the elasticity, the percentage change in the numerator, and the percentage change in the denominator. We are given and use two of the three to find the third one:<\/p>\n<p class=\"import-nlf\" style=\"margin-left: 18pt; text-indent: 18pt;\">1. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> and %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, find the elasticity: [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex].<\/p>\n<p class=\"import-nl\" style=\"margin-left: 18pt; text-indent: 18pt;\">2. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> and elasticity, find the %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">elasticity<\/em><\/span> \u00d7 %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>.<\/p>\n<p class=\"import-nll\" style=\"margin-left: 18pt; text-indent: 18pt;\">3. Given %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> and elasticity, find the %\u0394<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x:\u00a0<\/em>[latex]\\frac{\\%\\Delta y}{elasticity}[\/latex]<\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The lack of units in an elasticity measure means we can compare wildly different things. No matter the underlying units of the variables, we can put the dimensionless elasticity number on a common yardstick and interpret it.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.11 shows the possible values that an elasticity can take, along with the names we give particular values.<\/p>\n<figure style=\"width: 874px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p198-1.png\" alt=\"rough sketch of a number line with labels for elasticity ranges and their names\" width=\"874\" height=\"327\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.11: Elasticity on the number line.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Empirically, elasticities are usually low numbers around 1 (in absolute value). An elasticity of +2 is extremely responsive or elastic because the response is twice the shock. It means that a 1% increase in the exogenous variable generates a 2% increase in the endogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The sign of the elasticity indicates direction (a qualitative statement about the relationship between the two variables). Zero means that there is no relationship\u2014that is, the exogenous variable does not influence the response variable at all. Thus, \u22122 is extremely responsive like +2, but the variables are inversely related, so a 1% <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">increase<\/em><\/span> in the exogenous variable leads to a 2% <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">decrease<\/em><\/span> in the endogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">One (both positive and negative) is an important marker on the elasticity number line because it tells you if the given percentage change in an exogenous variable results in a smaller percentage change (when the elasticity is less than 1), an equal percentage change (elasticity equal to 1), or greater percentage change (elasticity greater than 1) in the endogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The adjective <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">perfectly<\/em><\/span> is used to identify two extreme cases. If the elasticity is 0, it is perfectly inelastic, and this means there is no response at all to a shock. This is rare; usually optimal values of endogenous variables adjust to changes in the environment.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">\u201cPerfectly elastic\u201d means the elasticity measure is infinity (positive or negative). This means that the tiniest little change in an exogenous variable triggers a massive response in the endogenous variable. Again, this is a rare, limiting case for elasticity.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticities can be confusing. There is a lot to remember. The following are six common misconceptions and issues surrounding elasticity. Reading these typical mistakes will help you better understand this fundamental but easily misinterpreted concept.<\/p>\n<ol>\n<li>Elasticity is about the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">relationship<\/em><\/span> between two variables, not just the change in one variable. Thus, do not interpret a negative elasticity as meaning that the response variable must decrease. The negative means that the two variables move in opposite directions. So if the age elasticity of time playing sports is negative, that means that both time playing sports falls as age increases and time playing sports rises as age decreases.<\/li>\n<li>Elasticity is a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">local<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">phenomenon<\/em><\/span>. The elasticity will usually change if we analyze a different initial value of the exogenous variable. Thus, any one measure of elasticity is a local or point value that applies only to the change in the exogenous variable under consideration from that starting point. You should not think of a price elasticity of demand of \u22120.6 as applying to an entire demand curve. Instead, it is a statement about the movement in price from one value to another value close by\u2014say, $3.00\/unit to $3.01\/unit. The price elasticity of demand from $4.00\/unit to $4.01\/unit may be different. There are constant elasticity functions, where the elasticity is the same all along the function, but they are a special case.<\/li>\n<li>Elasticity can be calculated for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">different<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">size<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">changes<\/em><\/span>. To compute the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, we can go from one point to another, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], but the size of the change in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> can vary. The computed elasticity will be different depending on the size of the shock if the relationship is nonlinear.<\/li>\n<li>Elasticity always puts the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">response<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">variable<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">in<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">the<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">numerator<\/em><\/span>. Do not confuse the numerator and denominator in the computation. In the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> is the exogenous or shock variable and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> is the endogenous or response variable. Students will often compute the reciprocal of the correct elasticity. Avoid this common mistake by always checking to make sure that the variable in the numerator responds to or is driven by the variable in the denominator.<\/li>\n<li>Remember that elasticity is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">unitless<\/em><\/span>. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span> of 0.2 is not 20%. It is 0.2. It means that a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span> leads to a 0.2% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>.<\/li>\n<li>Perhaps the single most confusing thing about elasticity is its relationship to the slope: <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Do not confuse elasticity with slope.<\/em><\/span> This is easy to forget and deserves careful consideration. Remember that elasticity is a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">percentage<\/em><\/span> change calculation, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], while a slope is merely the rise over the run, [latex]\\frac{\\Delta y}{\\Delta x}[\/latex].<\/li>\n<\/ol>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Economists, unlike chemists or physicists, often gloss over the units of variables and results. If we carefully consider the units involved, we can ensure that the difference between the slope and elasticity is crystal clear.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The slope is a quantitative measure in the units of the two variables being compared. If [latex]Q^* = \\frac{P}{2}[\/latex], then the slope [latex]\\frac{\\Delta Q^*}{\\Delta P} = \\frac{1}{2}[\/latex]. This says that an increase in P of $1\/unit will lead to an increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>* of 1\/2 a\u00a0unit. Thus, the slope would be measured in units squared per dollar (so that when multiplied by the price, we end up with just units of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Elasticity, on the other hand, is a quantitative measure based on percentage changes and is therefore unitless. The <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span> elasticity of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>* = 1 says that a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span> leads to a 1% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>*. It does not say anything about the actual numerical $\/unit increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span>, but it does speak of the percentage increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">P<\/em><\/span>. Elasticity focuses on the percentage change in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>*, not the change in terms of number of units.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Thus, elasticity and slope are two different ways to measure the responsiveness of a variable as another variable changes. Elasticity uses percentage changes, [latex]\\frac{\\%\\Delta y}{\\%\\Delta x}[\/latex], while the slope does not, [latex]\\frac{\\Delta y}{\\Delta x}[\/latex]. They are two different ways to measure the effect of a shock, and confusing them is a common mistake.<\/p>\n<h2 class=\"import-bh\">Computing Elasticity<\/h2>\n<p class=\"import-paft\">When the total allowed for <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">B<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span> went from 5 to 6, you changed B<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> from 1 to 1.25 and C<span style=\"border: none windowtext 0pt; padding: 0;\"><sup class=\"import-sup\">*<\/sup><\/span> from 4 to 4.75. We can compute two elasticities with these numbers.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of brandies is<\/p>\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta B^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta B^{*}}{B^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\frac{n e w B - i n i t i a l B}{i n i t i a l B}}{\\frac{n e w T - i n i t i a l T}{i n i t i a l T}} = \\frac{\\frac{1.25 - 1}{1}}{\\frac{6 - 5}{5}} = \\frac{0.25}{0.2} = 1.25[\/latex]<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of brandies is 1.25 because we had a 20% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> (from 5 to 6), and this led to a slightly bigger 25% increase in brandies (from 1 to 1.25). Thus, we say that the brandies response is elastic, or pretty responsive. Figure 6.11 shows that any elasticity greater than 1 in absolute value is said to be elastic.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of cigars is<\/p>\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta C^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta C^{*}}{C^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\frac{n e w C - i n i t i a l C}{i n i t i a l C}}{\\frac{n e w T - i n i t i a l T}{i n i t i a l T}} = \\frac{\\frac{4.75 - 4}{4}}{\\frac{6 - 5}{5}} = \\frac{0.1875}{0.2} = 0.9375[\/latex]<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The total allowed elasticity of cigars is 0.9375 because we had a 20% increase in <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> (from 5 to 6), and this led to a slightly smaller 18.75% increase in cigars (from 4 to 4.75). Thus, we say that the cigars response is inelastic, or unresponsive. Figure 6.11 shows that any elasticity less than 1 in absolute value is said to be inelastic.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Since we know the slope of the optimal brandies as a function of total allowed is 0.25 and the total allowed elasticity of brandies is 1.25, that is conclusive proof that elasticity and slope are different. Another way we can show the difference is with a little algebra:<\/p>\n<p style=\"text-align: center;\">[latex]\\frac{\\% \\Delta B^{*}}{\\% \\Delta T} = \\frac{\\frac{\\Delta B^{*}}{B^{*}}}{\\frac{\\Delta T}{T}} = \\frac{\\Delta B^{*}}{B^{*}} \\frac{T}{\\Delta T} = \\frac{\\Delta B^{*}}{\\Delta T} \\frac{T}{B^{*}}[\/latex]<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The last term shows we can compute the elasticity by multiplying the slope by [latex]\\frac{T}{B^*}[\/latex]. This shows that elasticity is slope times the ratio of the exogenous to the endogenous variable values. In this example, 0.25 times 5\/1 is 1.25.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can also show that elasticity changes as you change the point from which it is measured.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In your <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">CS1<\/em><\/span> sheet, put the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">%DB\/%DT<\/em><\/span> in cell F8 and then change the two <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">D<\/em><\/span>s to Symbol font. In cell F10, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=((C10<\/em><\/span>&#8211;<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C9)\/C9)\/((A10<\/em><\/span>&#8211;<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">A9)\/A9)<\/em><\/span> and fill it down.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Cell F10 reproduces the 1.25 elasticity we computed earlier, but notice how the elasticities get smaller as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> rises. Again, this shows that elasticity is not slope, since the slope stays constant while the elasticity changes.<\/p>\n<h2 class=\"import-bh\">Elasticity Practice<\/h2>\n<p class=\"import-paft\">Work on these elasticity computations and questions to improve your understanding. Answers are provided in the appendix (according to step number).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>1. Compute the max run speed elasticity of distance on sand in the lifeguard problem as max run speed is increased from 5 m\/sec to 10 m\/sec. Interpret your result.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>2. Compute the IR (infection rate) elasticity of group size as IR falls from 5% to 2%. Recall that optimal group size rose from 5 to 8. Interpret your result.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>3. Compute the slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) and use it to compute the total allowed elasticity of cigars at <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 5. Does your number agree with the 0.9375 value we found earlier?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>4. Compute the slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) and the total allowed elasticity of cigars from <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 9 to 10. Does the slope or elasticity change compared to the elasticity from <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span> = 5 to 6? What does this show?<\/p>\n<figure style=\"width: 923px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p203-1.png\" alt=\"plot showing smoking reached a peak in US earlier than Japan\" width=\"923\" height=\"611\" \/><figcaption class=\"wp-caption-text\">Figure 6.12: Smoking rates in Japan and the United States. <br \/>Source: <a href=\"http:\/\/ourworldindata.org\/smoking\">Our World in Data<\/a> \/ <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY 4.0.<\/a><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Cigarettes have been extensively studied. The average number of cigarettes sold per day in the United States and Japan since 1900 is shown in Figure 6.12.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Visit <span style=\"border: none windowtext 0pt; padding: 0;\"><span class=\"import-url\">ourworldindata.org\/smoking<\/span><\/span> to see an interactive version of this chart and to add other countries. The pattern is the same around the world\u2014rising smoking rates reach a peak, then they decline. Today, a little over 10% of American adults smoke, down from 40% at the peak.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Governments want to reduce cigarette consumption to improve public health. Banning advertising is common, as is taxing cigarettes. The idea is that increasing the total price consumers must pay (the price plus the tax) will reduce consumption. Whether this works depends on the price elasticity of demand (the quantity purchased).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>5. To reduce cigarette consumption in response to a tax, what are governments hoping is true about the price elasticity of demand for cigarettes?<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>6. What do you think is a good guess for the price elasticity of demand for cigarettes? Explain your answer.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>7. How do you think the price elasticity of demand for cigarettes compares between adult and teenage smokers? Explain your answer.<\/p>\n<div class=\"textbox textbox--key-takeaways\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Takeaways<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">Comparative statics is how economists view the world, and elasticity is how they communicate comparative statics results.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You want to be able to interpret and compute it:<\/p>\n<p class=\"hanging-indent\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Interpret:<\/em><\/span> The closer an elasticity is to zero, the less responsive the endogenous variable is to a particular shock.<\/p>\n<p class=\"hanging-indent\"><span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Compute:<\/em><\/span> The exogenous variable elasticity of the endogenous variable is always the percentage change in the endogenous variable divided by the percentage change in the exogenous variable.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are other ways to compute elasticities. The ratio of percentage changes is the simplest, most basic approach.<\/p>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">References<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"hanging-indent\">The economics literature on cigarette smoking is vast: Sloan, F. A., Smith, V. K., and Taylor, D. H. (2002). \u201cInformation, Addiction, and Bad \u2018Choices\u2019: Lessons from a Century of Cigarettes.\u201d <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Economics Letters<\/em><\/span> 77, pp. 147\u2013155, is an accessible, informative starting point.<\/p>\n<p class=\"hanging-indent\">For a broader, historical review, see Brandt, A. M. (2007). <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">The Cigarette Century: The Rise, Fall, and Deadly Persistence of the Product That Defined America<\/em><\/span> (Basic Books).<\/p>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Appendix<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<ol>\n<li>The max run speed elasticity of distance on sand is 0.43 and this is quite inelastic, or unresponsive. Max run speed was doubled (so a 100% increase), and distance on sand did increase, but only by 43%.<\/li>\n<li>The IR elasticity of group size is \u22121, and this is unit elastic. IR fell by 60% (from 5 to 2), and group size rose by 60% (from 5 to 8). The minus sign means the two variables are inversely related.<\/li>\n<li>The slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) is 3\/4, so multiplying this by 5\/4 is 15\/16, which does agree with the 0.9375 value in the text.<\/li>\n<li>The slope of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">C<\/em><\/span>* = <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">f<\/em><\/span>(<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">T<\/em><\/span>) stays constant at 0.75, but the elasticity increases from 0.9375 to roughly 0.9643. This shows that elasticity is a local phenomenon that changes depending on the value of the exogenous variable at which it is computed.<\/li>\n<li>Governments hope that the cigarette demand is elastic, meaning that the price elasticity of demand is high. This way, small increases in taxes will produce big decreases in cigarette consumption.<\/li>\n<li>Many studies have produced a variety of results, but the price elasticity of demand for cigarettes is expected to be inelastic, so less than 1 in absolute value. A good guess would be \u22120.6.<\/li>\n<li>Teenage smokers are more price sensitive, since they are not as addicted yet and typically have lower incomes than adults. If adults are at \u22120.6, teenagers might be at \u22121.4.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<h1 class=\"import-ah\">6.5 Cost Minimization<\/h1>\n<p class=\"import-paft\">You are on the factory floor of a manufacturing business. The CEO calls and says, \u201cWe need to make 300 units today.\u201d<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your production function is simple: [latex]Q = \\sqrt{L} + \\sqrt{K}[\/latex], where <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> is the amount of labor hours and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> is the number of machines. You get to choose how much <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> to use, but you must produce 300 units.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You could, for example, use 90,000 hours of labor and no machines or 40,000 machines and 10,000 hours of labor. There are many other combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that would meet the required quantity of output (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Q<\/em><\/span>).<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You have to pay for the inputs. The wage rate (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>) is $20 per hour, and the rental rate of machines (<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>) is $40 per machine.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your goal is to find the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that minimize <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span> (total costs of production). Formally, your constrained optimization problem looks like this:<\/p>\n<p style=\"text-align: center;\">[latex]\\underset{L , K}{min} T C = 20 L + 40 K[\/latex]<br \/>\n[latex]\\text{s.t.} \\sqrt{L} + \\sqrt{K} = 300[\/latex]<\/p>\n<h2 class=\"import-bh\">Implementing the Problem in Excel<\/h2>\n<p class=\"import-paft\">You know that optimization problems always have three parts:<\/p>\n<ol>\n<li>Goal (objective function) \u2192 min <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>.<\/li>\n<li>Endogenous variables \u2192 <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>.<\/li>\n<li>Exogenous variables \u2192 <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span>, and the function [latex]\\sqrt{L} = \\sqrt{K} = q[\/latex].<\/li>\n<\/ol>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We will organize our spreadsheet with these parts, but first we want to visualize the problem.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell A1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>, and in cell B1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>. In cells A2 to A20, enter numbers 0 to 90000 by 5000. In cell B2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=(300-SQRT(A2))<\/em><\/span>\u02c6<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">2<\/em><\/span> and fill it down. Finally, make a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scatter<\/em><\/span> chart of the data in cells A1:B20.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Your chart is displaying an <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">isoquant<\/em><\/span>. Since the prefix <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">iso<\/em><\/span> means equal (like an isosceles triangle), an isoquant shows all the combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that make the same amount of output.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many isoquants, one for each level of output. Your chart shows the isoquant for 300 units of output. It is the constraint for this optimization problem. The solution is on the isoquant, but we do not know which combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> is the least expensive.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Add a point on the chart and a scroll bar on the sheet to visualize that you can choose any combination on the isoquant. See the appendix if you need help.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">So how do we find the cheapest combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> that produces 300 units of output? With Solver, of course, but first we have to implement the problem in the spreadsheet.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Label cells N1 and N2 as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, respectively. Cells N4, N5, and N6 have labels <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>, <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span>, and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span>, respectively. Cell N8 is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span> and N10 is the constraint. In cells M4, M5, and M6, enter the exogenous variable values. In cells M8 and M10, enter formulas. See the appendix if you need help.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now you are ready to run Solver.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Properly configure Solver and run it to find the optimal solution. See the appendix if you need help.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver should find a solution close to the exact answer of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>* = 40,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>* = 10, 000 with a <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>* = $1,200,000. This solution makes sense, since <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> are equally productive, but capital is twice as expensive as labor.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We can see that this solution is correct by computing the total cost of the points on the isoquant in columns A and B.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>In cell C1, enter the label <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">TC<\/em><\/span>. In cell C2, enter the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=20*A2+40*B2<\/em><\/span> and fill it down.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">It is easy to see that the cheapest way to make 300 units of output is the 40,000 and 10,000 combination.<\/p>\n<h2 class=\"import-bh\">Visualizing the Optimal Solution<\/h2>\n<p class=\"import-paft\">Recall that the cigars-and-brandies utility maximization problem was visualized with a tangency condition between the utility contours and the constraint. Does the same apply here? Yes, it does.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">We first create 3D surface and 2D contour plots of the total cost function, then we can draw a graph of the optimal solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><em class=\"import-hemb-i\">STEP<\/em> Copy cells A2:A20, insert a new sheet in your workbook, select cell A2, and paste. Select cell B1 and paste transpose (click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Paste<\/em><\/span> down arrow and select the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Transpose<\/em><\/span> icon as shown in Figure 6.13). Enter a formula that computes the total cost for the given labor in column A and capital in column B. See the appendix if you need help. Make <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">3D<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Surface<\/em><\/span> and 2D contour plots.<\/p>\n<figure style=\"width: 235px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p208-1.png\" alt=\"screen-capture showing how to paste transpose in Excel\" width=\"235\" height=\"459\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.13: Paste transpose.<\/strong><br \/>Source: Screenshot of Excel interface, \u00a9 Microsoft Corporation.<\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The surface is like a sheet of paper, and the contours are straight lines. Each contour is called an <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">isocost<\/em><\/span> because it represents combinations of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> with the same cost.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use Excel\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> group of drawing objects to add straight lines to your isoquant chart. Your lines must have a slope of 0.5 because <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">w<\/em><\/span>\/<span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">r<\/em><\/span> is 20\/40. The lowest feasible isocost is a line with <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>-intercept of 30,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span>-intercept of 60,000. All your isocost lines must be parallel.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.14 shows a visualization of the optimal solution. The curve is the constraint and the lines are isocosts. You want to be on the lowest isocost on the constraint.<\/p>\n<figure style=\"width: 723px\" class=\"wp-caption aligncenter\"><img src=\"http:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-content\/uploads\/sites\/73\/2025\/05\/GatewayBP-p209-1.png\" alt=\"plot showing the optimal solution as a 2D graph for the input cost minimization problem\" width=\"723\" height=\"476\" \/><figcaption class=\"wp-caption-text\"><strong>Figure 6.14: Visualizing the optimal solution.<\/strong><\/figcaption><\/figure>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">There are many more isocost lines than the three shown. The point on the isoquant and the highest isocost is feasible in that you could make 300 units with this combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, but you would not be minimizing costs. The lowest isocost has lower costs than the optimal solution (40,000 hours of labor and 10,000 machines), but since it is below the isoquant, it violates the constraint, and no combination of inputs on that isocost is an eligible solution.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Return to your chart and make sure you have an isocost line that is tangent to the isoquant at the optimal solution. Add a red dot (use Excel\u2019s <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Shapes<\/em><\/span> objects again) at point <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> = 40,000 and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span> = 10,000 (as shown in Figure 6.14). Finally, improve Figure 6.14. What is it missing? See the appendix if needed.<\/p>\n<h2 class=\"import-bh\">Comparative Statics<\/h2>\n<p class=\"import-paft\">We finish this problem by considering what would happen if the CEO called and changed the needed output level. We will compute the output elasticity of total cost.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use the Comparative Statics Wizard to explore how the optimal solution changes as you vary <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span> from 300 to 400 by 10. Make a chart of the minimum total cost as a function of quantity.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">You have made a graph of the cost function. This tells us how costs of production vary as output changes.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Use your CSWiz results to compute the slope of the cost function and the output elasticity of total cost as <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">q<\/em><\/span> rises by 10.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The slope of the cost function is rising slowly as quantity increases, which agrees with the shape of your cost function (it is increasing at an increasing rate). The output elasticity of total cost is decreasing as quantity goes up, but very slightly. Of more importance is its value of a little over 2\u2014this means that total cost is quite responsive to output in this example.<\/p>\n<div class=\"textbox textbox--key-takeaways\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Takeaways<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">Input cost minimization is a constrained optimization problem where we are asked to find the cheapest way to produce a given output.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Solver can do this problem, and the Comparative Statics Wizard can be used to explore how the optimal solution changes as quantity changes.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The optimal solution is visualized as a tangency between the isoquant and isocost lines.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Notice how many other concepts and skills were repeated as you worked through this problem. Once you get the pattern, it is easier to understand other applications.<\/p>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Appendix<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"import-paft\">To add controls to a spreadsheet, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> tab needs to be visible on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>. If it is not, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">File<\/em><\/span>, click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Options<\/em><\/span>, then click <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Customize<\/em><\/span> <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>, and check the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> item.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Copy cell range A2:B2 and paste it below your chart. To add this one point to your chart, copying, pasting, and editing the SERIES formula is an easy way to do this. You need to replace the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>&#8211; and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis arguments in the pasted SERIES formula with the cell that has the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-axis value and the cell that has the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">y<\/em><\/span>-axis value.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Next, we add the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control, but it has a maximum value of 30,000. As a simple work-around, we can connect the scroll bar to a different cell\u2014say, the cell below the 0 value (that you should have as the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">x<\/em><\/span>-coordinate value)\u2014and then the control can be connected to that cell.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Suppose your x-y coordinate pair is in cells F22 and G22. Change the 0 value in cell F22 to 10 times the cell below it by entering the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=10*F22<\/em><\/span> in cell F23. Right-click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control and make the cell link be F23 by entering F23 in the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Cell link<\/em><\/span> input box. Finally, the scroll bar maximum should be set to 9000.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Now when you set cell F23, for example, to 5,000, cell F22 is 50,000. Thus, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control can range from 0 to 9,000 in cell F23, and this produces values from 0 to 90,000 in cell F22.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\"><span style=\"color: #ff0000;\"><em class=\"import-hemb-i\">STEP<\/em> <\/span>Click the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Developer<\/em><\/span> tab on the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Ribbon<\/em><\/span>, click the down arrow in the <span class=\"import-ccust1\">Insert<\/span> button, and select the scroll bar icon (in the top, form control group). Click and drag on the spreadsheet (roughly under the chart) to create the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scroll Bar<\/em><\/span> control and link it to the appropriate cell on your spreadsheet.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Be careful to avoid selecting the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Spinner<\/em><\/span> control instead of the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Scrollbar<\/em><\/span>. When you click the down arrow on the <span class=\"import-ccust1\">Insert<\/span> button, if you float the cursor over each control, Excel displays its name. This helps you choose the right control.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">To use Solver to find the cost-minimizing combination of <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">L<\/em><\/span> and <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">K<\/em><\/span>, cells M4, M5, and M6 are 20, 40, and 300, respectively. Cell M8 has formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=M4*M1+M5*M2<\/em><\/span> and should be formatted as $. The constraint is in cell M10 with the formula <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=SQRT(M1)+SQRT(M2)-M6<\/em><\/span>.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">For Solver, the objective function is M8, the <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">Min<\/em><\/span> radio button should be checked, and the changing cells are M1 and M2. The constraint should be that M10 = 0.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">The formula in cell B2 needed to make a 3D chart is <span style=\"border: none windowtext 0pt; padding: 0;\"><em class=\"import-i\">=20*$A2+40*B$1<\/em><\/span>. Format as $ with no decimals and fill down and right.<\/p>\n<p class=\"import-p\" style=\"text-indent: 36pt;\">Figure 6.14 can be improved by adding an appropriate title and labeling the axes.<\/p>\n<\/div>\n<\/div>\n","protected":false},"author":13,"menu_order":6,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":3,"_links":{"self":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapters\/38"}],"collection":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/wp\/v2\/users\/13"}],"version-history":[{"count":33,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapters\/38\/revisions"}],"predecessor-version":[{"id":530,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapters\/38\/revisions\/530"}],"part":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapters\/38\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/pressbooks\/v2\/chapter-type?post=38"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/wp\/v2\/contributor?post=38"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.palni.org\/gatewaytobusinessanalytics\/wp-json\/wp\/v2\/license?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}