// Numbas version: finer_feedback_settings
{"name": "Stone-Geary utility and calculation of elasticities", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Stone-Geary utility and calculation of elasticities", "tags": [], "metadata": {"description": "You need to calculate elasticities of demand associated to a Stone-Geary utility function.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
Step 1: Formulate the maximum problem in order to find the demand functions.
Let $p_1 $ and $p_2 $ be the prices for respectively the products 1 and 2, and let $ y $ be the available budget (suppose you spend this amount $y$ completely on these products). Then the problem can be stated as
\\begin{eqnarray}
\\max_{q_1,q_2} U(q_1,q_2) &=& {\\var{c1}} \\cdot (q_1-{\\var{a1}})^{1 / {\\var{n1}}} \\cdot (q_2-{\\var{a2}})^{{\\var{n1min1}} / {\\var{n1}}}
\\mbox{ if } && p_1 \\cdot q_1 + p_2 \\cdot q_2 = y
\\end{eqnarray}
or equivalently
\\begin{eqnarray}
\\max_{q_1,q_2} ln U(q_1,q_2) &=& ln({\\var{c1}}) + {\\frac{1}{\\var{n1}}} \\cdot ln(q_1-{\\var{a1}}) + {\\frac{\\var{n1min1}}{\\var{n1}}} \\cdot ln(q_2-{\\var{a2}}) \\\\
\\mbox{ if } && p_1 \\cdot q_1 + p_2\\cdot q_2 = y
\\end{eqnarray}
Step 2: Write down the corresponding Lagrange function for this constrained maximum problem.
\\begin{eqnarray}
L(q_1, q_2, \\lambda) &=& ln U(q_1,q_2) + \\lambda \\cdot (y - p_1 \\cdot q_1 - p_2 \\cdot q_2)
&=& ln({\\var{c1}}) + {\\frac{1}{\\var{n1}}} \\cdot ln(q_1-{\\var{a1}}) + {\\frac{\\var{n1min1}}{\\var{n1}}} \\cdot ln(q_2-{\\var{a2}}) + \\lambda \\cdot ( y - p_1 \\cdot q_1 - p_2\\cdot q_2 )
\\end{eqnarray}
Step 3: Determine the first order conditions in order to calculate critical points of the Lagrangian.
\\begin{eqnarray}
\\mbox{(1) } \\quad \\frac{\\partial {L}}{\\partial q_1} & = & {\\frac{1}{\\var{n1}}} \\cdot {\\frac {1} {q_1-{\\var{a1}}} } - \\lambda \\cdot p_1 = 0 \\\\
\\mbox{(2) } \\quad \\frac{\\partial {L}}{\\partial q_2} & = & {\\frac{\\var{n1min1}}{\\var{n1}}} \\cdot {\\frac {1} {q_2-{\\var{a2}}}} - \\lambda \\cdot p_2 = 0 \\\\
\\mbox{(3) } \\quad \\frac{\\partial {L}}{\\partial \\lambda} & = & y - p_1 \\cdot q_1 - p_2 \\cdot q_2 = 0
\\end{eqnarray}
Step 4: Find the solution of this system of equations in $q_1$, $q_2$ and $\\lambda$.
Calculating $\\lambda$ in both equations (1) and (2) leads to
\\begin{eqnarray}
{\\frac{1}{\\var{n1}}}\\cdot{\\frac {1} {p_1 \\cdot(q_1-{\\var{a1}})} }& = & {\\frac{\\var{n1min1}}{\\var{n1}}}\\cdot{\\frac {1} {p_2 \\cdot(q_2-{\\var{a2}})}}\\\\ \\\\
{p_2} \\cdot {(q_2-{\\var{a2}})} & = & {\\var{n1min1}} \\cdot {p_1} \\cdot {(q_1-{\\var{a1}})} \\\\ \\\\
\\mbox{(4)} \\quad \\quad \\quad {p_2} \\cdot {q_2} & = & {\\var{a2}} \\cdot {p_2} + {\\var{n1min1}} \\cdot {p_1} \\cdot {(q_1-{\\var{a1}})}
\\end{eqnarray}
i.e.
\\begin{eqnarray}
{q_2} & = & {\\var{a2}} + {\\frac {1} {p_2}} \\cdot {\\var{n1min1}} \\cdot {p_1} \\cdot {(q_1-{\\var{a1}})}
\\end{eqnarray}
Substitute equation (4) in the budget restriction (3):
\\begin{eqnarray}
{p_1} \\cdot {q_1} + {\\var{a2}} \\cdot {p_2} + {\\var{n1min1}} \\cdot {p_1}\\cdot {(q_1-{\\var{a1}})} & = & y\\\\
{p_1} \\cdot {q_1} + {\\var{a2}} \\cdot {p_2} + {\\var{n1min1}} \\cdot {p_1} \\cdot{q_1} - {\\var{n1min1}} \\cdot {\\var{a1}} \\cdot {p_1} & = & y\\\\
{\\var{n1}} \\cdot {p_1}\\cdot {q_1} & = & y + {\\var{n1min1maala1}} \\cdot {p_1} - {\\var{a2}} \\cdot {p_2} \\\\
{q_1} & = & {\\frac {1}{\\var{n1} \\cdot {p_1}}} \\cdot { ( y + {\\var{n1min1maala1}} \\cdot {p_1} - {\\var{a2}} \\cdot {p_2} ) } \\\\
{q_1} & = & {\\frac {y + {\\var{n1min1maala1}} \\cdot {p_1} - {\\var{a2}} \\cdot {p_2}}{\\var{n1} \\cdot {p_1}}}
\\end{eqnarray}
Substituting this last formula in equation (4), we can calculate $q_2$:
\\begin{eqnarray}
{q_2} & = & \\frac{\\var{t2}\\cdot y-\\var{a1maalt2} \\cdot {p_1} + \\var{a2}\\cdot{p_2}}{\\var{n1} \\cdot {p_2}}
\\end{eqnarray}
The demand functions for the products are given by
\\begin{eqnarray}
{q_1=q_1 \\left( p_1,p_2,y \\right) } & = & {\\frac {y + {\\var{n1min1maala1}} \\cdot {p_1} - {\\var{a2}} \\cdot {p_2}}{\\var{n1} \\cdot {p_1}}}\\\\
{q_2=q_2 \\left( p_1,p_2,y \\right) } & = & \\frac{\\var{t2}\\cdot y-\\var{a1maalt2}\\cdot{p_1} + \\var{a2}\\cdot {p_2}}{\\var{n1} \\cdot {p_2}}
\\end{eqnarray}
Step 5: Calculate the elasticities of demand.
\\begin{eqnarray}
{\\epsilon}^{q_1}_{p_1} & = & {\\frac {{\\partial}{q_1}} {{\\partial} {p_1}}} \\cdot {\\frac {p_1} {q_1}} = {\\frac {1} {{\\var{n1}} }} \\cdot {\\frac {{\\partial}} {{\\partial} {p_1}}} {\\left( {\\var{n1min1maala1}} + {\\frac {y - {\\var{a2}}\\cdot {p_2}} {p_1}} \\right) } \\cdot {\\frac {p_1} {q_1}} = - {\\frac {y - {\\var{a2}} \\cdot {p_2}} {{\\var{n1}} \\cdot {p_1} \\cdot {q_1} } } \\quad, {\\mbox{ evaluated in }}P^*: \\var{epsq1p1} \\\\
{\\epsilon}^{q_1}_{p_2} & = & {\\frac {{\\partial}{q_1}} {{\\partial} {p_2}}} \\cdot {\\frac {p_2} {q_1}} = - {\\frac {\\var{a2}} {{\\var{n1}} \\cdot {p_1}} } \\cdot {\\frac {p_2} {q_1}} \\quad, {\\ } \\mbox{ evaluated in } P^*: \\var{epsq1p2} \\\\
{\\epsilon}^{q_2}_{p_1} & = & {\\frac {{\\partial}{q_2}} {{\\partial} {p_1}}} \\cdot {\\frac {p_1} {q_2}} = - {\\frac {\\var{n1min1maala1}} {{\\var{n1}} \\cdot {p_2}} } \\cdot {\\frac {p_1} {q_2}} \\quad , \\mbox{ evaluated in }P^*: \\var{epsq2p1} \\\\
{\\epsilon}^{q_2}_{p_2} & = & {\\frac {{\\partial}{q_2}} {{\\partial} {p_2}}} \\cdot {\\frac {p_2} {q_2}} = {\\frac {1} {{\\var{n1}} }} \\cdot {\\frac {{\\partial}} {{\\partial} {p_2}}} { \\left( {\\var{a2}} + {\\frac {{\\var{n1min1}} \\cdot y - {\\var{n1min1maala1}} \\cdot {p_1}} {p_2}} \\right) } \\cdot {\\frac {p_2} {q_2}} = - {\\frac {{\\var{n1min1}} \\cdot y - {\\var{n1min1maala1}} \\cdot {p_1}} {{\\var{n1}} \\cdot {p_2} \\cdot {q_2} } } \\quad , \\mbox{ evaluated in } P^*: \\var{epsq2p2} \\\\
{\\epsilon}^{q_1}_{y} & = & {\\frac {{\\partial}{q_1}} {{\\partial} {y}}} \\cdot {\\frac {y} {q_1}} = {\\frac {1} {{\\var{n1}} \\cdot {p_1}} } \\cdot {\\frac {y} {q_1}} , \\mbox{ evaluated in }P^*: \\var{epsq1y}\\\\
{\\epsilon}^{q_2}_{y} & = & {\\frac {{\\partial}{q_2}} {{\\partial} {y}}} \\cdot {\\frac {y} {q_2}} = {\\frac {1} {{\\var{n1}}}} \\cdot {\\frac {1} {{\\var{n1min1}} \\cdot {p_2}} } \\cdot {\\frac {y} {q_2}} \\quad , \\mbox{ evaluated in } P^*: \\var{epsq2y}\\\\
\\end{eqnarray}
Answers:
\n\\[ {\\epsilon}^{q_1}_{p_1} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq1p1} \\]
\\[ {\\epsilon}^{q_2}_{p_2} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq2p2} \\]
\\[ {\\epsilon}^{q_1}_{y} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq1y} \\]
\\[ {\\epsilon}^{q_2}_{y} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq2y} \\]
\\[ {\\epsilon}^{q_1}_{p_2} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq1p2} \\]
\\[ {\\epsilon}^{q_2}_{p_1} {( \\var{gegp1} , \\var{gegp2} , \\var{gegy} )} \\approx \\var{benepsq2p1} \\]
c1
", "templateType": "anything"}, "n1min1maala1": {"name": "n1min1maala1", "group": "Ungrouped variables", "definition": "n1min1*a1", "description": "", "templateType": "anything"}, "benepsq1p1": {"name": "benepsq1p1", "group": "Ungrouped variables", "definition": "precround(epsq1p1,3)", "description": "", "templateType": "anything"}, "epsq2y": {"name": "epsq2y", "group": "Ungrouped variables", "definition": "(n1-1)*gegy/(n1*gegp2*q2)", "description": "", "templateType": "anything"}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "a1+v", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "n1", "description": "", "templateType": "anything"}, "gegp2": {"name": "gegp2", "group": "Ungrouped variables", "definition": "random(2..15)", "description": "", "templateType": "anything"}, "gegp1": {"name": "gegp1", "group": "Ungrouped variables", "definition": "s*gegp2", "description": "", "templateType": "anything"}, "benepsq1p2": {"name": "benepsq1p2", "group": "Ungrouped variables", "definition": "precround(epsq1p2,3)", "description": "", "templateType": "anything"}, "n1min1": {"name": "n1min1", "group": "Ungrouped variables", "definition": "n1-1", "description": "", "templateType": "anything"}, "benepsq2p2": {"name": "benepsq2p2", "group": "Ungrouped variables", "definition": "precround(epsq2p2,3)", "description": "", "templateType": "anything"}, "eta": {"name": "eta", "group": "Ungrouped variables", "definition": "theta*(s+n1-1)", "description": "", "templateType": "anything"}, "benepsq2y": {"name": "benepsq2y", "group": "Ungrouped variables", "definition": "precround(epsq2y,3)", "description": "", "templateType": "anything"}, "theta": {"name": "theta", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "", "templateType": "anything"}, "epsq1y": {"name": "epsq1y", "group": "Ungrouped variables", "definition": "gegy/(n1*gegp1*q1)", "description": "", "templateType": "anything"}, "benepsq1y": {"name": "benepsq1y", "group": "Ungrouped variables", "definition": "precround(epsq1y,3)", "description": "", "templateType": "anything"}, "t1": {"name": "t1", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "t2": {"name": "t2", "group": "Ungrouped variables", "definition": "n1-1", "description": "", "templateType": "anything"}, "epsq1p2": {"name": "epsq1p2", "group": "Ungrouped variables", "definition": "-a2*gegp2/(n1*gegp1*q1)", "description": "", "templateType": "anything"}, "epsq2p1": {"name": "epsq2p1", "group": "Ungrouped variables", "definition": "-(n1-1)*a1*gegp1/(n1*gegp2*q2)", "description": "", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "theta*s+1", "description": "", "templateType": "anything"}, "gegy": {"name": "gegy", "group": "Ungrouped variables", "definition": "gegp2*(n1*v*s+s*a1+a2)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n1", "theta", "c1", "s", "gegp2", "t1", "v", "eta", "n1min1", "a1", "a2", "t2", "n2", "n1min1maala1", "a1maalt2", "gegp1", "gegy", "q1", "q2", "epsq1p1", "epsq1p2", "epsq2p1", "epsq2p2", "epsq1y", "epsq2y", "benepsq1p1", "benepsq2p2", "benepsq1y", "benepsq2y", "benepsq1p2", "benepsq2p1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "