Create a graph that illustrates (i) demand for \(x\) when \(P_y=4\) and \(i=100\), (ii) demand for \(x\) when \(P_y=4\) and \(i=100\) (iii) demand for \(x\) when \(P_y=4\) and \(i=120\). As a part of your answer:
\[u(x,y) = \frac{xy}{x+y}\] From the third maximization problem: \[\begin{equation} x^*(P_x,P_y,I) = \frac{I}{P_x+\sqrt{P_xP_y}} \end{equation}\] (i) For \(P_y=4\) and \(I=100\): \[\begin{equation} x^*(P_x,4,100) = \frac{100}{P_x+\sqrt{4P_x}} \end{equation}\] (ii) For \(P_y=8\) and \(I=100\): \[\begin{equation} x^*(P_x,8,100) = \frac{100}{P_x+\sqrt{8P_x}} \end{equation}\] (iii) For \(P_y=4\) and \(I=120\): \[\begin{equation} x^*(P_x,4,120) = \frac{120}{P_x+\sqrt{4P_x}} \end{equation}\]
# Define parameters
num <- 600
x_max <- 0.1
x_min <- 0.0001
x <- seq(x_min, x_max, length.out = num)
# Define the three parameter pairs
params <- data.frame(
py = c(4, 8, 4),
I = c(100, 100, 120),
label = c("Py=4, I=100", "Py=8, I=100", "Py=4, I=120")
)
# Build the full dataset by row-binding the three curves
curve_df <- params |>
rowwise() |>
do({
tibble(
x = x,
py = .$py,
I = .$I,
y = .$I / (x + sqrt(.$py * x)),
label = .$label
)
}) |>
ungroup()
As shown in Figure 1, at a specific \(P_x\), when \(I\) increases, the amount of good \(x\) increases (curves for \(P_x=4\) and \(I=100\)) and \(\frac{\partial x^*}{\partial I}>0\). Meaning that x is a normal good.
As price of y (\(P_y\)) increases (compare \(I=100\) and \(P_y=4\) to \(I=100\) and \(P_y=8\)) at a specific price of x \(P_x\), the demand of x decreases showing that \(\frac{\partial x^*}{\partial y}<0\) as a result, x and y are complements.
Create a graph that illustrates how the price elasticity of \(x\) changes depending on the price of \(x\) over the range \(P_x=1\) to \(P_x=16\), when \(P_y=1\), \(P_y=4\), and \(P_y=16\).
Use your graph to discuss how, for this utility function, consumer responsiveness to changes in \(P_x\) varies (or does not vary) depending on the level of \(P_x\) and \(P_y\).
Provide an overview of the code you used to derive the price elasticity at each level of \(P_x\) (i.e., “your simulation”)
From the third maximization problem: \[\begin{equation} x^*(P_x,P_y,I) = \frac{I}{P_x+\sqrt{P_xP_y}} \end{equation}\] For elasticity: \[\epsilon_{x,P_x}=-\frac{\partial x^*(P_x,P_y,I)}{\partial P_x}.\frac{P_x}{x^*(P_x,P_y,I)}\]
\[\epsilon_{x,P_x}=-\left(\frac{P_x^{0.5}+0.5P_y^{0.5}}{P_x^{0.5}+P_y^{0.5}}\right)\] ### Figure 2
# Define parameters
num <- 600
x_max <- 16
x_min <- 1
x <- seq(x_min, x_max, length.out = num)
# Define the three parameter pairs
params <- data.frame(
py = c(1, 4, 16),
I = c(100, 100, 100),
label = c("Py=1", "Py=4", "Py=16")
)
# Build the full dataset by row-binding the three curves
curve_df <- params |>
rowwise() |>
do({
tibble(
x = x,
py = .$py,
I = .$I,
y = (-sqrt(x)-0.5*sqrt(.$py)) / (sqrt(x)+sqrt(.$py)),
label = .$label
)
}) |>
ungroup()
Based on Figure 2, elasticity only depends on goods prices and not the income.As price of x increases the elasticity gets closer to unit elastic and as price of x decreases it approaches -0.5 meaning that we move to the inelastic region.
Assume that initially the consumer is endowed with income \(I=100\)d faces prices \(P_x=4\) and \(P_y=1\). Create a graph that illustrates the EV and CV associated with an increase :
Are EV and CV getting smaller or larger as \(P_x\) increases? Provide intuition as to why this is the case.
Characterize the difference between EV and CV and how this difference changes across these price levels. Provide intuition as to why this is the case.
Provide an overview of the code you used to calculate EV and CV at each level of 𝑝௫ (i.e., “your simulation”).
\[EV=E(P_x',P_y,u_0)-I\] \[CV=I-E(P_x,P_y,u_1)\]
x_demand <- function(px, py, I) {
I / (sqrt(px) * (sqrt(px) + sqrt(py)))
}
v_indirect <- function(px, py, I) {
I / (sqrt(px) + sqrt(py))^2
}
expenditure <- function(px, py, u) {
u * (sqrt(px) + sqrt(py))^2
}
elasticity_x <- function(px, py) {
- (sqrt(px) + 0.5 * sqrt(py)) / (sqrt(px) + sqrt(py))
}
I0 <- 100
py0 <- 4
eps <- 1:15
px0 <- 1 + eps
px1 <- 2 + eps
evcv <- tibble(epsilon = eps, px0 = px0, px1 = px1) |>
rowwise() |>
mutate(
u0 = v_indirect(px0, py0, I0),
u1 = v_indirect(px1, py0, I0),
CV = expenditure(px1, py0, u0) - I0,
EV = I0 - expenditure(px0, py0, u1)
) |>
ungroup()
kable(evcv, digits = 4, caption = "Equivalent Variation (EV) and Compensating Variation (CV)")
epsilon | px0 | px1 | u0 | u1 | CV | EV |
---|---|---|---|---|---|---|
1 | 2 | 3 | 8.5786 | 7.1797 | 19.4851 | 16.3076 |
2 | 3 | 4 | 7.1797 | 6.2500 | 14.8748 | 12.9487 |
3 | 4 | 5 | 6.2500 | 5.5728 | 12.1517 | 10.8351 |
4 | 5 | 6 | 5.5728 | 5.0510 | 10.3302 | 9.3630 |
5 | 6 | 7 | 5.0510 | 4.6333 | 9.0163 | 8.2706 |
6 | 7 | 8 | 4.6333 | 4.2893 | 8.0188 | 7.4235 |
7 | 8 | 9 | 4.2893 | 4.0000 | 7.2330 | 6.7452 |
8 | 9 | 10 | 4.0000 | 3.7525 | 6.5964 | 6.1882 |
9 | 10 | 11 | 3.7525 | 3.5378 | 6.0692 | 5.7219 |
10 | 11 | 12 | 3.5378 | 3.3494 | 5.6247 | 5.3252 |
11 | 12 | 13 | 3.3494 | 3.1825 | 5.2444 | 4.9831 |
12 | 13 | 14 | 3.1825 | 3.0334 | 4.9151 | 4.6848 |
13 | 14 | 15 | 3.0334 | 2.8992 | 4.6268 | 4.4222 |
14 | 15 | 16 | 2.8992 | 2.7778 | 4.3722 | 4.1891 |
15 | 16 | 17 | 2.7778 | 2.6672 | 4.1456 | 3.9806 |
evcv_long <- evcv |>
select(px1, EV, CV) |>
pivot_longer(-px1, names_to = "measure", values_to = "amount")
ggplot(evcv_long, aes(px1, amount, color = measure)) +
geom_line(size = 1) +
labs(
title = "EV and CV as px increases (I=100, py=4; px: (1+ε) → (2+ε))",
x = "New price px1 = 2 + ε", y = "Amount ($)", color = NULL
) +
theme_minimal(base_size = 13)
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Both EV and CV decrease as we shift to higher prices. This is due to the shape of \(x^h\) function as its value change at higher \(P_x\) is smaller as we can see in Figure 1.
As Hicksian demand for good \(x\), is larger at the higher utility level, the difference between EV and CV decreases at higher prices of x.