Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Effective Sample Size to Chapter 7 #33

Closed
lkruse opened this issue Feb 3, 2025 · 2 comments
Closed

Adding Effective Sample Size to Chapter 7 #33

lkruse opened this issue Feb 3, 2025 · 2 comments

Comments

@lkruse
Copy link

lkruse commented Feb 3, 2025

What textbook version are you using?

⚠️ Please fill out: <2025-01-27 19:51:32-08:0>

Suggestion

Can we add effective sample size as a metric to Chapter 7? I think it would be useful in the discussion on how importance sampling is more efficient than direct Monte Carl.

@hdelecki has some Julia code which could be adopted for the book:

function ess(weights)
	# Compute the effective sample size
	weights = weights ./ sum(weights)
	return 1 / sum(weights .^ 2)
end
@lkruse
Copy link
Author

lkruse commented Feb 3, 2025

@smkatz12
Copy link

Thanks for suggesting this, @lkruse @hdelecki! We just added an exercise about effective sample size that we will reference from the text. Check out exercise 7.5 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants