Skip to content

Canvas: Expenditure function and Shephard's Lemma visualisation #17

@yueswater

Description

@yueswater

Overview

Visualise the expenditure function $e(p_x, p_y, \bar{U})$ and verify Shephard's Lemma as an annotation.

Background (MWG Ch. 3.E)

The expenditure function is the value function of the dual (expenditure minimisation) problem:

$$\begin{aligned} e(p_x, p_y, \bar{U}) &= \min_{x,, y}; p_x x + p_y y \\ &\quad \text{s.t.}\quad U(x, y) \geq \bar{U} \end{aligned}$$

Shephard's Lemma recovers Hicksian demand from the expenditure function:

$$\begin{aligned} h_x(p_x, p_y, \bar{U}) &= \frac{\partial e}{\partial p_x} \\ h_y(p_x, p_y, \bar{U}) &= \frac{\partial e}{\partial p_y} \end{aligned}$$

Duality relationship

The expenditure and indirect utility functions are inverses of each other:

$$\begin{aligned} e!\left(p_x, p_y,; V(p_x, p_y, I)\right) &= I \\ V!\left(p_x, p_y,; e(p_x, p_y, \bar{U})\right) &= \bar{U} \end{aligned}$$

Proposed visualisations

A. $e$ vs $p_x$ curve

Fix $p_y$ and $\bar{U}$; sweep $p_x$ and plot $e(p_x)$. The curve is increasing and concave in $p_x$.

B. Shephard's Lemma annotation

At $p_x^0$, mark the slope $\partial e / \partial p_x = h_x^{\ast}$ and compare against the numerically solved Hicksian demand.

C. Duality overlay

On the same axes, plot both $V(p_x)^{-1}$ and $e(p_x)$ to illustrate the inverse relationship.

API sketch

canvas.plot_expenditure(model, vary="px", px_range=(0.5, 5), py=2, utility=10)

Tasks

  • Numerical expenditure minimisation solver (scipy minimize with utility constraint)
  • plot_expenditure method on Canvas
  • Shephard's Lemma numerical annotation
  • Duality consistency check: $e(p,, V(p, I)) \approx I$
  • Unit tests against Cobb-Douglas closed form
  • Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions