Skip to content

Commit 6e967af

Browse files
oyamadHumphreyYang
andauthored
[two_auctions] Fix conditional expectation simulation (#652)
* [two_auctions] Fix conditional expectation simulation * minor edit --------- Co-authored-by: Humphrey Yang <u6474961@anu.edu.au>
1 parent 774202b commit 6e967af

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lectures/two_auctions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,14 @@ def evaluate_largest(v_hat, array, order=1):
424424
425425
We can check the accuracy of our `evaluate_largest` method by comparing it with an analytical solution.
426426
427-
We find that despite small discrepancy, the evaluate_largest method functions well.
428-
429-
Furthermore, if we take a very large number of auctions, say 1 million, the discrepancy disappears.
427+
We find that the `evaluate_largest` method functions well
430428
431429
```{code-cell} ipython3
432-
v_grid = np.linspace(0.3,1,8)
433-
bid_analytical = b_star(v_grid,N)
430+
v_grid = np.linspace(0.3, 1, 8)
431+
bid_analytical = b_star(v_grid, N)
432+
433+
# Redraw valuations
434+
v = np.random.uniform(0, 1, (N, R))
434435
bid_simulated = [evaluate_largest(ii, v) for ii in v_grid]
435436
436437
fig, ax = plt.subplots(figsize=(6, 4))

0 commit comments

Comments
 (0)