The relationship between commuting cost \(g\) (in hundreds) and \(T\) (in thousands) is shown in the figure below, with some degree of poetic license. The monthly commuting cost per driver when the freeway is not congested (i.e., when there are fewer than \(\bar{T}=500\) cars at the same time) is $300. The commuting cost function when the freeway is congested is given by \(g(T)=T^{2}+3\), and the demand functional form at the rush-hour is \(D=5-T\). Assume \(T>0\) and \(n=2,500\) commuters in total using either the freeway or the alternate routes. If you need help solving equations, use Wolfram.
What are the aggregate and marginal costs of using the freeway as a function of \(T\)?
What is the number of cars using the freeway when there is no congestion pricing (free market equilibrium)? Also, compute the total commuting cost in this scenario: the cost of using the freeway + the alternate costs.
Hint: find the area below the \(MC\) curve from .5 to \(T_{eq}\). Find the area below the demand curve from \(T_{eq}\) to 2.5. Finally, find the area of the rectangle from 0 to \(\bar{T}\). The sum of those areas is the total commuting cost. To get the area below those curves you might need to use integral.
Hint: same as before, but now use \(T_{opt}\) instead of \(T_{eq}\).
Suppose the mayor wants to impose a congestion toll to reach the optimal number of drivers using the freeway. Find the value of the congestion toll that must be charged to achieve \(T_{opt}\) freeway commuters at the rush-hour.
Assume that the mayor wants to avoid congestion at the rush-hour imposing the following restriction: only cars from 1 to 500 would be allowed to commute using the freeway. It is your duty as a good economist to give some advice to him on that matter. What do you say to him?
Hint: compare the total commuting costs between the scenario where there are \(T_{opt}\) cars with the one that has 500 cars.
I hope you still remember calculus…
The aggregate commuting cost is:
\(Tg(T)=T(T^{2}+3)=T^{3}+3T\)
The marginal cost is:
\(MC=\frac{d(Tg(T))}{dT}=g(T)+Tg^{'}(T)\)
Hence, \(MC=T^{2}+3+T(2T)=3T^{2}+3\)
When there is no congestion pricing, the equilibrium is \(T_{eq}\), where the private cost \(g(T)\) intersects the demand curve. \(5-T=T^{2} +3 \rightarrow T=1\) or \(T=-2\). The optimal number of cars using the freeway when there is no congestion toll is \(1,000\).
The total commuting cost is equal to \(3*0.5+\underbrace{\int_{.5}^{1}(3T^{2}+3)dT}_\text{Freeway cost} + \underbrace{\int_{1}^{2.5}(5-T)dT}_\text{Alternate routes cost}\). You can get those areas using the following code:
<-function(t) {3*t^2+3}
MC<-function(t){5-t}
D
## Market Eq
<-integrate(MC, lower=.5, upper=1)
Teq<-integrate(D, lower=1,upper=2.5)
Deq
<-(.5*3+Teq$value+Deq$value)*10^5
cost_eq cost_eq
## [1] 875000
The socially optimum number of cars using the freeway is represented by the intersectoin of \(D\) and \(MC\). \(5-T=3T^{2} +3 \rightarrow T=\frac{2}{3}\) or \(T=-1\)
The total commuting cost is equal to \(3*0.5+\underbrace{\int_{.5}^{\frac{2}{3}}(3T^{2}+3)dT}_\text{Freeway cost} + \underbrace{\int_{\frac{2}{3}}^{2.5}(5-T)dT}_\text{Alternate routes cost}\). You can get those areas using the following code:
<-function(t) {3*t^2+3}
MC<-function(t){5-t}
D
## Market Eq
<-integrate(MC, lower=.5, upper=2/3)
Top<-integrate(D, lower=2/3,upper=2.5)
Dop
<-(.5*3+Top$value+Dop$value)*10^5
cost_opt cost_opt
## [1] 843518.5
The optimal outcome can be achieved by charging a congestion toll equal to the vertical difference between the private cost \(AC\) and \(MC\) at the optimal point \(T_{opt}\). Then, \(Toll = MC(T_{opt})-g(T_{opt}) =g(\frac{2}{3})+(\frac{2}{3})*g'(\frac{2}{3})- g(\frac{2}{3})=\frac{8}{9}\)
Therefore, the monthly congestion toll should be equal to \(\$88.88\).
If the mayor sets the limit of 500 cars using the freeway, there would be no congestion at all. The total cost of using the freeway now is \(3*0.5\). However, the alternate cost is higher: \(\int_{.5}^{2.5}(5-T)dT\). You can get those areas using the following code:
<-function(t){5-t}
D
<-integrate(D, lower=.5,upper=2.5)
Dm
<-(.5*3+Dm$value)*10^5
cost_mayor cost_mayor
## [1] 850000
As one can see, the total commuting cost in this scenario is higher than when the number of cars using the freeway is \(T_{opt}\). You should explain to him that the goal is to minimize the total commuting cost, and it would be better to charge a congestion toll that brings \(T_{eq}\) to \(T_{opt}\).
Let’s find out where are America’s longest and fastest travel times to work. Here you have a shapefile that contains the average commute time per U.S. county (excluding Hawaii and Alaska) based on the American Community Survey 2014-18. What are the top five and bottom five counties in terms of commute time? What is America’s average travel time to work? Finally, map the spatial distribution of commuting to work in U.S. counties.
## Packages that you might need to work with shapefiles
<- c("tigris","rgdal", "maptools", "reshape", "sp", "spdep", "GISTools", "ggplot2", "tidyverse", "tmap", "viridis")
libs lapply(libs, library, character.only = TRUE)
To access the dataframe contained in the .shp
use @data
. The average commute time to work is \(23.68\) minutes.
### Importing the .shp file
<-readOGR("commute_time.shp", layer="commute_time", verbose=F)
commute
### Bottom five
@data%>%arrange(mean_tt)%>%slice(1:5) commute
## GEOID NAME mean_tt
## 1 30107 Wheatland County, Montana 7.9
## 2 48023 Baylor County, Texas 8.4
## 3 48263 Kent County, Texas 9.1
## 4 20071 Greeley County, Kansas 9.5
## 5 20123 Mitchell County, Kansas 9.7
### Top five
@data%>%arrange(desc(mean_tt))%>%slice(1:5) commute
## GEOID NAME mean_tt
## 1 42103 Pike County, Pennsylvania 45.0
## 2 36005 Bronx County, New York 44.8
## 3 36085 Richmond County, New York 44.5
## 4 24017 Charles County, Maryland 44.4
## 5 36081 Queens County, New York 44.1
### America's average travel time to work
mean(commute@data$mean_tt, na.rm=T)
## [1] 23.6792
In case you want to define the breaks manually instead of using quantiles, set breaks=c()
and use the values that you want. In the second map, I use breaks
to break down the commuting times between 28 and 45 minutes in the quantile map in more classes.
tmap_mode("plot")
tm_shape(commute)+
tm_borders(lwd = 2, col = "white", alpha = .4)+
tm_polygons("mean_tt", style="quantile", palette = "-viridis",
title="Commute time in US counties")+
tm_legend(legend.title.size = 1,legend.text.size = .7,
legend.position = c("left", "top"))+
tm_layout(inner.margins = c(.02,.18,.10,.02))
tmap_mode("view")
tm_shape(commute)+tm_borders(lwd = 2, col = "white", alpha = .4)+
tm_polygons("mean_tt", breaks=c(7,15,22,30,36,45), palette = "-viridis",
title="Commute time in US counties", id="NAME",
popup.vars=c("County Name"="NAME","Commute time"="mean_tt"))+
tm_legend(legend.title.size = 1,legend.text.size = .7)+
tm_basemap(server="OpenStreetMap")