F5-dev-01 — Cobb–Douglas consumer: closed-form demands with numerical validation
Scientific question
A consumer with utility u(x1, x2) = α ln x1 + (1 − α) ln x2 chooses non-negative quantities of two goods subject to the budget constraint p1 x1 + p2 x2 ≤ m. The estimands are the Marshallian demands x1*(p, m) and x2*(p, m), the indirect utility v(p, m) = u(x1*, x2*), and the budget identity residual p1 x1* + p2 x2* − m at the optimum. Derive the closed-form solution, state the assumptions under which it is the unique optimum, and validate it numerically by an independent constrained maximisation (grid search or a numerical optimiser on the budget line).
Inputs
data/parameters.csv— columnsparameter,value,description; one row per parameter:alpha(exponent on good 1, dimensionless),p1,p2(prices, currency units per unit of good),m(income, currency units). These are given parameters of a theoretical exercise, not observed data.
Information-availability rules
- Use only
data/parameters.csv. No other input exists. - The closed-form expressions must be derived from the stated utility function; the numerical validation must not use the closed form (it must maximise utility directly).
Required outputs
out/results.jsonwith the keys:
| key | type | unit | meaning |
|---|---|---|---|
task_id |
string | — | "F5-dev-01" |
x1_demand |
number | units of good 1 | closed-form Marshallian demand for good 1 |
x2_demand |
number | units of good 2 | closed-form Marshallian demand for good 2 |
indirect_utility |
number | utils | u evaluated at the closed-form demands |
budget_identity_residual |
number | currency units | p1·x1_demand + p2·x2_demand − m (should be numerically zero) |
mrs_at_optimum |
number | — | marginal rate of substitution (∂u/∂x1)/(∂u/∂x2) at the closed-form demands |
price_ratio |
number | — | p1/p2 |
expenditure_share_good1 |
number | — | p1·x1_demand / m |
indirect_utility_numerical |
number | utils | maximum utility found by the independent numerical maximisation on the budget line (the baseline check) |
feasibility |
string | — | "complete", "partial" or "infeasible" |
feasibility_reason |
string or null | — | explanation if not complete |
data_issues |
array of {"issue","handling"} | — | data problems detected and how handled (empty list if none) |
n_input_rows |
object | — | {"parameters.csv": rows read} |
n_analysed |
integer or null | — | number of parameter rows used |
random_seed |
integer or null | — | seed used, if any |
out/report.mdwith the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues. The Method section must state explicitly the assumptions under which the closed form holds (e.g. interior solution, strict monotonicity/concavity, parameter ranges) and the scope of the numerical validation (which parameter point it covers).out/analysis.py— running~/wp29/venv/bin/python out/analysis.pyfrom the workspace root must regenerateout/results.jsonfromdata/only, deterministically. It must contain both the closed-form computation and the numerical validation.out/claims.json— a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].
Constraints
- No network access. Python:
~/wp29/venv/bin/python(numpy, pandas, scipy, statsmodels available). Do not modifydata/. - This task is designed to be completed in well under 15 minutes of work.