From 8a7206b7d1ce50c9eb0c8ece5e69ff4fb8acf76b Mon Sep 17 00:00:00 2001 From: Daisuke Oyama Date: Tue, 21 Oct 2025 17:19:49 +0900 Subject: [PATCH 1/2] [two_auctions] Fix conditional expectation simulation --- lectures/two_auctions.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lectures/two_auctions.md b/lectures/two_auctions.md index ec35a42ac..b9ff550cd 100644 --- a/lectures/two_auctions.md +++ b/lectures/two_auctions.md @@ -424,13 +424,14 @@ def evaluate_largest(v_hat, array, order=1): We can check the accuracy of our `evaluate_largest` method by comparing it with an analytical solution. -We find that despite small discrepancy, the evaluate_largest method functions well. - -Furthermore, if we take a very large number of auctions, say 1 million, the discrepancy disappears. +We find that the evaluate_largest method functions well. ```{code-cell} ipython3 v_grid = np.linspace(0.3,1,8) bid_analytical = b_star(v_grid,N) + +# Redraw valuations +v = np.random.uniform(0, 1, (N, R)) bid_simulated = [evaluate_largest(ii, v) for ii in v_grid] fig, ax = plt.subplots(figsize=(6, 4)) From 644e9d3446a880e4ba452f5636a047f0e03434fd Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Wed, 22 Oct 2025 14:58:47 +1100 Subject: [PATCH 2/2] minor edit --- lectures/two_auctions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lectures/two_auctions.md b/lectures/two_auctions.md index b9ff550cd..a559906e8 100644 --- a/lectures/two_auctions.md +++ b/lectures/two_auctions.md @@ -424,11 +424,11 @@ def evaluate_largest(v_hat, array, order=1): We can check the accuracy of our `evaluate_largest` method by comparing it with an analytical solution. -We find that the evaluate_largest method functions well. +We find that the `evaluate_largest` method functions well ```{code-cell} ipython3 -v_grid = np.linspace(0.3,1,8) -bid_analytical = b_star(v_grid,N) +v_grid = np.linspace(0.3, 1, 8) +bid_analytical = b_star(v_grid, N) # Redraw valuations v = np.random.uniform(0, 1, (N, R))