Spend or Save on Pell Island

consumption function · disposable income · saving · marginal propensity to consume

On Pell Island every amount is in millions of shells per year. Households pay a fixed tax T whatever they earn, so their disposable income is Y - T, where Y is the island's total income. They spend part of it according to the consumption function

C = c_0 + c_1 \, (Y - T)

c0 is autonomous consumption (what households spend even with no disposable income, by running down savings) and c1 is the marginal propensity to consume: out of each extra shell of disposable income they spend c1 and save the rest, 1 - c1 (the marginal propensity to save). Household saving is the disposable income not consumed:

S = (Y - T) - C

Saving is negative when households spend more than their disposable income.

Write spend_or_save(c0, c1, T, incomes) that returns a tuple (rows, break_even):

  • rows: one pair (C, S) for each income Y in incomes, in the same order;
  • break_even: the total income Y at which saving is exactly zero.

Examples

Input:  c0 = 40, c1 = 0.75, T = 20, incomes = [100, 200, 300]
Output: ([(100.0, -20.0), (175.0, 5.0), (250.0, 30.0)], 180.0)
Explanation: at Y = 200 disposable income is 180, so C = 40 + 0.75 * 180 = 175
and S = 180 - 175 = 5. At Y = 180 disposable income is 160 and C = 40 + 120 = 160.

Input:  c0 = 10, c1 = 0.9, T = 0, incomes = [0, 100]
Output: ([(10.0, -10.0), (100.0, 0.0)], 100.0)

Constraints

  • answers are compared with a tolerance of 1e-6; do not round

Goals

  • Compute consumption from a linear consumption function of disposable income
  • Get saving as what is left of disposable income after consumption
  • Find the income at which households save exactly nothing
Starting Python…