The numerical simulation is NOT as easy as you think! - Average distance #2
Mathemaniac Mathemaniac
218K subscribers
52,875 views
0

 Published On Jan 26, 2021

Continuing from part 1 (intro), we conduct a numerical simulation to calculate the average distance between two points in a unit disc. It turns out that the simulation is not as straightforward as you previously thought - it requires a bit of tweaking to sample points in the unit disc correctly.

There will be concepts including inverse transform sampling, t-distribution, and t-tests in the video, with inverse transform sampling having a more detailed explanation, because it is a considerably simpler concept which doesn't require too much prior knowledge. There is also a passing mention of the Box-Muller transform, which is used as an example of the pitfall of the inverse transform sampling - even though it works for all distributions, sometimes it isn't computationally efficient.

Even though this problem "highlights the unity and utility of the undergraduate mathematics curriculum" (from the paper below), I would assume you know nothing, so don't worry if you are not in university / have a degree in mathematics! If you are in college / university, hopefully the first few videos can be a nice revision and application of the concepts, and possibly a new perspective on the concepts.

The paper that I am following (very readable, for an undergraduate at least):
https://www.tandfonline.com/doi/abs/1...

I do notice that MindYourDecisions made a similar video (   • VERY HARD Puzzle: What Is The Distanc...   ) a few years ago but for a unit square instead. I still make this video series because (1) the unit disc version is much harder to tackle in the sense that we are not even attempting to evaluate the integral, and (2) Presh's video seemed to pull pdf's and Jacobian out of nowhere, which might be confusing to people who have not gone to college to study mathematics, and genuinely quite a different level of difficulty from his other videos, so I am going to actually explain what those are.

Thank you so much for the overwhelming support for the video about the Dream Minecraft speedrun cheating drama! Hopefully this channel makes you like mathematics a bit more!

*CORRECTION*
6:06 I said F^(-1)(Y) less than r, but actually should be x, as said on the screen, because my script has been revised.

8:11 I mean sample size not the number of samples.

*SLIGHT CAVEAT*
Technically, we should consider F(x) to be the probability that X smaller than or equal to x, because this will be different if the distribution does not have a well-defined probability density. In those cases, the inverse of F is not as straightforward, but we can still define the inverse. See the inverse transform sampling method Wikipedia page below.

I might not have stressed enough, but it is shown on the screen, that in the general case, Y is a random number generator from 0 to 1. The range here is important because this will allow us to say that the probability that Y is less than or equal to F(x) is exactly F(x).

*RESOURCES FOR MORE DETAILS*

Numerical simulation data:
https://docs.google.com/spreadsheets/...

More about sampling methods described:
https://en.wikipedia.org/wiki/Inverse...
https://en.wikipedia.org/wiki/Box%E2%...
https://en.wikipedia.org/wiki/Ziggura... (an alternative algorithm for sampling a normally distributed variable)

Single-sample and unpaired two-sample t-tests:
   • Test Statistics: Crash Course Statist...  
Single-sample t-test (more detailed):
   • Statistics 101: Single Sample Hypothe...  
(or consult any statistics textbook!)

Crash Course statistics playlist:
   • Crash Course Statistics Preview  

Other than commenting on the video, you are very welcome to fill in a Google form linked below, which helps me make better videos by catering for your math levels:
https://forms.gle/QJ29hocF9uQAyZyH6

If you want to know more interesting Mathematics, stay tuned for the next video!

SUBSCRIBE and see you in the next video!

If you are wondering how I made all these videos, even though it is stylistically similar to 3Blue1Brown, I don't use his animation engine Manim, but I will probably reveal how I did it in a potential subscriber milestone, so do subscribe!

Social media:

Facebook:   / mathemaniacyt  
Instagram:   / _mathemaniac_  
Twitter:   / mathemaniacyt  
Patreon:   / mathemaniac   (support if you want to and can afford to!)

For my contact email, check my About page on a PC.

See you next time!

show more

Share/Embed