A weavers' cooperative on the island of Tamsin measures its capital in looms. With k looms per weaver, each weaver produces
metres of cloth a day: a Cobb-Douglas production function written per worker. A is productivity (how good the techniques are) and the exponent \alpha, with 0 < \alpha \le 1, says how much output responds to capital.
The marginal product of capital (MPK) is how much extra cloth a weaver makes per extra loom, at the margin: the slope of y as a function of k,
When \alpha < 1, each extra loom adds less than the one before: diminishing returns to capital.
Write loom_table(A, alpha, ks) that returns a list with one tuple (y, mpk) per value of k in ks, in the same order. Collect the outputs and press Run with plot(ks, ys) to see the curve flatten.
Examples
Input: A = 2, alpha = 0.5, ks = [1, 4, 9, 16]
Output: [(2.0, 1.0), (4.0, 0.5), (6.0, 0.3333333333), (8.0, 0.25)]
Explanation: y = 2 * sqrt(k); MPK = 0.5 * 2 / sqrt(k) = 1 / sqrt(k).
Three extra looms (1 to 4) add 2 metres; from 9 to 16 it takes seven to add 2 more.
Input: A = 0.4, alpha = 1, ks = [1, 10]
Output: [(0.4, 0.4), (4.0, 0.4)]
Explanation: with alpha = 1 output is proportional to capital: no diminishing returns.
Constraints
- answers are compared with a tolerance of
1e-6; do not round
Goals
- Compute output per worker $y = A k^{\alpha}$ from capital per worker
- Compute the marginal product of capital $\alpha A k^{\alpha - 1}$
- See the marginal product fall as capital per worker rises (diminishing returns)