Wage talks in the town of Marrow start from what everyone expects inflation to be, \pi^e. When jobs are scarce (unemployment high) workers settle for less, and firms raise prices less; when workers are scarce, the reverse. The town's economists model this with an expectations-augmented Phillips curve:
\pi = \pi^e + \kappa \, (u_n - u)
where \pi is inflation this year, u the unemployment rate, u_n the natural rate of unemployment (the rate at which inflation equals what was expected) and \kappa > 0 the slope. All rates are fractions (5 % is 0.05).
Write phillips(pi_e, kappa, u_n, us, target) that returns a tuple (inflation, u_needed):
inflation: the list of inflation rates the curve gives for each unemployment rate inus, in order;u_needed: the unemployment rate at which inflation equalstarget.
Examples
Input: pi_e = 0.03, kappa = 0.5, u_n = 0.05, us = [0.05, 0.04, 0.07], target = 0.02
Output: ([0.03, 0.035, 0.02], 0.07)
Explanation: at the natural rate inflation is what was expected, 3 %. One point
below it adds 0.5 points: 3.5 %. To get inflation down to 2 % with 3 % expected,
unemployment must be 0.01 / 0.5 = 2 points above the natural rate.
Input: pi_e = 0.02, kappa = 0.25, u_n = 0.06, us = [0.03], target = 0.025
Output: ([0.0275], 0.04)
Constraints
- answers are compared with a tolerance of
1e-6; do not round
Goals
- Evaluate an expectations-augmented Phillips curve for several unemployment rates
- See that unemployment at its natural rate gives exactly the expected inflation
- Solve the curve for the unemployment rate that delivers a chosen inflation rate