Illustrating Consumer Theory with the CES Utility Function*

Soumaya M. Tohamy

Assistant Professor of Economics

BerryCollege

MountBerry, Georgia 30149

J. Wilson Mixon Jr.

Dana Professor of Economics

BerryCollege

MountBerry, Georgia 30149

*An earlier version was presented at the 2002 ASSA meetings. We thank participants for useful comments.

Illustrating Consumer Theory with the CES Utility Function

Abstract:

This paper uses Microsoft Excel to derive compensated and uncompensated demand curves. It uses a constant elasticity of substitution (CES) utility function to show how changes in a good’s price or income affect the quantities demanded of that good and of the other composite good. Excel’s “Solver” is used toshow these changes.

The paper provides three contributions. First, it provides an explicit connection between the form of the utility function and the graphical presentation of the indifference curves, budget constraints, and demand curves. Second, it makes available to students a hands-on method of connecting utility functions to demand curves. Third, by relaxing the common Cobb-Douglas formulation, it allows a price-consumption curve (price-expansion path) that is not horizontal (alternatively, an uncompensated demand curve with nonunitary elasticity).

Illustrating Consumer Theory with the CES Utility Function

This paper employs Excel to explore a class of utility functions in order to illustrate how both compensated and uncompensated demand curves are derived from a consumer’s utility function and budget constraints. This approach yields three primary advantages. It allows a constant elasticity of substitution (CES) model and its derivation to be given graphical presentation, it affords students the opportunity to manipulate the model giving them a more hands-on perspective for these abstract concepts, and finally, it allows for comparison with the more generally used Cobb-Douglas function.

The use of Excel in teaching economics is expanding as a result of its wide availability. Cahill and Kosicki (2000) explore a number of economic models using Excel. Barreto (2001) uses it to teach comparative statistics. Mixon and Tohamy (2002) use it to accurately depict a set of cost curves. Paetow (1998) use it illustrate dynamic equilibrium. Nævdal (2002) solves two continuous time optimal control models using Excel. The two models are of real investment and of fisheries management. Reiss (1999) uses Excel to teach the capital asset pricing model of finance. Whigham and Whyte (1999) use it to illustrate input output relations. These uses illustrate Excel’s ability to handle an array of economic topics.

Spreadsheets in general are becoming an integral part of teaching economics. Smith and Smith (1988) illustrate the use of spreadsheets in microeconomic applications. Gerard and Eugene Kroch (1989) illustrate their use in macroeconomics. Judge (1990) uses spreadsheets for statistical illustrations. These applications illustrate the varying topics and fields which benefit from a powerful widely available spreadsheets software.

1.The Constant Elasticity of Substitution (CES) Utility Function

The CES utility function is given by:

.(1)

The Excel workbook lets the user select and . Rather than define directly, however, the user specifies the elasticity of substitution, . The exponent is defined as with a default of 1.01. As approaches 1, the function approaches the Cobb Douglas function; as approaches 0, the function approaches the Leontief fixed-coefficient function; and as s becomes very large, the production function exhibits linear isoquants ( and are perfect substitutes).

Figure 1 shows how utility depends on the levels of and . Two aspects of the “utility hill” depicted in the figure are apparent. First, utility increases with the increased consumption of either or , given values of the other. Second, the rate at which utility increases becomes smaller as we move along the “hill” in either direction. This utility function exhibits diminishing marginal utility: as the amount of one good increases, holding constant the other good, the additions to utility decrease.Other views of the utility function can be obtained by clicking on any corner of the 3-D graph and then rotating the graph. Rotating the graph illustrates that the indifference curves are the elevations of the hill.

2.CES and Cobb-Douglas Utility Functions:

The CES function shares the Cobb-Douglas function’s homogeneity of degree one. This is reflected in Figure 2, which shows the income-consumption curves (income-expansion paths) as rays through the origin. Also, the income elasticity of demand is unity for both products, as the user can readily verify. (The scroll bar to the right of the table allows the user to change levels of money income, .) The Cobb-Douglas function is restrictive in an additional way: its price consumption curve (price-expansion path) is horizontal, with the resulting unit price elasticity of (uncompensated) demand. The amount of Good is independent of the price of Good , as are income shares for and .

The CES formulation does not share this restriction. As Figure 3 shows, the quantities of both goods now depend on relative prices as well as money income. In the case used for illustration, s exceeds unity and the price-consumption curve (price-expansion path) slopes downward (less consumed when the relative price of decreases). This, of course, corresponds to a price-elastic uncompensated demand curve for .

3.Consumer Theory in Excel:

When using Excel with students, we take advantage of its ability to start with simple graphs and increase their complexity as we proceed throughout the workbook. The CES function and issues surrounding utility maximization can be sticky concepts. Excel provides the potential to develop the abstract model through a simple graphical composition. The menu shown in Figure 4 shows the road map. The first spreadsheet shows utility as a function of , with held constant at various levels. The next spreadsheet generalizes this, showing the “utility hill” represented in Figure 1. The third spreadsheet repeats some information from the first one and shows indifference curves for the first time, relating them to the horizontal lines in the second spreadsheet.

The third spreadsheet allows the user to do some ad hoc optimization by changing the utility level until the indifference curve appears tangent to the budget line. This provides the backdrop for formal optimization, the results of which are seen in Figures 2 and 3. This formal optimization is accomplished using Excel’s “Solver” facility. The optimization problem may be stated as either an exercise in maximizing utility given income and prices, or achieving a given utility level with minimum income, given prices. Figure 5 shows how one such “Solver” exercise is set up. “Solver” is instructed to maximize the value of the function in Cell E6 (the CES utility function) by changing Cells E4 and E5 (values of and ), subject to the budget constraint: , where is given in Cell E3 and is given in Cell E2.[1]

The rest of the workbook, except for the final sheet, is a series of applications of this powerful tool. Figure 3 above shows the effect of a price level change without compensation. Figure 4 shows a graph built in the seventh spreadsheet, in which the consumer is returned to the utility level that pertained before the price-level change. (Users may develop the appropriate “Solver” instructions to generate other methods of compensation.)

Figure 6 shows the compensated and uncompensated demand curves for given the same CES utility function that underlies all graphs shown previously.[2] That the two are quite different is apparent, reflecting the large income effect when the consumer buys just two goods. Willig (1976) rehabilitated the concept of Consumer Surplus, pointing out the conditions under which the area under the uncompensated demand curve is quite close to the actual value of Consumer Surplus. Hausman (1981) extended Willig’s work, examining the effect of a price change, the same issue addressed in Figure 6. Hausman shows that the area between the two prices and to the left of the uncompensated demand curve is not as close an approximation as is the area under the demand curve between two quantities (the proper measure when the good is to be provided free of charge). The results below illustrate Hausman’s point.

All values in Figure 6 except for “Consumer Surplus Change, Uncompensated” are either directly provided in previous sheets or can be computed from material in those sheets. Some comment regarding “Consumer Surplus Change, Uncompensated” is warranted. The demand curve generated by the CES utility function is not a simple one; its formula is:

,(2)

where all parameters have been defined in previous sheets. We were unable to integrate this demand curve. Instead we used the Trapezoidal Rule and Simpson’s Rule to approximate the value. (See Weber (1976).) The two approximations differed by just under $0.0015. The trapezoidal rule provides a simple, if somewhat crude, set of bounds for the exact integral. Using these, we report the maximum and minimum percentage differences between the area defined by the uncompensated demand curve and the appropriate error.

4. Comments and Conclusion:

Communicating the complexities of consumer theory and other concepts in the discipline can be challenging for any instructor. Programs like the one described herein can simplify the teaching process. More importantly, it can allow students to explore these models. (Tohamy and Mixon (2002) report positive student feedback on the use of Excel in economics.) This type of application opens the door to numerous expansions and improvements. As previously discussed, Excel is widely available and the spreadsheets themselves are easily modified. This opens the door for dialogue among instructors to determine the most effective variation of the program.[3] Furthermore, this method of developing economic theory with assistance from a computer application can be expanded to include other aspects of theory.

References

Adams, Gerard and Eugene Kroch. 1989. The Computer in the Teaching of Macroeconomics. Journal of Economic Education 20 (3), 269-80.

Barreto, Humberto. 2001. Teaching Comparative Statics with Microsoft Excel. Journal of Economic Education 32 (4), 397.

Cahill, M. and G. Kosicki. 2000. Exploring Economic Models Using Excel. Southern Economic Journal 66, 770-92.

Hausman, J. A. 1981. Exact consumer’s surplus and deadweight loss. American Economic Review 71, 662–76.

Judge, Guy. 1990. Quantitative Analysis for Economics and Business Using Lotus 1-2-3. Hemel-Hempstead: Harvester-Wheatsheaf.

Mixon, J. Wilson and Soumaya Tohamy. 2002. Cost Curves and How They Relate. Journal of Economic Education 33 (1) 89.

Nævdal, E. 2002. Numerical optimal Control in Continuous Time Made Easy. Computers in Higher Education Economics Review 15 (1).

Paetow, Holger. 1998. Long-run Dynamic Market Equilibrium Simulation through the Use of Spreadsheets. Computers in Higher Education Economics Review 12 (1), (Virtual Edition:

Reiss, James A. 1999. The Generation of Stock-Price/Yields Data Sets for the Simulation of the Two-Asset Portfolio Model and the CAPM Using Spreadsheets. Computers in Higher Education Economics Review 13 (2).

Smith, L. Murphy and l. C. Smith, Jr. 1988. Teaching Microeconomics with Microcomputer Spreadsheets. Journal of Economic Education 19 (4) 363-82.

Tohamy, Soumaya M. and J. Wilson Mixon Jr. 2002. Comparing Trade Instruments Using Spreadsheets. Social Science Computer Review 20 (2), 187-93.

Weber, Jean D. 1976 Mathematical Analysis: Business and Economic Applications, 3rd edition. New York: Harper and Row.

Whigham, David and Jeanie Whyte. 1999. A Graphic View of Input Output Relations with Excel. Computers in Higher Education Economics Review 13 (1).

Willig, R. 1976. Consumer’s surplus without apology. American Economic Review 66, 589–97.

Figure 1. A Utility Hill

Figure 2. Effect of an Income Change

Figure 3. Effect of a Price Reduction

Figure 4. The Menu of Spreadsheets

Figure 5. A Solver Exercise

Figure 6. Compensated and Uncompensated Demand Curves

Endnotes

1

[1]The two non-negativity constraints are typically not needed, but can prevent confusion when functions may be solved for economically meaningless negative values.

[2]Using Excel to graph the demand curve requires reversing the axes, placing price on the horizontal axis.

[3]We welcome suggestions for improvements of this workbook and for topics for additional workbooks.