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

Book 3.3.1: Not very clear what we are doing #1530

Open
dimitry-ishenko opened this issue Apr 16, 2024 · 1 comment
Open

Book 3.3.1: Not very clear what we are doing #1530

dimitry-ishenko opened this issue Apr 16, 2024 · 1 comment
Milestone

Comments

@dimitry-ishenko
Copy link

dimitry-ishenko commented Apr 16, 2024

Chapter 3, at the very beginning, states that we can use Monte-Carlo method to compute area of a circle with radius 1.

Chapter 3.1 tries to expound on that, but does it in a somewhat haphazard way. There are several proofs that tie the expected value to the Monte-Carlo method and the area under the curve (AUC), but there is no clear explanation as to why we need the expected value and how it all ties together.

My understanding of the chapter is this:

What we are trying to say is that we can use Monte-Carlo method to compute AUC of an arbitrary function using the expected value.

First, we can estimate the expected value of a function using Monte-Carlo method:

$$ E[f(x') | a \leq x' \leq b] \approx \frac 1 N \sum_{i=0}^{N-1} f(x_i) $$

At the same time, we've proven that:

$$ E[f(x') | a \leq x' \leq b] = \frac{1}{b - a} \int_{a}^{b} f(x) dx $$

And, since we know that:

$$ area(f(x), a, b) = \int_{a}^{b} f(x) dx $$

we can use Monte-Carlo method to estimate AUC of an arbitrary function $f$:

$$ area(f(x), a, b) = (b - a) \cdot E[f(x') | a \leq x' \leq b] $$

$$ area(f(x), a, b) \approx \frac{b - a}{N} \sum_{i=0}^{N-1} f(x_i) $$

QED

@hollasch
Copy link
Collaborator

Moving into the v4.0.0 milestone for consideration. We may or may not punt this for the actual v4.0.0 release, depending on our progress.

@hollasch hollasch added this to the v4.0.0 milestone Apr 16, 2024
@hollasch hollasch changed the title [Book 3, Chapter 3.1] Not very clear what we are doing Book 3.3.1: Not very clear what we are doing Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants