(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 91939, 2680]*) (*NotebookOutlinePosition[ 92620, 2705]*) (* CellTagsIndexPosition[ 92576, 2701]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Efficiency in Production and Consumption", "Title"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " is a convenient computational engine for calculating measures of choice \ efficiency." }], "Subtitle", FontSlant->"Italic"], Cell[CellGroupData[{ Cell["by Hal R. Varian", "Section"], Cell[TextData[{ "The standard economic models of firms and consumers emphasize optimizing \ behavior. Firms are assumed to minimize costs or maximize profits, whereas \ consumers are assumed to maximize utility. However, no one is perfect\ \[LongDash]even ", StyleBox["homo economicus", FontSlant->"Italic"], ". When analyzing real choice data it is necessary to allow for departures \ from this model of strict optimization. \n\nIn this article we consider some \ measures of choice efficiency. In general an efficiency measure should have \ the property that a value of 1 corresponds to100 percent efficiency: full \ optimization. A value of 0 wouldcorrespond to behaviorthat is totally \ independent ofefficient choice. Values between 0 and 1 should be \ interpretable as partial efficiency.\n\nIt tums out that there are relatively \ natural ways to construct such measures for economic choices and that ", StyleBox["Mathematica", FontSlant->"Italic"], " is a convenient computational engine for this task. " }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["COST MINIMIZATION", "Section"], Cell[TextData[{ "Consider a firm that chooses factor inputs to minimize costs. Let ", StyleBox["w", FontSlant->"Italic"], " be a vector of factor prices, ", StyleBox["x", FontSlant->"Italic"], " a vector of factor choices, ", StyleBox["f", FontSlant->"Italic"], "(", StyleBox["x", FontSlant->"Italic"], ") a production function, and ", StyleBox["y", FontSlant->"Italic"], " a target level of output. Then the hypothesized model is:" }], "Text"], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`min\+x\)]], " ", StyleBox["w x", FontSlant->"Italic"], "\n\nsuch that ", StyleBox["f", FontSlant->"Italic"], "(", StyleBox["x", FontSlant->"Italic"], ") \[GreaterEqual] ", StyleBox["y", FontSlant->"Italic"], "." }], "Text", TextAlignment->Center], Cell[TextData[{ "Suppose that we have ", StyleBox["n", FontSlant->"Italic"], " observations of firm choices (", Cell[BoxData[ \(TraditionalForm\`w\^t\)]], ", ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], ", ", Cell[BoxData[ \(TraditionalForm\`y\^t\)]], ")) for ", StyleBox["t", FontSlant->"Italic"], " = 1, . . ., ", StyleBox["n", FontSlant->"Italic"], ".The followingWeak Axiom of Cost Minimization (WACM) is necessary and \ sufficient for the data to be consistent with the cost minimization model:\n\n\ ", StyleBox["WACM", FontWeight->"Bold"], ": ", Cell[BoxData[ \(TraditionalForm\`w\^t\)]], " ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], " \[LessEqual] ", Cell[BoxData[ \(TraditionalForm\`w\^t\)]], " ", Cell[BoxData[ \(TraditionalForm\`x\^s\)]], " for all ", StyleBox["s", FontSlant->"Italic"], " for which ", Cell[BoxData[ \(TraditionalForm\`y\^s\)]], " \[GreaterEqual] ", Cell[BoxData[ \(TraditionalForm\`y\^t\)]], "\n\nThis condition is rather intuitive; it says that the observed choice \ must cost no more than any other choice that generates at least as much \ output. See (Varian 1993) for further discussion.\n\nIf we have some data \ that violate WACM, we may want to see \"how close\" a specific observation ", StyleBox["t", FontSlant->"Italic"], " comes to satisfying WACM. A natural thing to do is to compute the \ following efficiency index:" }], "Text"], Cell[TextData[{ " ", Cell[BoxData[ \(TraditionalForm\`e\^t\)]], " = ", Cell[BoxData[ \(TraditionalForm\`min\+\(\(y\ \)\^s \[GreaterEqual] \ y\^t\)\)]], " ", Cell[BoxData[ FormBox[ FractionBox[ FormBox[\(\(w\^t\) x\^s\), "TraditionalForm"], \(\(w\^t\) x\^t\)], TraditionalForm]]] }], "Text", TextAlignment->Center], Cell[TextData[{ "\nIf ", Cell[BoxData[ \(TraditionalForm\`e\^t\)]], " < 1, then there is some observation that produces at least as much output \ as the ", StyleBox["t", FontSlant->"Italic"], "th observation and costs less than the ", StyleBox["t", FontSlant->"Italic"], "th observation. If ", Cell[BoxData[ \(TraditionalForm\`e\^t\)]], " = 1, no such observation exists." }], "Text"], Cell[TextData[{ "It is easy to compute this efficiency index using ", StyleBox["Mathematica", FontSlant->"Italic"], ". Suppose that we have ", StyleBox["n", FontSlant->"Italic"], " observations on ", StyleBox["k", FontSlant->"Italic"], " factors which we arrange in an array of dimensionn ", StyleBox["x", FontSlant->"Italic"], " \[Times] ", StyleBox["k", FontSlant->"Italic"], ". The following function measures the efficiency of observation ", StyleBox["i", FontSlant->"Italic"], " relative to observation ", StyleBox["j", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(efficOf[i_, \ j_, \ w_, \ x_]\ := \ \((w[\([j]\)]\ .\ x[\([i]\)])\)/\((w[\([j]\)]\ .\ x[\([j]\)])\)\)], "Input"], Cell[TextData[{ "This function returns the list of ", StyleBox["n", FontSlant->"Italic"], " \[Times] ", StyleBox["k", FontSlant->"Italic"], " efficiency measures." }], "Text"], Cell[BoxData[ \(eff[w_, \ x_, \ y_]\ := \ Map[Union, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Table[If[y[\([i]\)]\ <= \ y\ [\([j]\)], \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Min[efficOf[j, \ i, \ w, \ x], \ 1], \ 1], \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{i, \ 1\ Length[y]}, \ {j, \ 1, \ Length[y]}]]\)], "Input"], Cell["\<\ Finally, the following function takes the minimum of the efficiency \ measures just computed to calculate the actual list of efficiencies.\ \>", "Text"], Cell[BoxData[ \(costEfficiency[w_, \ x_, \ y_]\ := \ Map[Min, \ eff[w, \ x, \ y]]\)], "Input"], Cell[CellGroupData[{ Cell["EXAMPLE OF COST EFFICIENCY MEASUREMENT", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(<< cost.dat\)], "Input"], Cell[BoxData[ \($Failed\)], "Output"] }, Open ]], Cell["Now we compute the efficiencies.", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(effAll\ = \ costEfficiency[w, \ x, \ y]\)], "Input"], Cell[BoxData[ \({0.840569899542089338`, 0.525841004621559005`, 0.907895283923011753`, 0.68274521756405555`, 1, 0.507889942431675223`, 0.59567219261471358`, 0.654224106430795337`, 0.590418466451249823`, 0.746751708129580116`, 0.595972036667349591`, 0.751879145255186376`, 1, 1, 1, 0.870958953807556746`, 0.990814273630614295`, 0.775470085823046861`, 0.659192756789837464`, 0.574820134738922039`, 0.472513640920202337`, 0.698577465212966952`, 0.863941409577603991`, 0.768098464372346967`, 0.693701053242647347`, 0.754345144769156927`, 1, 0.461563921475847216`, 0.833213528691444693`, 0.841045504604168492`, 0.71812370645248249`, 1, 1, 0.790206784526201211`, 0.999999999999999822`, 1, 0.638938257302888068`, 0.781148072589665432`, 0.846166977067259118`, 0.707507432727297125`, 1, 1, 0.466251841680637912`, 0.666880222014944301`, 0.583253510443684231`, 0.617268716739941503`, 0.641974375033624777`, 0.838339959955563607`, 0.890835762538390518`, 0.858529572521559636`, 1, 0.78086451543433446`, 0.631422198057850803`, 0.658296001666197749`, 1, 0.846317587735040532`, 0.707986759745815952`, 0.648802823405142703`, 0.571281897843002539`, 0.653275173346508086`, 0.576510997964420468`, 0.574737982354351917`, 0.505806580198241029`, 0.965921804090266888`, 0.673733594743361496`, 1, 1, 0.999571703683917611`, 0.581690631836919536`, 0.603172228012824529`, 0.621100228286805844`, 0.806634520944071908`, 1, 0.676993042392563193`, 0.484737719360393892`, 1, 0.755765309861849488`, 0.940519735413326074`, 0.672726371328405736`, 0.72726894245407605`, 0.812183130627189164`, 0.999999999999999822`, 1, 0.679688870493868435`, 0.770954542054716007`} \)], "Output"] }, Open ]], Cell["\<\ Note that the only thing that is controlled for in these efficiency \ measures is the factor prices. Nothing is done about type of hospital, \ patient mix, and so on. Clearly some of the observed \"inefficiency\" is \ likely to be due to such factors. We can use the same technique to measure efficiency with respect to a subset \ of the factor inputs. Here we extract just the labor inputs and measure the \ efficiencies with respect to those labor choices only. \tW\ \>", "Text"], Cell[BoxData[ \(\(wlabor\ = \ Transpose[{\(Transpose[w]\)[\([1]\)], \ \(Transpose[w]\)[\([2]\)]}]; \)\)], "Input"], Cell[BoxData[ \(\(xlabor\ = \ Transpose[{\(Transpose[x]\)[\([1]\)], \ \(Transpose[x]\)[\([2]\)]}]; \)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(effLabor\ = \ costEfficiency[wlabor, \ xlabor, \ y]\)], "Input"], Cell[BoxData[ \({0.810519949318724464`, 0.52189605985269889`, 0.873620454894698994`, 0.672513077828063643`, 1, 0.504120262333755864`, 0.596857693499981856`, 0.652903759432173824`, 0.587924020874817543`, 0.74170791677813419`, 0.588622974022353862`, 0.737363778714967388`, 1, 1, 1, 0.855984057258325847`, 0.959150348375626649`, 0.772125123338873819`, 0.652890977253085402`, 0.56411526369380196`, 0.46887003831391345`, 0.682502847646612131`, 0.864778704507338069`, 0.757165002644294737`, 0.694295592955879037`, 0.727772803712286098`, 0.999999999999999822`, 0.454563568377851101`, 0.834702782927486275`, 0.810625631485858377`, 0.718089230841607051`, 1, 1, 0.802350590842038613`, 1, 0.960112376129544742`, 0.663748963897733279`, 0.788277782524506598`, 0.843860019337009248`, 0.70243452352433362`, 1, 0.999999999999999822`, 0.469225275224084281`, 0.653221980961889592`, 0.574132322878302225`, 0.639107821964037192`, 0.636164296883048763`, 0.809673531780512867`, 0.857015383801949859`, 0.839908443481182587`, 1, 0.765367317382919942`, 0.623383701737026463`, 0.689988360129720135`, 1, 0.833604038948974057`, 0.683463884914243724`, 0.616642989108701122`, 0.566364924160972016`, 0.638566969918583637`, 0.570566395021043959`, 0.568161920366314188`, 0.515950590127523067`, 0.947073716980488988`, 0.665469305511051967`, 1, 1, 0.999564265681678776`, 0.57635667337018015`, 0.592192644293398728`, 0.607880411007488774`, 0.785771982456916617`, 1, 0.668114537533399666`, 0.474429171815127137`, 1, 0.75068066611933224`, 0.900582445076895687`, 0.669415603882585585`, 0.717449303762230172`, 0.819807907259404267`, 1, 1, 0.661303159414402763`, 0.767011478694834636`}\)], "Output"] }, Open ]], Cell["\<\ The two series look fairly similar. We do a scatterplot to compare \ the two lists of efficiency measures.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(ListPlot[Transpose[{effAll, effLabor}]]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations -0.792601 1.76879 -0.475824 1.07914 [ [.09179 .59082 -9 -9 ] [.09179 .59082 9 0 ] [.26867 .59082 -9 -9 ] [.26867 .59082 9 0 ] [.44555 .59082 -9 -9 ] [.44555 .59082 9 0 ] [.62243 .59082 -9 -9 ] [.62243 .59082 9 0 ] [.79931 .59082 -9 -9 ] [.79931 .59082 9 0 ] [.96369 .06375 -18 -4.5 ] [.96369 .06375 0 4.5 ] [.96369 .17166 -18 -4.5 ] [.96369 .17166 0 4.5 ] [.96369 .27958 -18 -4.5 ] [.96369 .27958 0 4.5 ] [.96369 .38749 -18 -4.5 ] [.96369 .38749 0 4.5 ] [.96369 .4954 -18 -4.5 ] [.96369 .4954 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .09179 .60332 m .09179 .60957 L s [(0.5)] .09179 .59082 0 1 Mshowa .26867 .60332 m .26867 .60957 L s [(0.6)] .26867 .59082 0 1 Mshowa .44555 .60332 m .44555 .60957 L s [(0.7)] .44555 .59082 0 1 Mshowa .62243 .60332 m .62243 .60957 L s [(0.8)] .62243 .59082 0 1 Mshowa .79931 .60332 m .79931 .60957 L s [(0.9)] .79931 .59082 0 1 Mshowa .125 Mabswid .12717 .60332 m .12717 .60707 L s .16255 .60332 m .16255 .60707 L s .19792 .60332 m .19792 .60707 L s .2333 .60332 m .2333 .60707 L s .30405 .60332 m .30405 .60707 L s .33943 .60332 m .33943 .60707 L s .3748 .60332 m .3748 .60707 L s .41018 .60332 m .41018 .60707 L s .48093 .60332 m .48093 .60707 L s .5163 .60332 m .5163 .60707 L s .55168 .60332 m .55168 .60707 L s .58706 .60332 m .58706 .60707 L s .65781 .60332 m .65781 .60707 L s .69318 .60332 m .69318 .60707 L s .72856 .60332 m .72856 .60707 L s .76394 .60332 m .76394 .60707 L s .83469 .60332 m .83469 .60707 L s .87006 .60332 m .87006 .60707 L s .90544 .60332 m .90544 .60707 L s .94081 .60332 m .94081 .60707 L s .05642 .60332 m .05642 .60707 L s .02104 .60332 m .02104 .60707 L s .25 Mabswid 0 .60332 m 1 .60332 L s .97619 .06375 m .98244 .06375 L s [(0.5)] .96369 .06375 1 0 Mshowa .97619 .17166 m .98244 .17166 L s [(0.6)] .96369 .17166 1 0 Mshowa .97619 .27958 m .98244 .27958 L s [(0.7)] .96369 .27958 1 0 Mshowa .97619 .38749 m .98244 .38749 L s [(0.8)] .96369 .38749 1 0 Mshowa .97619 .4954 m .98244 .4954 L s [(0.9)] .96369 .4954 1 0 Mshowa .125 Mabswid .97619 .08533 m .97994 .08533 L s .97619 .10691 m .97994 .10691 L s .97619 .1285 m .97994 .1285 L s .97619 .15008 m .97994 .15008 L s .97619 .19324 m .97994 .19324 L s .97619 .21483 m .97994 .21483 L s .97619 .23641 m .97994 .23641 L s .97619 .25799 m .97994 .25799 L s .97619 .30116 m .97994 .30116 L s .97619 .32274 m .97994 .32274 L s .97619 .34432 m .97994 .34432 L s .97619 .36591 m .97994 .36591 L s .97619 .40907 m .97994 .40907 L s .97619 .43066 m .97994 .43066 L s .97619 .45224 m .97994 .45224 L s .97619 .47382 m .97994 .47382 L s .97619 .51699 m .97994 .51699 L s .97619 .53857 m .97994 .53857 L s .97619 .56015 m .97994 .56015 L s .97619 .58174 m .97994 .58174 L s .97619 .04216 m .97994 .04216 L s .97619 .02058 m .97994 .02058 L s .25 Mabswid .97619 0 m .97619 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .008 w .69419 .39884 Mdot .1375 .08738 Mdot .81328 .46694 Mdot .41503 .24991 Mdot .97619 .60332 Mdot .10575 .06819 Mdot .26102 .16827 Mdot .36459 .22875 Mdot .25173 .15863 Mdot .52825 .32458 Mdot .26155 .15938 Mdot .53732 .3199 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .74794 .44791 Mdot .95994 .55924 Mdot .57904 .35741 Mdot .37337 .22874 Mdot .22414 .13294 Mdot .04318 .03015 Mdot .44304 .26069 Mdot .73553 .4574 Mdot .56601 .34127 Mdot .43441 .27342 Mdot .54168 .30955 Mdot .97619 .60332 Mdot .02381 .01472 Mdot .68118 .42494 Mdot .69503 .39896 Mdot .47761 .2991 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .60511 .39003 Mdot .97619 .60332 Mdot .97619 .56027 Mdot .33755 .24046 Mdot .58909 .37484 Mdot .70409 .43482 Mdot .45883 .2822 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .0321 .03054 Mdot .38697 .2291 Mdot .23905 .14375 Mdot .29922 .21386 Mdot .34292 .21069 Mdot .69025 .39793 Mdot .7831 .44902 Mdot .72596 .43056 Mdot .97619 .60332 Mdot .58859 .35012 Mdot .32425 .1969 Mdot .37179 .26877 Mdot .97619 .60332 Mdot .70436 .42375 Mdot .45968 .26173 Mdot .355 .18962 Mdot .21788 .13536 Mdot .36291 .21328 Mdot .22713 .1399 Mdot .22399 .1373 Mdot .10207 .08096 Mdot .91591 .5462 Mdot .39909 .24231 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .97543 .60285 Mdot .23629 .14615 Mdot .27429 .16324 Mdot .306 .18017 Mdot .63417 .37214 Mdot .97619 .60332 Mdot .40486 .24517 Mdot .0648 .03615 Mdot .97619 .60332 Mdot .54419 .33427 Mdot .87098 .49603 Mdot .39731 .24657 Mdot .49379 .29841 Mdot .64398 .40887 Mdot .97619 .60332 Mdot .97619 .60332 Mdot .40963 .23782 Mdot .57106 .35189 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgGoo00<007ooOol01goo000`Ool2003oOol]Ool20008Ool0031oo`800?moobeoo`03 001oogoo00Moo`00ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03 001oogoo00Moo`00ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`80 00Qoo`00ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo 00Moo`00ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo 00Moo`00ogooGgoo00<007ooOol01goo003oOomOOol20008Ool00?mooemoo`03001oogoo00Moo`00 CGoo1000ogoo3Woo00<007ooOol01goo001=Ool4003oOol>Ool00`00Oomoo`07Ool004moo`<00?mo o`eoo`03001oogoo00Moo`00D7oo0P000goo0P00ogoo27oo00<007ooOol01goo001DOol3003oOol8 Ool00`00Oomoo`07Ool005Aoo`800?moo`Uoo`03001oogoo00Moo`00ogooGgoo0P0027oo003oOomO Ool00`00Oomoo`07Ool00?mooemoo`03001oogoo00Moo`00FGoo0P000Woo0P00ogoo00<007ooOol0 1goo001IOol20002Ool20002Ool2003kOol00`00Oomoo`07Ool0065oo`800>5oo`<000Ioo`8000Eo o`<000Moo`03001oogoo00Moo`00GGoo0P00i7oo00D007ooOomoo`0000Eoo`8000Aoo`05001oogoo Ool00006Ool00`00Oomoo`07Ool005eoo`800>Aoo`05001oogooOol0000;Ool01@00Oomoogoo0000 1Woo00<007ooOol01goo003oOom4Ool01@00Oomoogoo00002goo00D007ooOomoo`0000Ioo`<000Mo o`00ogooA7oo00D007ooOomoo`0000]oo`@000Moo`03001oogoo00Moo`00ogooA7oo00D007ooOomo o`0000]oo`03001oogoo00Qoo`03001oogoo00Moo`00KGoo0P00e7oo00D007ooOomoo`0000aoo`03 001oogoo00Moo`03001oogoo00Moo`00KGoo0P00eGoo0`003Woo0`001Woo00<007ooOol01goo003o OomOOol00`00Oomoo`07Ool007ioo`800=ioo`03001oogoo00Moo`00OWoo0P00gWoo0P0027oo003o OomOOol00`00Oomoo`07Ool007=oo`800>Uoo`03001oogoo00Moo`00Lgoo0P00jGoo00<007ooOol0 1goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo00Moo`00NWoo0P00hWoo00<007oo Ool01goo001jOol20005Ool2003KOol00`00Oomoo`07Ool006Yoo`8001Eoo`800=]oo`8000Qoo`00 JWoo0P00lWoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo00Mo o`00ogooGgoo00<007ooOol01goo0022Ool200000goo00000003Ool2003BOol00`00Oomoo`07Ool0 089oo`800003Ool0000000=oo`800=9oo`03001oogoo00Moo`00ogooGgoo00<007ooOol01goo002B Ool2003:Ool20008Ool007Qoo`8001Qoo`800Ool2002>Ool00`00Oomoo`07 Ool00Ool2001jOol0 0`00Oomoo`07Ool00=9oo`8008Yoo`03001oogoo00Moo`00ogooAGoo0`001Woo0P001Goo0`001goo 00<007ooOol01goo003oOom4Ool01@00Oomoogoo00001Goo0P0017oo00D007ooOomoo`0000Ioo`03 001oogoo00Moo`00ogooA7oo00D007ooOomoo`0000]oo`05001oogooOol00006Ool00`00Oomoo`07 Ool00?moodAoo`05001oogooOol0000;Ool01@00Oomoogoo00001Woo0`001goo003HOol2001YOol0 1@00Oomoogoo000037oo0`001goo00<007ooOol01goo003HOol2001YOol01@00Oomoogoo00002goo 00D007ooOomoo`0000Ioo`03001oogoo00Moo`00ogooA7oo00D007ooOomoo`0000]oo`05001oogoo Ool00006Ool00`00Oomoo`07Ool00?Ioo`@004Yoo`<000eoo`<000Moo`03001oogoo00Moo`00mWoo 1000I7oo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00>Ioo`8007Ioo`03001oogoo00Mo o`00iWoo0P00MWoo0P0027oo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo00Moo`00 ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?=oo`8000Ioo`80065oo`03001o ogoo00Moo`00lgoo0P001Woo0P00HGoo00<007ooOol01goo003oOol4Ool2001IOol20008Ool00?mo o`Aoo`8005Uoo`03001oogoo00Moo`00ngoo0P00HGoo00<007ooOol01goo003kOol2001QOol00`00 Oomoo`07Ool00?mooemoo`03001oogoo00Moo`00ogooGgoo00<007ooOol01goo003oOolWoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`80 00Qoo`00ogooGgoo00<007ooOol01goo003oOomOOol00`00Oomoo`07Ool00?mooemoo`03001oogoo 00Moo`00ogooGgoo00<007ooOol01goo003oOom5Ool30006Ool20004Ool30008Ool00`00Oomoo`07 Ool00?moodAoo`05001oogooOol00005Ool20007Ool00`00Oomoo`05Ool00`00Oomoo`07Ool00?mo odAoo`05001oogooOol0000?Ool00`00Oomoo`04Ool00`00Oomoo`07Ool00?moocQoo`8000Yoo`05 001oogooOol0000"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {0.447465, 0.440926, 0.00197296, 0.00323383}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["\<\ Note that the two series are very highly correlated; that is, firms \ that have low labor efficiency also appear to have low overall efficiency. \ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["UTILITY MAXIMIZATION", "Section"], Cell["\<\ We now turn to consumer behavior. Consider a consumer who chooses a \ vector of consumption goods x, facing a price vector p, and having income m so as to maximize utility:\ \>", "Text"], Cell[TextData[{ Cell[BoxData[ \(TraditionalForm\`min\+x\)]], " ", StyleBox["u x", FontSlant->"Italic"], "\n\nsuch that ", StyleBox["px", FontSlant->"Italic"], " \[GreaterEqual] ", StyleBox["m", FontSlant->"Italic"], "." }], "Text", TextAlignment->Center], Cell[TextData[{ "Define the direct revealed preference relation by ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], Cell[BoxData[ \(TraditionalForm\`R\^D\)]], Cell[BoxData[ \(TraditionalForm\`x\^s\)]], " if and only if ", Cell[BoxData[ \(TraditionalForm\`p\^t\)]], Cell[BoxData[ \(TraditionalForm\`x\^t\)]], " \[GreaterEqual]\n", Cell[BoxData[ \(TraditionalForm\`p\^t\)]], Cell[BoxData[ \(TraditionalForm\`x\^s\)]], ". The terminology is rather intuitive: ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], " is directly revealed preferred to ", Cell[BoxData[ \(TraditionalForm\`x\^s\)]], " if\n", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], " is purchased when ", Cell[BoxData[ \(TraditionalForm\`x\^s\)]], " was affordable. The revealed preference relation ", StyleBox["R", FontSlant->"Italic"], " is de-\nfined to be the transitive closure of the relation ", Cell[BoxData[ \(TraditionalForm\`R\^D\)]], " . That is, ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], StyleBox["Rx", FontSlant->"Italic"], " if and only if there\nis some chain of observations ", Cell[BoxData[ \(TraditionalForm\`\((x\^s\)\)]], ", ", Cell[BoxData[ \(TraditionalForm\`x\^r\)]], ", . . ., ", Cell[BoxData[ \(TraditionalForm\`x\^V\)]], ") such that ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[ RowBox[{ FormBox[\(x\^t\), "TraditionalForm"], \(R\^D\)}], "TraditionalForm"], \(x\^s\)}], TraditionalForm]]], ", ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[ RowBox[{ FormBox[\(x\^s\), "TraditionalForm"], \(R\^D\)}], "TraditionalForm"], \(x\^r\)}], TraditionalForm]]], ", . . ., ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[ RowBox[{ FormBox[\(x\^v\), "TraditionalForm"], \(R\^D\)}], "TraditionalForm"], "x"}], TraditionalForm]]], ".\nFinally, some observed choices ", Cell[BoxData[ \(TraditionalForm\`\((p\^t\)\)]], ", ", Cell[BoxData[ \(TraditionalForm\`X\^t\)]], ") are consistent with the utility maximiza-\ntion model if and only if \ they satisfy the Generalized Axiom of Revealed Preference\n(GARP):\n\n", StyleBox["GARP:", FontWeight->"Bold"], " If ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[\(x\^t\), "TraditionalForm"], \(Rx\^s\)}], TraditionalForm]]], ", then it is not the case that ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[\(p\^s\), "TraditionalForm"], \(x\^s\)}], TraditionalForm]]], " > ", Cell[BoxData[ FormBox[ RowBox[{ FormBox[\(p\^s\), "TraditionalForm"], \(x\^t\)}], TraditionalForm]]], ".\n\nIn words: if ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], " was chosen when ", Cell[BoxData[ \(TraditionalForm\`\(x\^s\ \)\)]], "was affordable, then ", Cell[BoxData[ \(TraditionalForm\`x\^s\)]], "cannot be chosen when ", Cell[BoxData[ \(TraditionalForm\`x\^t\)]], "is affordable." }], "Text"], Cell[CellGroupData[{ Cell["COMPUTING THE TRANSITIVE CLOSURE OF A PREFERENCE RELATION", "Subsubsection"], Cell[TextData[{ "As before we assume that the data come as two ", StyleBox["n", FontSlant->"Italic"], " \[Times] ", StyleBox["k", FontSlant->"Italic"], " matrices of prices and quantities.\n\nThe ", StyleBox["rdMatrix", "Input", FontWeight->"Plain"], StyleBox[" ", "Input"], "has a 1 in the (", StyleBox["i, j", FontSlant->"Italic"], ") entry if observation ", StyleBox["i ", FontSlant->"Italic"], "is directly revealed preferred to observation ", StyleBox["j", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(rdMatrix[p_, \ x_]\ := \ Module[{i, \ j, \ n}, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t n\ = \ Length[x]; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Table[If[ p[\([i]\)]\ .\ x[\([i]\)]\ >= \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t p[\([i]\)]\ .\ x[\([j]\)], \ 1, \ 0], \n \t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {i, \ 1, \ n}, \ {j, \ 1, \ n}]]\)], "Input"], Cell[TextData[{ "We need to compute the transitive closure of this matrix. A possible way \ to do this is to raise the matrix to the ", StyleBox["n", FontSlant->"Italic"], "th power and then look at the sign of each entry. It is not hard to see \ that the (", StyleBox["i", FontSlant->"Italic"], ", ", StyleBox["j", FontSlant->"Italic"], ") entry of the ", StyleBox["n", FontSlant->"Italic"], "th power matrix will be positive if and only if there is some chain of \ entries connecting ", StyleBox["i", FontSlant->"Italic"], " to ", StyleBox["j", FontSlant->"Italic"], " in the original matrix that are positive. This is very simple to \ implement in ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(tClosure[m_]\ := \ Sign[MatrixPower[m, \ Length[m]]]\)], "Input"], Cell["\<\ See the appendix for another way to compute the transitive closure.\ \ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["EXAMPLE", "Subsubsection"], Cell["\<\ Here is an example with three observations where the direct \ revealed preference relation involves no cycles, but the revealed preference \ relation does.\ \>", "Text"], Cell[BoxData[ \(p\ = \ {{1, \ 2, \ 8}, \ {4, \ 1, \ 8}, \ {3, \ 1, \ 2}}; \n x\ = \ {{2, \ 1, \ 3}, \ {3, \ 4, \ 2}, \ {2, \ 6, \ 2}}; \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(m\ = \ rdMatrix[p, \ x]\)], "Input"], Cell[BoxData[ \({{1, 1, 0}, {0, 1, 1}, {1, 0, 1}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(tClosure[m]\)], "Input"], Cell[BoxData[ \({{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["CHECKING GARP", "Subsubsection"], Cell[TextData[{ "Once we compute the transitive closre, it is easy to check GARP. A \ convenient way to do this is to compute a \"consupmtion efficiency index\" \ analogous to the cost efficiency index we computed previously. Here is a \ function that returns the observations revealed preferred to observation ", StyleBox["i", FontSlant->"Italic"], ", given the revealed preference relation summarized by the matrix ", StyleBox["m", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(ObsRP[i_, \ m_]\ := \ Complement\ [ Table[If[m[\([j, \ i]\)]\ > \ 0, \ j, \ i], \ {j, \ 1, \ Length[m]}], \ {0}]\)], "Input"], Cell[TextData[{ "The function ", StyleBox["consEfficiency ", "Input", FontWeight->"Plain"], StyleBox[ "computes the minimum expenditure necessary to purchase an observed choice \ that is revealed preferred to a given observation.", FontWeight->"Plain"] }], "Text"], Cell[BoxData[ \(consEfficiency[p_, \ x_]\ := \n\t Module[{m, \ n}, \ m\ = \ tClosure[rdMatrix[p, \ x]]; \ n\ = \ Length[x]; \n\t\t Table[Min[ x[\([ObsRP[i, \ m]]\)]\ .\ p[\([i]\)]/p[\([i]\)]\ .\ x[\([i]\)]], \ {i, \ 1, \ n}]]\)], "Input"], Cell["Here is an example of how this function is used.", "Text"], Cell[BoxData[ \(p\ = \ {{1., \ 2.}, \ {2., \ 1.}}; \n x\ = \ {{1., \ 2.}, \ {2., \ 1.}}; \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(consEfficiency[p, \ x]\)], "Input"], Cell[BoxData[ \({0.8`, 0.8`}\)], "Output"] }, Open ]], Cell["\<\ This shows that each of the two choices is onl 80% efficient.\ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["THE TOKEN ECONOMY", "Section"], Cell["\<\ Battalio et al. [Battalio 1973] collected a set of data on the \ consumption choices of 38 patients at Central Islip State Hospital. As part \ of their therapeutic treatment, the patients worked for tokens that could be \ retrieved for items such as cigarettes, candy, milk, locker rental, clothes, \ admission to a dance, and the like. During a seven-week period, the relative \ prices of various groups of these goods were doubled or halved. Because the \ prices of some of the goods were halved some weeks and doubled other weeks, \ prices varied by a factor of four. Data were collected on how the \ expenditures of each individual responded to the price changes. These data \ have been examined by Battalio and Cox [Cox 1994] using revealed preference \ techniques. Here are the prices and choices for subject number 8 in these \ experiments.\ \>", "Text"], Cell[BoxData[ \(p\ = \ {{1., \ 1., \ 1.}, \ {0.5, \ 2., \ 1.}, \ {1., \ 1., \ 1.}, \ {2., \ 0.5, \ 1.}, \ {2., \ 0.5, \ 1.}, \ {1., \ 1., \ 1.}, \ {1., \ 1., \ 1.}}; \n x\ = \ {{30, \ 9, \ 9}, \ {34, \ 10, \ 0}, \ {10, \ 4, \ 0}, \ {4, \ 8, \ 5}, \ {2, \ 15, \ 0}, \ {0, \ 15, \ 9}, \ {4, \ 7, \ 12}}; \)], "Input"], Cell["\<\ Here is the consumption efficiency of this consumer's choices.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(consEfficiency[p, \ x]\)], "Input"], Cell[BoxData[ \({1.`, 1.`, 1.`, 0.970588235294117573`, 1.`, 0.708333333333333214`, 0.739130434782608602`}\)], "Output"] }, Open ]], Cell["\<\ Most of the consumers in the Battalio study were quite efficient. \ There were 256 choices made during the seven-week experiment. Of the \ inefficient choices, 8 were 97-99% efficient, 4 were 93-96% efficient, 1 was \ 91% efficient, and one was 81% efficient.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["AFRIAT'S EFFICIENCY INDEX", "Section"], Cell[TextData[{ "The preceding efficiency index measures the consumption efficiency of each \ observation. Afriat's efficiency index, described in [Afrait 1967], measures \ the overall efficiency of a set of consumption choices. Following Afriat, we \ say that an observation ", StyleBox["r", FontSlant->"Italic"], " is directly revealed preferred to an observation ", StyleBox["s", FontSlant->"Italic"], " at efficiency level ", StyleBox["e", FontSlant->"Italic"], " of ", Cell[BoxData[ \(TraditionalForm\`\(ep\^r\) x\^r\)]], "\[GreaterEqual] ", Cell[BoxData[ \(TraditionalForm\`\(p\^r\) x\^s\)]], ". (Although Afriat does not require it, we adopt the convention that it is \ always the case that ", Cell[BoxData[ \(TraditionalForm\`\(x\^r\) \(R\^D\) x\^r\)]], "; i.e., an observation is always directly revealed preferred to itself.) \ Obviously ", StyleBox["e", FontSlant->"Italic"], " = 1 is the standard revealed preference comparison and ", StyleBox["e", FontSlant->"Italic"], " = 0 is vacuous. For a given ", StyleBox["e", FontSlant->"Italic"], " we can construct the analogue of the direct revealed preference measure, \ compute its transitive closure ", Cell[BoxData[ \(TraditionalForm\`R\_e\)]], ", and then check the analog of ", Cell[BoxData[ \(TraditionalForm\`GARP\_e\)], FontSlant->"Italic"], ": if ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ FormBox[ RowBox[{ RowBox[{ FormBox[\(x\^s\), "TraditionalForm"], FormBox[\(R\_e\), "TraditionalForm"], \(x\^t\)}], ",", " ", "then"}], "TraditionalForm"], StyleBox[\(ep\^t\), FontSlant->"Italic"], \(x\^t\)}], " ", "<", " ", \(\(p\^t\) x\^s\)}], TraditionalForm]]], ".\n\nThe following function computes the diret revealed preference \ relation associated with efficiency level ", StyleBox["e", FontSlant->"Italic"], ":" }], "Text"], Cell[BoxData[ \(rdEMatrix[p_, \ x_, \ e_]\ := \ Module[{i, \ j, \ n}, \n\t\tn\ = \ Length[p]; \n\t\t Table[If[ \((e\ p[\([i]\)]\ .x\ [\([i]\)]\ >= \ p[\([i]\)]\ .\ x[\([j]\)]) \)\ || \ i\ == \ j, \ 1, \ 0], \n\t\t\t{i, \ 1, \ n}, \ {j, \ 1, \ n}]]\)], "Input"], Cell[TextData[{ "We can use the ", StyleBox["tClosure ", "Input", FontWeight->"Plain"], StyleBox[ "function defined earlier to compute the transitive closure of this matrix. \ We then check to see if GARP is satisfied (at the given efficiency level) \ using the function ", FontWeight->"Plain"], StyleBox["GARPOK", "Input", FontWeight->"Plain"], ". This function returns a matrix with a ", StyleBox["False ", "Input", FontWeight->"Plain"], StyleBox[" in the (", FontWeight->"Plain"], StyleBox["i", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[", ", FontWeight->"Plain"], StyleBox["j", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[") entry if ", FontWeight->"Plain"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ FormBox[ RowBox[{ FormBox[\(x\^i\), "TraditionalForm"], FormBox["R", "TraditionalForm"], \(x\^j\), " ", "and"}], "TraditionalForm"], StyleBox[\(ep\^j\), FontSlant->"Italic"], \(x\^j\)}], " ", ">", " ", \(\(p\^j\) x\^i\)}], TraditionalForm]]], "; otherwise, it returns ", StyleBox["True", "Input", FontWeight->"Plain"], StyleBox[". If ", FontWeight->"Plain"], StyleBox["GARPOK", "Input", FontWeight->"Plain"], StyleBox[" returns all ", FontWeight->"Plain"], StyleBox["True", "Input", FontWeight->"Plain"], StyleBox[" ", FontWeight->"Bold"], "entries, the data are consistent with ", StyleBox["GARP", "Input", FontWeight->"Plain"], StyleBox[" at efficiency level ", FontWeight->"Plain"], StyleBox["e", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[".", FontWeight->"Plain"] }], "Text"], Cell[BoxData[ \(GARPOK[p_, \ x_, \ m_, \ e_]\ := \ Module[{i, \ j, \ n}, \ n\ = \ Length[m]; \ Table[\ If[ m[\([i, \ j]\)]\ == \ 1\ && \ \((e\ p[\([j]\)]\ .\ x[\([j]\)]\ > \ p[\([j]\)]\ .\ x[\([i]\)]) \), \ False, \ True], \ {j, \ 1, \ n}, \ {i, \ 1, \ n}]]\)], "Input"], Cell[TextData[{ "We use the ", StyleBox["GARPOK", "Input", FontWeight->"Plain"], StyleBox[ " function to define a couple of other useful functins. This function \ returns the list of observations that violate GARP ", FontWeight->"Plain"], StyleBox["(at efficiency level ", "Input", FontWeight->"Plain"], StyleBox["e", "Input", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[")", "Input", FontWeight->"Plain"], StyleBox[".", FontWeight->"Plain"] }], "Text"], Cell[BoxData[ \(ViolationList[p_, \ x_, \ e_]\ := \n\t Module[{m}, \ m\ = \ tClosure[rdEMatrix[p, \ x, \ e]]; \ Union[Flatten[Position[GARPOK[p, \ x, \ m, \ e], \ False]]]]\)], "Input"], Cell["This function just counts the number of violations.", "Text"], Cell[BoxData[ \(NumberViolations[p_, \ x_, \ e_]\ := \ Length[ViolationList[p, \ x, \ e]]\)], "Input"], Cell["\<\ We will try these functions on the example we used in the last \ section.\ \>", "Text"], Cell[BoxData[ \(p\ = \ {{1., \ 2.}, \ {2., \ 1.}}; \n x\ = \ {{1., \ 2.}, \ {2., \ 1.}}; \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(MatrixForm[GARPOK[p, \ x, \ tClosure[rdEMatrix[p, \ x, \ .81]], \ .81]] \)], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", GridBox[{ {"True", "False"}, {"False", "True"} }], ")"}], (MatrixForm[ #]&)]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(MatrixForm[GARPOK[p, \ x, \ tClosure[rdEMatrix[p, \ x, \ .79]], \ .79]] \)], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", GridBox[{ {"True", "True"}, {"True", "True"} }], ")"}], (MatrixForm[ #]&)]], "Output"] }, Open ]], Cell[TextData[{ "This shows that the Afriat efficiency measure is between .79 and .81. we \ can automate the process of finding the maximal value of ", StyleBox["e", FontSlant->"Italic"], " such that the data satisfy ", "GARP", StyleBox[" ", "Input", FontWeight->"Plain"], StyleBox["by using the following binary search.", FontWeight->"Plain"] }], "Text"], Cell[BoxData[ \(AfriatEfficiency[p_, \ x_, \ maxSteps_]\ := \ Module[{step, \ e}, \ e\ = \ 1/2; \n\t\t For[step\ = \ 1, \ step\ <= \ maxSteps, \ \(step++\), \n\t\t\t If[NumberViolations[p, \ x, \ e]\ > \ 0, \n\t\t\t\t e\ = \ e\ - \ 2^\((\(-\((step\ + \ 1)\)\))\), \n\t\t\t\t e\ = \ e\ + \ 2^\((\(-\((step\ + \ 1)\)\))\)]; \n\t\t\t Print[N[e]]]]\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(AfriatEfficiency[p, \ x, \ 10]\)], "Input"], Cell[BoxData[ \(0.75`\)], "Print"], Cell[BoxData[ \(0.875`\)], "Print"], Cell[BoxData[ \(0.8125`\)], "Print"], Cell[BoxData[ \(0.78125`\)], "Print"], Cell[BoxData[ \(0.796875`\)], "Print"], Cell[BoxData[ \(0.8046875`\)], "Print"], Cell[BoxData[ \(0.80078125`\)], "Print"], Cell[BoxData[ \(0.798828125`\)], "Print"], Cell[BoxData[ \(0.7998046875`\)], "Print"], Cell[BoxData[ \(0.80029296875`\)], "Print"] }, Open ]], Cell["\<\ As we saw before, these choices are about 80% efficient. Here are the Battalio et al. data for subject 8 again:\ \>", "Text"], Cell[BoxData[ \(p\ = \ {{1., \ 1., \ 1.}, \ {0.5, \ 2., \ 1.}, \ {1., \ 1., \ 1.}, \ {2., \ 0.5, \ 1.}, \ {2., \ 0.5, \ 1.}, \ {1., \ 1., \ 1.}, \ {1., \ 1., \ 1.}}; \n x\ = \ {{30, \ 9, \ 9}, \ {34, \ 10, \ 0}, \ {10, \ 4, \ 0}, \ {4, \ 8, \ 5}, \ {2, \ 15, \ 0}, \ {0, \ 15, \ 9}, \ {4, \ 7, \ 12}}; \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(AfriatEfficiency[p, \ x, \ 10]\)], "Input"], Cell[BoxData[ \(0.75`\)], "Print"], Cell[BoxData[ \(0.875`\)], "Print"], Cell[BoxData[ \(0.9375`\)], "Print"], Cell[BoxData[ \(0.96875`\)], "Print"], Cell[BoxData[ \(0.984375`\)], "Print"], Cell[BoxData[ \(0.9765625`\)], "Print"], Cell[BoxData[ \(0.97265625`\)], "Print"], Cell[BoxData[ \(0.970703125`\)], "Print"], Cell[BoxData[ \(0.9697265625`\)], "Print"], Cell[BoxData[ \(0.97021484375`\)], "Print"] }, Open ]], Cell["\<\ It appears that subject 8 is about 97% efficient in her \ choices.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["DRAWING BUDGET SETS", "Section"], Cell["\<\ Here are some functions to draw a set of bedgets and illustrate the \ observations that violate revealed preference\ \>", "Text"], Cell[BoxData[ \(DrawABudget[{p1_, \ p2_}, \ {x1_, \ x2_}]\ := \ Module[{w, \ t}, \ w\ = \ p1\ x1\ + \ p2\ x2; \ Plot[w/p2\ - \ p1\ t/p2, \ {t, \ 0, \ w/p1}, \ AspectRatio\ -> \ 1, \ DisplayFunction\ -> \ Identity]]\)], "Input"], Cell[BoxData[ \(DrawBudgets[p_, \ x_]\ := \ Table[{DrawABudget[p[\([i]\)], \ x[\([i]\)]], \ Graphics[Point[x[\([i]\)]]]}, \ {i, \ 1, \ Length[p]}]\)], "Input"], Cell[BoxData[ \(PlotViolations[p_, \ x_]\ := \ ListPlot[x[\([ViolationList[p, \ x, \ 1]]\)], AspectRatio\ -> \ 1, \ DisplayFunction\ -> \ Identity, \ PlotStyle\ -> \ {Hue[0], \ PointSize\ [.02]}]\)], "Input"], Cell[BoxData[ \(DrawViolations[p_, \ x_]\ := \ Show[DrawBudgets[p, \ x], \ PlotViolations[p, \ x], \ Prolog\ -> \ PointSize[.02], \ DisplayFunction\ -> \ $DisplayFunction]\)], "Input"], Cell[CellGroupData[{ Cell["EXAMPLE", "Subsubsection"], Cell[TextData[{ "To illustrate the use of ", StyleBox["DrawViolations", "Input", FontWeight->"Plain"], StyleBox[ ", we examine some experimental data generated by Andreoni and Miller \ [Andreoni and Miller 1994]. They presented subjects with a choice between \ taking some money for themselves or donating money to a group. If the \ subjects chose to donate, the experimenters would match the donations at \ various rates, thereby changing the \"price\" of the donations. Andreoni and \ Miller were interested in whether the subjects' contributions varied with the \ price of contributions in the way predicted by the theory of economic choice.\ \n\nHere is the choice behaviour exhibited by one of their subjects:", FontWeight->"Plain"] }], "Text"], Cell[BoxData[ \(p = \ {{1.0, \ 0.5}, \ {0.5, \ 1.0}, \ {2.0, \ 1.0}, \ {1.0, \ 2.0}, \ {1.0, \ 1.0}, \ {1.0, \ 0.5}, {0.5, \ 1.0}, \ {2.0, \ 1.0}, \ {1.0, \ 2.0}}; \n x\ = \ {{30., \ 16.}, \ {76., \ 0.}, \ {22.5, \ 5.0}, \ {30.0, \ 10.0}, \ {40.0, \ 10.0}, \ {40.0, \ 20.0}, \ {100.0, \ 0.0}, \ {35.5, \ 5.1}, \ {60.8, \ 7.6}}; \)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(DrawViolations[p, \ x]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: 1 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.00952381 0.0238095 0.00952381 [ [.21429 .01131 -6 -9 ] [.21429 .01131 6 0 ] [.40476 .01131 -6 -9 ] [.40476 .01131 6 0 ] [.59524 .01131 -6 -9 ] [.59524 .01131 6 0 ] [.78571 .01131 -6 -9 ] [.78571 .01131 6 0 ] [.97619 .01131 -9 -9 ] [.97619 .01131 9 0 ] [.01131 .21429 -12 -4.5 ] [.01131 .21429 0 4.5 ] [.01131 .40476 -12 -4.5 ] [.01131 .40476 0 4.5 ] [.01131 .59524 -12 -4.5 ] [.01131 .59524 0 4.5 ] [.01131 .78571 -12 -4.5 ] [.01131 .78571 0 4.5 ] [.01131 .97619 -18 -4.5 ] [.01131 .97619 0 4.5 ] [ 0 0 0 0 ] [ 1 1 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .02381 m .21429 .03006 L s [(20)] .21429 .01131 0 1 Mshowa .40476 .02381 m .40476 .03006 L s [(40)] .40476 .01131 0 1 Mshowa .59524 .02381 m .59524 .03006 L s [(60)] .59524 .01131 0 1 Mshowa .78571 .02381 m .78571 .03006 L s [(80)] .78571 .01131 0 1 Mshowa .97619 .02381 m .97619 .03006 L s [(100)] .97619 .01131 0 1 Mshowa .125 Mabswid .07143 .02381 m .07143 .02756 L s .11905 .02381 m .11905 .02756 L s .16667 .02381 m .16667 .02756 L s .2619 .02381 m .2619 .02756 L s .30952 .02381 m .30952 .02756 L s .35714 .02381 m .35714 .02756 L s .45238 .02381 m .45238 .02756 L s .5 .02381 m .5 .02756 L s .54762 .02381 m .54762 .02756 L s .64286 .02381 m .64286 .02756 L s .69048 .02381 m .69048 .02756 L s .7381 .02381 m .7381 .02756 L s .83333 .02381 m .83333 .02756 L s .88095 .02381 m .88095 .02756 L s .92857 .02381 m .92857 .02756 L s .25 Mabswid 0 .02381 m 1 .02381 L s .02381 .21429 m .03006 .21429 L s [(20)] .01131 .21429 1 0 Mshowa .02381 .40476 m .03006 .40476 L s [(40)] .01131 .40476 1 0 Mshowa .02381 .59524 m .03006 .59524 L s [(60)] .01131 .59524 1 0 Mshowa .02381 .78571 m .03006 .78571 L s [(80)] .01131 .78571 1 0 Mshowa .02381 .97619 m .03006 .97619 L s [(100)] .01131 .97619 1 0 Mshowa .125 Mabswid .02381 .07143 m .02756 .07143 L s .02381 .11905 m .02756 .11905 L s .02381 .16667 m .02756 .16667 L s .02381 .2619 m .02756 .2619 L s .02381 .30952 m .02756 .30952 L s .02381 .35714 m .02756 .35714 L s .02381 .45238 m .02756 .45238 L s .02381 .5 m .02756 .5 L s .02381 .54762 m .02756 .54762 L s .02381 .64286 m .02756 .64286 L s .02381 .69048 m .02756 .69048 L s .02381 .7381 m .02756 .7381 L s .02381 .83333 m .02756 .83333 L s .02381 .88095 m .02756 .88095 L s .02381 .92857 m .02756 .92857 L s .25 Mabswid .02381 0 m .02381 1 L s 0 0 m 1 0 L 1 1 L 0 1 L closepath clip newpath .5 Mabswid .02381 .74762 m .03849 .71826 L .0545 .68623 L .06954 .65616 L .084 .62724 L .09939 .59645 L .11421 .56681 L .12996 .53532 L .14513 .50497 L .15973 .47577 L .17526 .44472 L .19021 .41481 L .20459 .38606 L .2199 .35544 L .23463 .32597 L .2503 .29464 L .26539 .26446 L .2799 .23543 L .29535 .20454 L .31022 .17481 L .32602 .1432 L .34124 .11275 L .35589 .08345 L .37147 .05229 L .38571 .02381 L s .02 w .30952 .17619 Mdot .5 Mabswid .02381 .38571 m .05317 .37103 L .08519 .35502 L .11527 .33998 L .14419 .32552 L .17498 .31013 L .20461 .29531 L .23611 .27956 L .26646 .26439 L .29565 .24979 L .32671 .23426 L .35662 .21931 L .38537 .20493 L .41599 .18962 L .44546 .17489 L .47679 .15922 L .50697 .14414 L .53599 .12962 L .56688 .11418 L .59662 .09931 L .62823 .08351 L .65868 .06828 L .68797 .05363 L .71914 .03805 L .74762 .02381 L s .02 w .74762 .02381 Mdot .5 Mabswid .02381 .5 m .03347 .48068 L .044 .45961 L .0539 .43983 L .06341 .4208 L .07354 .40055 L .08328 .38105 L .09365 .36033 L .10363 .34036 L .11323 .32116 L .12345 .30072 L .13329 .28105 L .14275 .26213 L .15282 .24199 L .16251 .2226 L .17282 .20199 L .18274 .18213 L .19229 .16304 L .20245 .14271 L .21224 .12315 L .22263 .10236 L .23265 .08232 L .24229 .06305 L .25254 .04255 L .2619 .02381 L s .02 w .2381 .07143 Mdot .5 Mabswid .02381 .2619 m .04313 .25225 L .06419 .24171 L .08398 .23182 L .10301 .22231 L .12326 .21218 L .14276 .20243 L .16348 .19207 L .18345 .18209 L .20265 .17248 L .22309 .16227 L .24276 .15243 L .26168 .14297 L .28182 .1329 L .30121 .1232 L .32182 .1129 L .34168 .10297 L .36077 .09342 L .3811 .08326 L .40066 .07348 L .42145 .06308 L .44149 .05307 L .46076 .04343 L .48126 .03318 L .5 .02381 L s .02 w .30952 .11905 Mdot .5 Mabswid .02381 .5 m .04313 .48068 L .06419 .45961 L .08398 .43983 L .10301 .4208 L .12326 .40055 L .14276 .38105 L .16348 .36033 L .18345 .34036 L .20265 .32116 L .22309 .30072 L .24276 .28105 L .26168 .26213 L .28182 .24199 L .30121 .2226 L .32182 .20199 L .34168 .18213 L .36077 .16304 L .3811 .14271 L .40066 .12315 L .42145 .10236 L .44149 .08232 L .46076 .06305 L .48126 .04255 L .5 .02381 L s .02 w .40476 .11905 Mdot .5 Mabswid .02381 .97619 m .04313 .93756 L .06419 .89542 L .08398 .85585 L .10301 .81779 L .12326 .77728 L .14276 .73829 L .16348 .69684 L .18345 .65691 L .20265 .6185 L .22309 .57763 L .24276 .53828 L .26168 .50045 L .28182 .46016 L .30121 .42139 L .32182 .38016 L .34168 .34046 L .36077 .30226 L .3811 .26162 L .40066 .22249 L .42145 .18091 L .44149 .14084 L .46076 .10229 L .48126 .06129 L .5 .02381 L s .02 w .40476 .21429 Mdot .5 Mabswid .02381 .5 m .06244 .48068 L .10458 .45961 L .14415 .43983 L .18221 .4208 L .22272 .40055 L .26171 .38105 L .30316 .36033 L .34309 .34036 L .3815 .32116 L .42237 .30072 L .46172 .28105 L .49955 .26213 L .53984 .24199 L .57861 .2226 L .61984 .20199 L .65954 .18213 L .69774 .16304 L .73838 .14271 L .77751 .12315 L .81909 .10236 L .85916 .08232 L .89771 .06305 L .93871 .04255 L .97619 .02381 L s .02 w .97619 .02381 Mdot .5 Mabswid .02381 .74857 m .03851 .71917 L .05454 .68711 L .0696 .65699 L .08408 .62803 L .09949 .5972 L .11433 .56753 L .1301 .53599 L .14529 .5056 L .15991 .47637 L .17546 .44527 L .19043 .41532 L .20483 .38653 L .22016 .35587 L .23491 .32637 L .2506 .295 L .26571 .26478 L .28024 .23571 L .2957 .20478 L .31059 .175 L .32642 .14336 L .34166 .11287 L .35633 .08353 L .37193 .05233 L .38619 .02381 L s .02 w .3619 .07238 Mdot .5 Mabswid .02381 .38571 m .05317 .37103 L .08519 .35502 L .11527 .33998 L .14419 .32552 L .17498 .31013 L .20461 .29531 L .23611 .27956 L .26646 .26439 L .29565 .24979 L .32671 .23426 L .35662 .21931 L .38537 .20493 L .41599 .18962 L .44546 .17489 L .47679 .15922 L .50697 .14414 L .53599 .12962 L .56688 .11418 L .59662 .09931 L .62823 .08351 L .65868 .06828 L .68797 .05363 L .71914 .03805 L .74762 .02381 L s .02 w .60286 .09619 Mdot 1 0 0 r .30952 .17619 Mdot .30952 .11905 Mdot .3619 .07238 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 288}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg7oo0`001Goo0`00=goo00<007ooOol00goo0`00=Woo0`0017oo0`00=Goo 0`001Goo0`00ioo`H004Moo`H000Yoo`004Wooo`00D`0017oo000JOol00`00Oomoo`0=Ool0 0`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0>Ool0 0`00Oomoo`0=Ool00`00Oomoo`06Ool00`00Oomoo`04Ool00`00Oomoo`0=Ool00`00Oomoo`09Ool5 000?Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool6000:Ool0 0`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0=Ool00`00Oomoo`0:Ool6000:Ool001Yoo`03 001oogoo03eoo`03001oogoo00aoo`03001oogoo02Moo`03001oogoo00Eoo`03001oogoo01Moo`80 009oo`80021oo`03001oogoo02]oo`P000Yoo`03001oogoo03Uoo`L000Yoo`006Woo00<007ooOol0 C7oo00<007ooOol09goo00<007ooOol07Goo0P000goo00<007oo0000CGoo00@007ooOomoo`@004Eo o`80009oo`@000]oo`006Woo00<007ooOol0Bgoo00<007ooOol09goo0P007Woo00<007ooOol00Woo 00<007oo0000C7oo0P00Bgoo0P004goo000JOol00`00Oomoo`1;Ool00`00Oomoo`0WOol00`00Oomo o`0KOol20004Ool01000Oomoo`00BWoo0P00C7oo00<007ooOol04goo000JOol00`00Oomoo`1;Ool0 0`00Oomoo`0VOol2000LOol00`00Oomoo`03Ool01000Oomoo`00BGoo0P00C7oo0P005Woo000JOol0 0`00Oomoo`1:Ool00`00Oomoo`0WOol00`00Oomoo`0IOol20005Ool01000Oomoo`00Agoo0`00C7oo 0P0067oo000JOol00`00Oomoo`1:Ool00`00Oomoo`0VOol2000HOol30006Ool01@00Oomoogoo0000 AGoo0P00C7oo0`006Woo000JOol00`00Oomoo`19Ool00`00Oomoo`0WOol2000FOol20008Ool01@00 Oomoogoo0000A7oo0P00C7oo0P007Goo000JOol00`00Oomoo`19Ool00`00Oomoo`0VOol2000EOol2 0009Ool00`00Oomoo`02Ool00`00Oomoo`10Ool2001Ool2000= Ool00`00Oomoo`03Ool00`00Oomoo`0lOol2001;Ool2000VOol001Yoo`03001oogoo04Aoo`@002Eo o`Al0003001oogoo00aoo`8000ioo`03001oogoo00Aoo`03001oogoo03Yoo`8004]oo`8002Qoo`00 6Woo00<007ooOol0@goo1P008goo1W`03Goo00<007ooOol03Goo00<007ooOol017oo00<007ooOol0 >Goo0P00Bgoo0P00:Woo000JOol20014Ool6000SOol6O00;Ool2000?Ool00`00Oomoo`05Ool00`00 Oomoo`0gOol2001;Ool2000/Ool001Yoo`03001oogoo04=oo`H002=oo`Il00Uoo`80011oo`03001o ogoo00Eoo`03001oogoo03Ioo`8004aoo`03001oogoo02aoo`006Woo00<007ooOol0@goo1P008goo 1W`01goo0P004Goo00<007ooOol01Woo00<007ooOol0=7oo0P00C7oo0P00;goo000JOol00`00Oomo o`14Ool4000UOol4O006Ool2000BOol00`00Oomoo`07Ool00`00Oomoo`0bOol2001Ool00`00Oomoo`0OOol2001;Ool2001;Ool001Yoo`03001oogoo03ioo`03001oogoo01Yo o`Il00Ioo`03001oogoo015oo`H000eoo`03001oogoo01ioo`8004]oo`8004eoo`006Woo00<007oo Ool0?Goo00<007ooOol06Woo00<007`0O00017`01Goo00<007ooOol04Woo1P0037oo00<007ooOol0 7Goo0P00Bgoo0P00Cgoo000JOol00`00Oomoo`0mOol00`00Oomoo`0GOol30002Ool4O006Ool00`00 Oomoo`0BOol5000=Ool00`00Oomoo`0KOol2001;Ool2001AOol001Yoo`03001oogoo03aoo`03001o ogoo01Ioo`8000ioo`03001oogoo019oo`03001oogoo00moo`03001oogoo01Yoo`8004]oo`8005=o o`006Woo00<007ooOol0>goo00<007ooOol05Goo0P0047oo00<007ooOol04Goo00<007ooOol047oo 00<007ooOol067oo0P00BWoo0`00EGoo000JOol00`00Oomoo`0kOol00`00Oomoo`0BOol3000AOol0 0`00Oomoo`0AOol00`00Oomoo`0@Ool00`00Oomoo`0GOol2001:Ool2001HOol001Yoo`03001oogoo 03Yoo`03001oogoo015oo`8001Aoo`03001oogoo011oo`03001oogoo015oo`03001oogoo01Eoo`80 04Yoo`8005Yoo`006Woo00<007ooOol0>Goo00<007ooOol047oo0P005Goo00<007ooOol047oo00<0 07ooOol04Goo00<007ooOol057oo0P00BWoo0P00G7oo000JOol00`00Oomoo`0iOol00`00Oomoo`0? Ool00`00Oomoo`0EOol00`00Oomoo`0?Ool00`00Oomoo`0BOol00`00Oomoo`0BOol2001:Ool2001N Ool001Yoo`03001oogoo03Qoo`03001oogoo00ioo`8001Moo`03001oogoo00moo`03001oogoo019o o`03001oogoo015oo`8004Yoo`80061oo`006Woo00<007ooOol0>7oo00<007ooOol03Goo00<007oo Ool05goo00<007ooOol03Woo00<007ooOol04goo00<007ooOol03goo0P00BWoo0P00HWoo000JOol0 0`00Oomoo`0gOol00`00Oomoo`0Ool00`00Oomoo`0COol00`00Oomo o`0>Ool2001:Ool2001TOol001Yoo`03001oogoo03Moo`03001oogoo00Uoo`<001]oo`03001oogoo 00eoo`03001oogoo01Aoo`03001oogoo00aoo`8004Yoo`8006Ioo`006Woo00<007ooOol0=goo00<0 07ooOol01goo0P007Goo00<007ooOol03Goo00<007ooOol057oo00<007ooOol02goo0P00BWoo0P00 J7oo000JOol00`00Oomoo`0fOol00`00Oomoo`06Ool2000OOol00`00Oomoo`0Ool2000;Ool6000jOol2002>Ool000]oo`05001oogoo Ool00003Ool00`00Oomoo`04Ool00`00Oomoo`0IOol2000BOol00`00Oomoo`0WOol00`00Oomoo`02 Ool00`00Oomoo`0=Ool2000=Ool6000hOol2002@Ool000]oo`05001oogooOol00003Ool00`00Oomo o`04Ool00`00Oomoo`0GOol2000COol00`00Oomoo`0WOol00`00Oomoo`02Ool00`00Oomoo`09oo`006Woo00<007ooOol05Goo0`0067oo 00<007ooOol03Goo00<007ooOol07goo0P000goo00<007ooOol0hGoo000JOol00`00Oomoo`0COol2 00000goo001oo`0GOol00`00Oomoo`0>Ool00`00Oomoo`0MOol20004Ool00`00Oomoo`3ROol001Yo o`03001oogoo015oo`8000=oo`03001oogoo01Eoo`03001oogoo00ioo`03001oogoo01aoo`8000Io o`03001oogoo0>9oo`006Woo0P0047oo0P001Goo00<007ooOol057oo00<007ooOol03goo00<007oo Ool06Woo0P001goo00<007ooOol0hgoo000JOol00`00Oomoo`0=oo`00 6Woo00<007ooOol027oo0P002Woo00<007ooOol04goo00<007ooOol047oo00<007ooOol05Woo0P00 37oo00<007ooOol0i7oo000JOol00`00Oomoo`06Ool2000Ool00`00Oomoo`3TOol001Yoo`03001oogoo00Aoo`8000eoo`03001o ogoo019oo`03001oogoo015oo`03001oogoo01=oo`8000moo`03001oogoo0>Eoo`006Woo00<007oo Ool00Woo0P003Woo00<007ooOol04Woo00<007ooOol04Woo00<007ooOol04Goo0P004Goo00<007oo Ool0iGoo000JOol00`00Oomoo`02000@Ool00`00Oomoo`0AOol00`00Oomoo`0BOol00`00Oomoo`0@ Ool2000BOol00`00Oomoo`3VOol001Yoo`<0015oo`03001oogoo015oo`03001oogoo01=oo`03001o ogoo00ioo`8001Aoo`03001oogoo0>Ioo`006Woo00<007ooOol04Goo00<007ooOol047oo00<007oo Ool04goo00<007ooOol03Goo0P005Goo00<007ooOol0igoo000JOol00`00Oomoo`0@Ool00`00Oomo o`0@Ool00`00Oomoo`0DOol00`00Oomoo`0;Ool2000GOol00`00Oomoo`3WOol001Yoo`03001oogoo 011oo`03001oogoo00moo`03001oogoo01Aoo`03001oogoo00Uoo`<001Qoo`03001oogoo0>Qoo`00 6Woo00<007ooOol03goo00<007ooOol03goo00<007ooOol05Goo00<007ooOol01goo0P006goo00<0 07ooOol0j7oo0009Ool30004Ool30007Ool00`00Oomoo`0?Ool00`00Oomoo`0>Ool00`00Oomoo`0E Ool00`00Oomoo`06Ool2000LOol00`00Oomoo`3YOol000Yoo`03001oogoo009oo`05001oogooOol0 0006Ool00`00Oomoo`0>Ool00`00Oomoo`0>Ool00`00Oomoo`0FOol00`00Oomoo`04Ool2000NOol0 0`00Oomoo`3YOol000Moo`D000=oo`05001oogooOol00006Ool00`00Oomoo`0>Ool00`00Oomoo`0= Ool00`00Oomoo`0FOol00`00Oomoo`03Ool2000OOol00`00Oomoo`3ZOol000Moo`04001oogoo0004 Ool01@00Oomoogoo00001Woo0`003Goo00<007ooOol03Goo00<007ooOol05goo00@007ooOomoo`80 025oo`03001oogoo0>Yoo`0027oo00<007oo000017oo00D007ooOomoo`0000Ioo`03001oogoo00eo o`03001oogoo00aoo`03001oogoo01Moo`03001oogoo0080029oo`03001oogoo0>]oo`0027oo00<0 07oo000017oo00D007ooOomoo`0000Ioo`03001oogoo00aoo`03001oogoo00aoo`03001oogoo01Qo o`03001oo`0002Aoo`03001oogoo0>]oo`002Goo0P0017oo00D007ooOomoo`0000Ioo`03001oogoo 00aoo`03001oogoo00]oo`03001oogoo01Qoo`<002Aoo`03001oogoo0>aoo`002Woo00<007ooOol0 0goo0`001goo00<007ooOol037oo00<007ooOol02Woo00<007ooOol067oo0P009Woo00<007ooOol0 k7oo000JOol00`00Oomoo`0;Ool00`00Oomoo`09Ool2000IOol3000VOol00`00Oomoo`3]Ool001Yo o`03001oogoo00]oo`03001oogoo00Qoo`03001oogoo01Moo`80009oo`03001oogoo02Aoo`03001o ogoo0>eoo`006Woo00<007ooOol02Woo00<007ooOol027oo00<007ooOol05Woo0P000goo00<007oo Ool097oo00<007ooOol0kWoo000JOol00`00Oomoo`09Ool00`00Oomoo`08Ool00`00Oomoo`0DOol3 0005Ool00`00Oomoo`0TOol00`00Oomoo`3^Ool001Yoo`03001oogoo00Uoo`03001oogoo00Moo`03 001oogoo01=oo`8000Moo`03001oogoo02Aoo`03001oogoo0>moo`006Woo00<007ooOol027oo00<0 07ooOol01goo00<007ooOol04Woo0P002Goo00<007ooOol097oo00<007ooOol0kgoo000JOol00`00 Oomoo`07Ool00`00Oomoo`07Ool00`00Oomoo`0AOol2000:Ool00`00Oomoo`0TOol00`00Oomoo`3` Ool001Yoo`03001oogoo00Moo`03001oogoo00Moo`03001oogoo00moo`8000aoo`03001oogoo02=o o`03001oogoo0?5oo`006Woo00<007ooOol01Woo00<007ooOol01goo00<007ooOol03Woo0P003Goo 00<007ooOol097oo00<007ooOol0lGoo000JOol00`00Oomoo`06Ool00`00Oomoo`06Ool00`00Oomo o`0=Ool2000?Ool00`00Oomoo`0SOol00`00Oomoo`3bOol001Yoo`03001oogoo00Eoo`03001oogoo 00Ioo`03001oogoo00aoo`80011oo`03001oogoo02Aoo`03001oogoo0?9oo`006Woo0P001Woo00<0 07ooOol01Goo00<007ooOol02goo0P004Woo00<007ooOol08goo00<007ooOol0lgoo000JOol00`00 Oomoo`05Ool00`00Oomoo`04Ool00`00Oomoo`0:Ool2000COol00`00Oomoo`0TOol00`00Oomoo`3c Ool001Yoo`03001oogoo00Aoo`03001oogoo00Aoo`03001oogoo00Uoo`8001Eoo`03001oogoo02=o o`03001oogoo0?Aoo`006Woo00<007ooOol017oo00<007ooOol00goo00<007ooOol027oo0P005Woo 00<007ooOol097oo00<007ooOol0m7oo000JOol00`00Oomoo`03Ool00`00Oomoo`03Ool00`00Oomo o`07Ool2000HOol00`00Oomoo`0SOol00`00Oomoo`3eOol001Yoo`03001oogoo00=oo`03001oogoo 009oo`03001oogoo00Ioo`8001Yoo`03001oogoo02=oo`03001oogoo0?Eoo`006Woo00<007ooOol0 0Woo00<007ooOol00Woo00<007ooOol01Goo0P006goo00<007ooOol08goo00<007ooOol0mWoo000J Ool01@00Oomoogoo000017oo00<007ooOol017oo0P007Goo00<007ooOol08goo00<007ooOol0mWoo 000JOol01@00Oomoogoo00000goo00<007ooOol00goo0P007Woo00<007ooOol08goo00<007ooOol0 mgoo000JOol01000Oomoo`000goo00<007ooOol00Woo0P0087oo00<007ooOol08goo00<007ooOol0 mgoo000JOol01000Oomoo`000Woo00@007ooOomoo`80025oo`03001oogoo02=oo`03001oogoo0?Qo o`006Woo00<007oo00000Woo00<007ooOol00P008goo00<007ooOol08goo00<007ooOol0n7oo000J Ool01P00Ool007oo001oo`8002Aoo`03001oogoo02=oo`03001oogoo0?Uoo`006Woo0P0000Aoo`00 Ool002Eoo`8002Eoo`03001oogoo0?Uoo`006Woo1@009Woo00<007ooOol08goo00<007ooOol0nWoo 000JOol3000WOol2000UOol00`00Oomoo`3jOol001Yoo`8002Qoo`03001oogoo02=oo`03001oogoo 0?]oo`006Woo00<007ooOol09Woo0P009Goo00<007ooOol0ngoo000JOol00`00Oomoo`0VOol00`00 Oomoo`0SOol00`00Oomoo`3lOol001Yoo`03001oogoo02Eoo`8002Eoo`03001oogoo0?aoo`006Woo 00<007ooOol09Goo00<007ooOol08goo00<007ooOol0oGoo000JOol00`00Oomoo`0TOol2000UOol0 0`00Oomoo`3mOol001Yoo`03001oogoo02Aoo`03001oogoo02=oo`03001oogoo0?ioo`006Woo00<0 07ooOol08goo0P009Goo00<007ooOol0oWoo000JOol00`00Oomoo`0SOol00`00Oomoo`0TOol00`00 Oomoo`3nOol001Yoo`03001oogoo02=oo`03001oogoo02=oo`03001oogoo0?moo`006Woo00<007oo Ool08Woo00<007ooOol097oo00<007ooOol0ogoo000JOol00`00Oomoo`0ROol00`00Oomoo`0SOol0 0`00Oomoo`3oOol1Ool001Yoo`03001oogoo025oo`03001oogoo02Aoo`03001oogoo0?moo`5oo`00 6Woo00<007ooOol08Goo00<007ooOol08goo00<007ooOol0ogoo0Woo000JOol00`00Oomoo`0POol0 0`00Oomoo`0TOol00`00Oomoo`3oOol2Ool001Yoo`03001oogoo021oo`03001oogoo02=oo`03001o ogoo0?moo`=oo`006Woo0P0087oo00<007ooOol097oo00<007ooOol0ogoo0goo000JOol00`00Oomo o`0OOol00`00Oomoo`0SOol00`00Oomoo`3oOol4Ool001Yoo`03001oogoo01ioo`03001oogoo02Ao o`03001oogoo0?moo`Aoo`006Woo00<007ooOol07Woo00<007ooOol08goo00<007ooOol0ogoo1Goo 000JOol00`00Oomoo`0MOol00`00Oomoo`0SOol00`00Oomoo`3oOol6Ool001Yoo`03001oogoo01eo o`03001oogoo02=oo`03001oogoo0?moo`Ioo`006Woo00<007ooOol077oo00<007ooOol08goo00<0 07ooOol0ogoo1goo000JOol00`00Oomoo`0LOol00`00Oomoo`0SOol00`00Oomoo`3oOol7Ool001Yo o`03001oogoo01]oo`03001oogoo02=oo`03001oogoo0?moo`Qoo`006Woo00<007ooOol06goo00<0 07ooOol08goo00<007ooOol0ogoo27oo000JOol00`00Oomoo`0JOol00`00Oomoo`0SOol00`00Oomo o`3oOol9Ool001Yoo`03001oogoo01Yoo`03001oogoo02=oo`03001oogoo0?moo`Uoo`006Woo00<0 07ooOol06Goo00<007ooOol08goo00<007ooOol0ogoo2Woo0008Ool30005Ool30007Ool00`00Oomo o`0IOol00`00Oomoo`0SOol00`00Oomoo`3oOol:Ool000Moo`05001oogooOol00003Ool01@00Oomo ogoo00001Woo00<007ooOol067oo00<007ooOol08goo00<007ooOol0ogoo2goo0007Ool01@00Oomo ogoo00000goo00D007ooOomoo`0000Ioo`03001oogoo01Qoo`03001oogoo02=oo`03001oogoo0?mo o`]oo`001goo00D007ooOomoo`0000=oo`05001oogooOol00006Ool3000GOol00`00Oomoo`0TOol0 0`00Oomoo`3oOol;Ool000Moo`@000Aoo`05001oogooOol00006Ool00`00Oomoo`0GOol00`00Oomo o`0SOol00`00Oomoo`3oOolOol001Yoo`03001oogoo01Aoo`03001oogoo02Aoo`03001oogoo0?moo`ioo`006Woo00<0 07ooOol057oo00<007ooOol08goo00<007ooOol0ogoo3goo000JOol00`00Oomoo`0COol00`00Oomo o`0TOol00`00Oomoo`3oOol?Ool001Yoo`03001oogoo01=oo`03001oogoo02=oo`03001oogoo0?mo oa1oo`006Woo00<007ooOol04Woo00<007ooOol097oo00<007ooOol0ogoo47oo000JOol00`00Oomo o`0BOol00`00Oomoo`0SOol00`00Oomoo`3oOolAOol001Yoo`03001oogoo015oo`03001oogoo02Ao o`03001oogoo0?mooa5oo`006Woo00<007ooOol04Goo00<007ooOol08goo00<007ooOol0ogoo4Woo 000JOol00`00Oomoo`0@Ool00`00Oomoo`0SOol00`00Oomoo`3oOolCOol001Yoo`80011oo`8002Eo o`03001oogoo0?mooa=oo`006Woo00<007ooOol03goo00<007ooOol08goo00<007ooOol0ogoo57oo 000JOol00`00Oomoo`0>Ool2000UOol00`00Oomoo`3oOolDOol001Yoo`03001oogoo00ioo`03001o ogoo02=oo`03001oogoo0?mooaEoo`006Woo00<007ooOol03Goo0P009Goo00<007ooOol0ogoo5Goo 000JOol00`00Oomoo`0=Ool00`00Oomoo`0SOol00`00Oomoo`3oOolFOol001Yoo`03001oogoo00ao o`8002Eoo`03001oogoo0?mooaIoo`006Woo00<007ooOol037oo00<007ooOol08goo00<007ooOol0 ogoo5goo000JOol00`00Oomoo`0;Ool2000UOol00`00Oomoo`3oOolGOol001Yoo`03001oogoo00]o o`03001oogoo02=oo`03001oogoo0?mooaQoo`006Woo00<007ooOol02Woo0P009Goo00<007ooOol0 ogoo67oo000JOol00`00Oomoo`0:Ool00`00Oomoo`0SOol00`00Oomoo`3oOolIOol001Yoo`03001o ogoo00Uoo`8002Aoo`03001oogoo0?mooaYoo`006Woo00<007ooOol02Goo00<007ooOol08goo00<0 07ooOol0ogoo6Woo000JOol00`00Oomoo`08Ool2000TOol00`00Oomoo`3oOolKOol001Yoo`03001o ogoo00Qoo`03001oogoo02=oo`03001oogoo0?mooa]oo`006Woo0P0027oo0P0097oo00<007ooOol0 ogoo77oo000JOol00`00Oomoo`07Ool00`00Oomoo`0SOol00`00Oomoo`3oOolLOol001Yoo`03001o ogoo00Ioo`8002Aoo`03001oogoo0?mooaeoo`006Woo00<007ooOol01Woo00<007ooOol08goo00<0 07ooOol0ogoo7Goo000JOol00`00Oomoo`05Ool2000TOol00`00Oomoo`3oOolNOol001Yoo`03001o ogoo00Aoo`8002Eoo`03001oogoo0?mooaioo`006Woo00<007ooOol017oo00<007ooOol08goo00<0 07ooOol0ogoo7goo000JOol00`00Oomoo`03Ool2000UOol00`00Oomoo`3oOolOOol001Yoo`03001o ogoo00=oo`03001oogoo02=oo`03001oogoo0?moob1oo`006Woo00<007ooOol00Woo0P009Goo00<0 07ooOol0ogoo87oo000JOol00`00Oomoo`02Ool00`00Oomoo`0SOol00`00Oomoo`3oOolQOol001Yo o`04001oogooOol2000UOol00`00Oomoo`3oOolQOol001Yoo`05001oogooOol0000UOol00`00Oomo o`3oOolROol001Yoo`03001oogoo008002Eoo`03001oogoo0?moob9oo`006Woo00@007ooOol002Eo o`03001oogoo0?moob=oo`006Woo00@007oo000002Eoo`03001oogoo0?moob=oo`006Woo0`009Goo 00<007ooOol0ogoo97oo000JOol3000UOol00`00Oomoo`3oOolTOol001Yoo`8002Eoo`03001oogoo 0?moobEoo`006Woo0P009Goo00<007ooOol0ogoo9Goo000JOol00`00Oomoo`0SOol00`00Oomoo`3o OolVOol001Yoo`03001oogoo02=oo`03001oogoo0?moobIoo`006Woo00<007ooOol08Woo00<007oo Ool0ogoo9goo000JOol00`00Oomoo`0ROol00`00Oomoo`3oOolWOol001Yoo`03001oogoo029oo`03 001oogoo0?moobMoo`006Woo00<007ooOol08Goo00<007ooOol0ogoo:7oo000JOol00`00Oomoo`0Q Ool00`00Oomoo`3oOolXOol001Yoo`03001oogoo021oo`03001oogoo0?moobUoo`006Woo00<007oo Ool087oo00<007ooOol0ogoo:Goo000JOol00`00Oomoo`0OOol00`00Oomoo`3oOolZOol000Qoo`<0 00Eoo`<000Moo`03001oogoo01moo`03001oogoo0?moobYoo`001goo00D007ooOomoo`0000=oo`05 001oogooOol00006Ool00`00Oomoo`0NOol00`00Oomoo`3oOol[Ool000Moo`05001oogooOol00003 Ool01@00Oomoogoo00001Woo0`007Woo00<007ooOol0ogoo:goo0007Ool01@00Oomoogoo00000goo 00D007ooOomoo`0000Ioo`03001oogoo01eoo`03001oogoo0?moobaoo`0027oo0`0017oo00D007oo Oomoo`0000Ioo`03001oogoo01eoo`03001oogoo0?moobaoo`001goo00D007ooOomoo`0000=oo`05 001oogooOol00006Ool00`00Oomoo`0LOol00`00Oomoo`3oOol]Ool000Moo`05001oogooOol00003 Ool01@00Oomoogoo00001Woo00<007ooOol077oo00<007ooOol0ogoo;Goo0008Ool30005Ool30007 Ool00`00Oomoo`0KOol00`00Oomoo`3oOol^Ool001Yoo`03001oogoo01]oo`03001oogoo0?moobio o`006Woo00<007ooOol06Woo00<007ooOol0ogoo;goo000JOol00`00Oomoo`0JOol00`00Oomoo`3o Ool_Ool001Yoo`03001oogoo01Uoo`03001oogoo0?mooc1oo`006Woo00<007ooOol06Goo00<007oo Ool0ogoo<7oo000JOol00`00Oomoo`0HOol00`00Oomoo`3oOolaOol001Yoo`03001oogoo01Qoo`03 001oogoo0?mooc5oo`006Woo00<007ooOol05goo00<007ooOol0ogoo7oo000JOol00`00Oomoo`0@Ool00`00Oomoo`3oOoliOol001Yoo`03001oogoo011oo`03001oogoo 0?moocUoo`006Woo00<007ooOol03goo00<007ooOol0ogoo>Woo000JOol00`00Oomoo`0?Ool00`00 Oomoo`3oOoljOol001Yoo`03001oogoo00ioo`03001oogoo0?mooc]oo`006Woo00<007ooOol03Woo 00<007ooOol0ogoo>goo000JOol2000?Ool00`00Oomoo`3oOolkOol001Yoo`03001oogoo00eoo`03 001oogoo0?moocaoo`006Woo00<007ooOol03Goo00<007ooOol0ogoo?7oo000JOol00`00Oomoo`0< Ool00`00Oomoo`3oOolmOol001Yoo`03001oogoo00aoo`03001oogoo0?mooceoo`006Woo00<007oo Ool02goo00<007ooOol0ogoo?Woo000JOol00`00Oomoo`0;Ool00`00Oomoo`3oOolnOol001Yoo`03 001oogoo00Yoo`03001oogoo0?moocmoo`006Woo00<007ooOol02Woo00<007ooOol0ogoo?goo000J Ool00`00Oomoo`09Ool00`00Oomoo`3oOom0Ool001Yoo`03001oogoo00Uoo`03001oogoo0?mood1o o`006Woo00<007ooOol027oo00<007ooOol0ogoo@Goo000JOol00`00Oomoo`08Ool00`00Oomoo`3o Oom1Ool001Yoo`03001oogoo00Moo`03001oogoo0?mood9oo`006Woo00<007ooOol01goo00<007oo Ool0ogoo@Woo000JOol00`00Oomoo`06Ool00`00Oomoo`3oOom3Ool001Yoo`8000Moo`03001oogoo 0?mood=oo`006Woo00<007ooOol01Goo00<007ooOol0ogooA7oo000JOol00`00Oomoo`05Ool00`00 Oomoo`3oOom4Ool001Yoo`03001oogoo00Aoo`03001oogoo0?moodEoo`006Woo00<007ooOol017oo 00<007ooOol0ogooAGoo000JOol00`00Oomoo`03Ool00`00Oomoo`3oOom6Ool001Yoo`03001oogoo 00=oo`03001oogoo0?moodIoo`006Woo00<007ooOol00Woo00<007ooOol0ogooAgoo000JOol00`00 Oomoo`02Ool00`00Oomoo`3oOom7Ool001Yoo`05001oogooOol0003oOom:Ool001Yoo`04001oogoo 003oOom;Ool001Yoo`04001oogoo003oOom;Ool001Yoo`03001oo`000?moodaoo`006Woo00<007oo 0000ogooC7oo00000goo000000030003Ool30005Ool30006Ool2003oOom=Ool000=oo`03001oogoo 009oo`05001oogooOol00003Ool01@00Oomoogoo00001Goo0P00ogooCGoo0003Ool00`00Oomoo`02 Ool01@00Oomoogoo00000goo00D007ooOomoo`0000Eoo`<00?moodaoo`000goo00<007ooOol00Woo 00D007ooOomoo`0000=oo`05001oogooOol00005Ool00`00Oomoo`3oOom"], ImageRangeCache->{{{0, 359}, {359, 0}} -> {-8.32157, -7.07154, 0.389367, 0.389367}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["\<\ (The violations are illustrated in red on the screen but they come \ through as grey on the monochrome printed page.)\ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["APPENDIX", "Section"], Cell[TextData[{ "In the text we computed the transitive closure of the direct revealed \ preference relation by computing the matrix power of the direct revealed \ preference matrix. We did this using the internal ", StyleBox["Mathematica", FontSlant->"Italic"], " function ", StyleBox["MatrixPower", "Input", FontWeight->"Plain"], StyleBox[". Raising an ", FontWeight->"Plain"], StyleBox["n", FontWeight->"Plain", FontSlant->"Italic"], StyleBox[" \[Times] ", FontWeight->"Plain"], StyleBox["n ", FontWeight->"Plain", FontSlant->"Italic"], "matrix to the power ", StyleBox["n", FontSlant->"Italic"], " would require ", Cell[BoxData[ \(TraditionalForm\`n\^4\)]], " operations if done in the most\nstraightforward way. Another, seemingly \ more efficient, way to compute the\ntransitive closure is given by Warshall's \ algorithm [Warshall 1962]." }], "Text"], Cell[BoxData[ \(Warshall[mat_]\ := \ Module[{i, j, k, n, m}, \nm = mat; \nn = Length[m]; \n For[k = 1, k <= n, \(k++\), \n For[i = 1, i < \(--n\), \(i++\), \n For[j = 1, j <= n, \(j++\), If[m[\([i, k]\)]\ = \ 1\ && \ m[\([k, j]\)] == 1, \n m[\([i, j]\)] = 1]]]]; m]\)], "Input"], Cell[TextData[{ "Note that Warshall's algorithm involves only ", Cell[BoxData[ \(TraditionalForm\`n\^3\)]], " operations. Despite this, Warshall's algorithm is much slower than using \ the internal", StyleBox[" MatrixPower", "Input", FontWeight->"Plain"], " function.\nFor example, here is a random 10 ", StyleBox["\[Times]", FontWeight->"Plain"], " 10 matrix:" }], "Text"], Cell[BoxData[ \(\(\(m\ = Table[Random[Integer, {0, 1}], {i, 1, 10}, {j, 1, 10}]; \)\n \)\)], "Input"], Cell["\<\ Here is how long Warshall's algorithm takes to compute the \ transitive closure.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Timing[Warshall[m]]\)[\([1]\)]\n\)\)], "Input"], Cell[BoxData[ \(0.0333333333328482694`\ Second\)], "Output"] }, Open ]], Cell["Here is how long MatrixPower takes:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Timing[tClosure[m]]\)[\([1]\)]\n\)\)], "Input"], Cell[BoxData[ \(0.0166666666664241347`\ Second\)], "Output"] }, Open ]], Cell["\<\ This illustrates an important point about Mathematica programming: \ always use the built-in functions when possible.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["SUMMARY", "Section"], Cell["\<\ Calculating choice efficiency for consumption and production data \ is very easy using Mathematica. In addition the data can be graphed, \ manipulated, and analyzed in a variety of other ways.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["ACKNOWLEDGEMENT", "Section"], Cell[TextData[{ "This article was originally printed in ", StyleBox[ "Computational Economics and Finance: Modeling and Analysis with \ Mathematica", FontSlant->"Italic"], " TELOS/Springer-Verlag,1996, and is reprinted with permission of the \ author and publisher. " }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["REFERENCES", "Section"], Cell[TextData[{ "Afriat, S. 1967. \"The Construction of a Utility Function From Expenditure \ Data.\" ", StyleBox["International Economic Review,", FontSlant->"Italic"], " ", StyleBox["7", FontWeight->"Bold"], ", 67-77.\n\nAndreoni, J. and Miller, J. H. 1994. \"Giving According to \ GARP: An Experimental Study of Rationality and Altruism.\" CMU Working Paper.\ \n\nBattalio, R. C. et al. 1973. \"A Test of Consumer Demand theory Using \ Observations of Individual Consumer Purchases.\" ", StyleBox["Western Economic Journal", FontSlant->"Italic"], ", ", StyleBox["11", FontWeight->"Bold"], ", 411-428.\n\nBrooks, J. 1993. \"Measuring Cost Efficiency in VA Hospital \ Pharmacies: An Applied Critique of the Methods.\" Ph.D. dissertation, \ University of Michigan.\n\nCox, J. C. 1994. \"On Testing the Utility \ Hypothesis.\" Technical report, University of Arizona.\n\nHoutman, M. and \ Maks, J. A. 1985. \"Determining all Maximial Data Subsets Consistent With \ Revealed Preference.\" ", StyleBox["Kwantitatieve Methoden", FontSlant->"Italic"], ", ", StyleBox["19", FontWeight->"Bold"], ", 89-104.\n\nWarshall, S. 1962. \"A Theorem on Boolean Matrices,\" ", StyleBox["Journal of the American Association of Computing Machiniery", FontSlant->"Italic"], ", 9, 11-12.\n\nVarian, H. 1993. ", StyleBox["Microeconomic Analysis", FontSlant->"Italic"], ", 3rd ed. New York, W. W. Norton & Co." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["ABOUT THE AUTHOR", "Section", FontFamily->"Times"], Cell[TextData[{ "Associate Editor Hal R. Varian is the Dean of the School of Information \ Management and Systems at the University of California at Berkeley. He is \ also a Professor in the Haas School of Business, a Professor in the \ Department of Economics, and holds the Class of 1944 Professorship. \n\nHe \ received his S.B. degree from MIT in 1969 and his MA (mathematics) and Ph.D. \ (economics) from UC Berkeley in 1973. He has taught at MIT, Stanford, Oxford, \ Michigan and other universities around the world. \n\nAmong his publications \ are: ", StyleBox["Economic and Financial Modeling with Mathematica", FontSlant->"Italic"], " \n(editor) A collection of articles showing how to use the computer \ language ", StyleBox["Mathematica", FontSlant->"Italic"], " for economic and financial applications. TELOS/Springer-Verlag, 1992. \n", StyleBox[ "Computational Economics and Finance: Modeling and Analysis with \ Mathematica", FontSlant->"Italic"], " \n(editor) A collection of articles showing how to use the computer \ language Mathematica for economic and financial applications. \ TELOS/Springer-Verlag,1996. \n\nHal R. Varian\nUniversity of California, \ Berkeley\nhal@sims.berkeley.edu" }], "Text", FontFamily->"Times"] }, Open ]], Cell[CellGroupData[{ Cell["Electronic Subscriptions", "Section", FontFamily->"Times"], Cell[TextData[{ StyleBox[ "\[CapitalIHat]ncluded in the distribution for each electronic subscription \ is the file ", FontSlant->"Plain"], StyleBox["xxxnb", FontFamily->"Courier", FontSlant->"Plain"], StyleBox[", containing ", FontSlant->"Plain"], StyleBox["Mathematica", FontSlant->"Italic"], StyleBox[" code for the material described in this article.", FontSlant->"Plain"] }], "Text", FontFamily->"Times", FontSlant->"Italic"] }, Open ]] }, Open ]] }, FrontEndVersion->"NeXT 3.0", ScreenRectangle->{{0, 1053}, {0, 832}}, WindowToolbars->"EditBar", WindowSize->{599, 436}, WindowMargins->{{Automatic, 3}, {Automatic, 2}}, Magnification->1 ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 57, 0, 136, "Title"], Cell[1791, 53, 197, 6, 79, "Subtitle"], Cell[CellGroupData[{ Cell[2013, 63, 35, 0, 52, "Section"], Cell[2051, 65, 1061, 18, 206, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3149, 88, 36, 0, 52, "Section"], Cell[3188, 90, 486, 17, 46, "Text"], Cell[3677, 109, 339, 17, 67, "Text"], Cell[4019, 128, 1516, 53, 190, "Text"], Cell[5538, 183, 375, 14, 43, "Text"], Cell[5916, 199, 422, 15, 62, "Text"], Cell[6341, 216, 620, 23, 74, "Text"], Cell[6964, 241, 143, 3, 41, "Input"], Cell[7110, 246, 193, 8, 28, "Text"], Cell[7306, 256, 385, 7, 87, "Input"], Cell[7694, 265, 165, 4, 44, "Text"], Cell[7862, 271, 102, 2, 26, "Input"], Cell[CellGroupData[{ Cell[7989, 277, 63, 0, 39, "Subsubsection"], Cell[CellGroupData[{ Cell[8077, 281, 44, 1, 26, "Input"], Cell[8124, 284, 41, 1, 26, "Output"] }, Open ]], Cell[8180, 288, 48, 0, 29, "Text"], Cell[CellGroupData[{ Cell[8253, 292, 73, 1, 26, "Input"], Cell[8329, 295, 1812, 25, 224, "Output"] }, Open ]], Cell[10156, 323, 493, 10, 135, "Text"], Cell[10652, 335, 131, 3, 41, "Input"], Cell[10786, 340, 131, 3, 41, "Input"], Cell[CellGroupData[{ Cell[10942, 347, 85, 1, 26, "Input"], Cell[11030, 350, 1823, 24, 239, "Output"] }, Open ]], Cell[12868, 377, 130, 4, 44, "Text"], Cell[CellGroupData[{ Cell[13023, 385, 72, 1, 26, "Input"], Cell[13098, 388, 15360, 459, 186, 4897, 325, "GraphicsData", "PostScript", "Graphics"], Cell[28461, 849, 130, 3, 26, "Output"] }, Open ]], Cell[28606, 855, 169, 5, 59, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[28824, 866, 39, 0, 49, "Section"], Cell[28866, 868, 196, 5, 62, "Text"], Cell[29065, 875, 290, 14, 67, "Text"], Cell[29358, 891, 3269, 118, 206, "Text"], Cell[CellGroupData[{ Cell[32652, 1013, 85, 1, 40, "Subsubsection"], Cell[32740, 1016, 551, 21, 62, "Text"], Cell[33294, 1039, 511, 9, 87, "Input"], Cell[33808, 1050, 773, 27, 90, "Text"], Cell[34584, 1079, 86, 1, 26, "Input"], Cell[34673, 1082, 93, 3, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[34803, 1090, 32, 0, 39, "Subsubsection"], Cell[34838, 1092, 179, 4, 44, "Text"], Cell[35020, 1098, 158, 2, 41, "Input"], Cell[CellGroupData[{ Cell[35203, 1104, 57, 1, 26, "Input"], Cell[35263, 1107, 67, 1, 26, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[35367, 1113, 44, 1, 26, "Input"], Cell[35414, 1116, 67, 1, 26, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[35530, 1123, 38, 0, 39, "Subsubsection"], Cell[35571, 1125, 489, 11, 90, "Text"], Cell[36063, 1138, 173, 4, 56, "Input"], Cell[36239, 1144, 280, 8, 44, "Text"], Cell[36522, 1154, 291, 6, 102, "Input"], Cell[36816, 1162, 64, 0, 29, "Text"], Cell[36883, 1164, 112, 2, 41, "Input"], Cell[CellGroupData[{ Cell[37020, 1170, 55, 1, 26, "Input"], Cell[37078, 1173, 46, 1, 26, "Output"] }, Open ]], Cell[37139, 1177, 88, 3, 29, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[37276, 1186, 36, 0, 49, "Section"], Cell[37315, 1188, 873, 15, 196, "Text"], Cell[38191, 1205, 368, 7, 87, "Input"], Cell[38562, 1214, 89, 3, 29, "Text"], Cell[CellGroupData[{ Cell[38676, 1221, 55, 1, 26, "Input"], Cell[38734, 1224, 130, 2, 26, "Output"] }, Open ]], Cell[38879, 1229, 283, 5, 74, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[39199, 1239, 44, 0, 49, "Section"], Cell[39246, 1241, 2100, 62, 212, "Text"], Cell[41349, 1305, 323, 6, 87, "Input"], Cell[41675, 1313, 1821, 63, 106, "Text"], Cell[43499, 1378, 341, 7, 87, "Input"], Cell[43843, 1387, 505, 17, 59, "Text"], Cell[44351, 1406, 209, 4, 56, "Input"], Cell[44563, 1412, 67, 0, 29, "Text"], Cell[44633, 1414, 114, 2, 41, "Input"], Cell[44750, 1418, 97, 3, 29, "Text"], Cell[44850, 1423, 112, 2, 41, "Input"], Cell[CellGroupData[{ Cell[44987, 1429, 111, 2, 41, "Input"], Cell[45101, 1433, 175, 6, 40, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[45313, 1444, 111, 2, 41, "Input"], Cell[45427, 1448, 173, 6, 40, "Output"] }, Open ]], Cell[45615, 1457, 379, 11, 59, "Text"], Cell[45997, 1470, 431, 7, 117, "Input"], Cell[CellGroupData[{ Cell[46453, 1481, 63, 1, 26, "Input"], Cell[46519, 1484, 38, 1, 22, "Print"], Cell[46560, 1487, 39, 1, 22, "Print"], Cell[46602, 1490, 40, 1, 22, "Print"], Cell[46645, 1493, 41, 1, 22, "Print"], Cell[46689, 1496, 42, 1, 22, "Print"], Cell[46734, 1499, 43, 1, 22, "Print"], Cell[46780, 1502, 44, 1, 22, "Print"], Cell[46827, 1505, 45, 1, 22, "Print"], Cell[46875, 1508, 46, 1, 22, "Print"], Cell[46924, 1511, 47, 1, 22, "Print"] }, Open ]], Cell[46986, 1515, 137, 4, 59, "Text"], Cell[47126, 1521, 368, 7, 87, "Input"], Cell[CellGroupData[{ Cell[47519, 1532, 63, 1, 26, "Input"], Cell[47585, 1535, 38, 1, 22, "Print"], Cell[47626, 1538, 39, 1, 22, "Print"], Cell[47668, 1541, 40, 1, 22, "Print"], Cell[47711, 1544, 41, 1, 22, "Print"], Cell[47755, 1547, 42, 1, 22, "Print"], Cell[47800, 1550, 43, 1, 22, "Print"], Cell[47846, 1553, 44, 1, 22, "Print"], Cell[47893, 1556, 45, 1, 22, "Print"], Cell[47941, 1559, 46, 1, 22, "Print"], Cell[47990, 1562, 47, 1, 22, "Print"] }, Open ]], Cell[48052, 1566, 90, 3, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[48179, 1574, 38, 0, 49, "Section"], Cell[48220, 1576, 139, 3, 44, "Text"], Cell[48362, 1581, 264, 4, 72, "Input"], Cell[48629, 1587, 182, 3, 72, "Input"], Cell[48814, 1592, 241, 4, 72, "Input"], Cell[49058, 1598, 216, 4, 56, "Input"], Cell[CellGroupData[{ Cell[49299, 1606, 32, 0, 39, "Subsubsection"], Cell[49334, 1608, 765, 14, 166, "Text"], Cell[50102, 1624, 393, 7, 102, "Input"], Cell[CellGroupData[{ Cell[50520, 1635, 55, 1, 26, "Input"], Cell[50578, 1638, 34385, 808, 296, 6722, 462, "GraphicsData", "PostScript", "Graphics"], Cell[84966, 2448, 130, 3, 26, "Output"] }, Open ]], Cell[85111, 2454, 141, 3, 44, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[85301, 2463, 27, 0, 49, "Section"], Cell[85331, 2465, 925, 28, 94, "Text"], Cell[86259, 2495, 353, 7, 106, "Input"], Cell[86615, 2504, 401, 12, 62, "Text"], Cell[87019, 2518, 110, 2, 38, "Input"], Cell[87132, 2522, 104, 3, 30, "Text"], Cell[CellGroupData[{ Cell[87261, 2529, 71, 1, 38, "Input"], Cell[87335, 2532, 64, 1, 24, "Output"] }, Open ]], Cell[87414, 2536, 51, 0, 30, "Text"], Cell[CellGroupData[{ Cell[87490, 2540, 71, 1, 38, "Input"], Cell[87564, 2543, 64, 1, 24, "Output"] }, Open ]], Cell[87643, 2547, 141, 3, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[87821, 2555, 26, 0, 52, "Section"], Cell[87850, 2557, 216, 4, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[88103, 2566, 34, 0, 52, "Section"], Cell[88140, 2568, 291, 8, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[88468, 2581, 29, 0, 52, "Section"], Cell[88500, 2583, 1465, 35, 350, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[90002, 2623, 58, 1, 51, "Section"], Cell[90063, 2626, 1272, 26, 286, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[91372, 2657, 66, 1, 51, "Section"], Cell[91441, 2660, 470, 16, 46, "Text"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)