...

/

More on Fixing Random

More on Fixing Random

In this lesson, we sum up some of the content we have covered in this course and provide more food for thought regarding fixing random.

Summing Up

Let’s sum up the last few lessons:

Suppose we have a distribution of doubles, p, and a function f from double to double. We often want to answer the question “what is the average value of f when it is given samples from p?” This quantity is called the expected value.

The obvious (or “naive”) way to do it is: take a bunch of samples, evaluate the function on those samples, take the average. Easy! However, this can lead to problems if there are “black swans”: values that are rarely sampled, but massively affect the value of the average when running through f. We want to get a good estimate without having to increase the number of samples in our average massively.

Techniques to Estimate Expected Value:

We developed two techniques to estimate the expected value:

Abandon Sampling and Perform Numerical Integral Calculus

  • Use quadrature to compute two areas: the area under f(x) * p.Weight(x) and the area under
...