# F5-conf-01 — Competitive equilibrium of a 2×2 Cobb–Douglas exchange economy ## Question Find the Walrasian equilibrium relative price p = p1/p2 (with good 2 as numeraire, p2 = 1) and the equilibrium allocation for agents A and B with u_i = α_i ln x1 + (1−α_i) ln x2. Then check market clearing and Walras' law numerically, and validate the price with an independent numerical root-finder. ## Data and exclusions - `data/endowments.csv` has 2 rows: A = (8, 2), B = (4, 8). `data/parameters.csv` has 4 rows: α_A = 0.4, α_B = 0.6, plus summary aggregates (`n_input_rows`). No rows were excluded, so 2 agents were analysed (`n_analysed`; see `out/exclusions.csv`). - **Data issue (`data_issues`):** the summary sheet gives an aggregate endowment of good 1 of 14. The individual endowments sum to 8 + 4 = 12. I used 12 (`aggregate_endowment_good1`), because the individual endowments are the primary data. Market clearing also has to match the agents' budget constraints, which are built from those endowments. If I had used 14, the clearing condition would not match the budgets and Walras' law would fail. For good 2 the two sources agree at 10 (`aggregate_endowment_good2`). For reference, at the equilibrium price total demand for good 1 is 2 units below the summary figure of 14 (`sensitivity_excess_demand_good1_vs_summary_E1`). ## Method **Assumptions:** - 0 < α_i < 1 and all endowments strictly positive. Together these give unique, interior Marshallian demands x1_i = α_i w_i / p and x2_i = (1−α_i) w_i, with wealth w_i = p e1_i + e2_i. - Prices are normalised with p2 = 1. Setting aggregate excess demand for good 1 to zero gives the closed form p = Σ_i α_i e2_i / Σ_i (1−α_i) e1_i. Cobb–Douglas preferences satisfy gross substitutes, so this equilibrium is unique. **Independent validation:** `scipy.optimize.brentq` finds the root of the excess demand of good 1, z1(p) = Σ_i x1_i(p) − E1. The function is built directly from the demand functions, and the closed form is not used. The search bracket is [1e-6, 1], expanded if needed. The validation checks this one economy only; it does not cover other parameter values. No randomness is involved (`random_seed` = null). ## Results - Equilibrium price p1/p2 = 0.875 (`price_ratio_p1_over_p2`). The numerical root is also 0.875 (`price_ratio_numerical`), and the two differ by 1.1e-16 (`abs_diff_closed_vs_numerical`). - Wealth at equilibrium: A = 9.0 (`wealth_A`), B = 11.5 (`wealth_B`). - Allocation: - A gets x1_A = 4.1143 (`x1_A`) and x2_A = 5.4 (`x2_A`). - B gets x1_B = 7.8857 (`x1_B`) and x2_B = 4.6 (`x2_B`). - Aggregate excess demand for good 1 is 0.0 (`excess_demand_good1`). For good 2 it is also 0.0 (`excess_demand_good2`). - The Walras' law residual p·z1 + z2 is 0.0 (`walras_law_residual`). - Further checks are in `out/state/checks.md`: both budget constraints hold, and MRS_A = MRS_B = 0.875, so the allocation is Pareto efficient. - Status: `feasibility` = "complete". ## Uncertainty This is a deterministic theoretical exercise, so there is no statistical uncertainty. The only remaining error is floating-point rounding, of order 1e-16 (`abs_diff_closed_vs_numerical`). The main real uncertainty comes from the inputs: if the summary aggregate of 14 for good 1 were correct, the individual endowments would be wrong. The results depend on the individual endowments being correct. ## Limitations and open issues - The two input files disagree on the aggregate endowment of good 1 (14 vs 12). I resolved this in favour of the individual endowments, but I could not confirm which source is right. - The closed form holds only under the assumptions above: interior solution, strictly positive endowments, Cobb–Douglas preferences with α in (0,1), and p2 = 1. - The numerical validation covers this single parameter set only.