@mathemaniac
  @mathemaniac
Mathemaniac | The numerical simulation is NOT as easy as you think! - Average distance #2 @mathemaniac | Uploaded 3 years ago | Updated 2 hours ago
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):
tandfonline.com/doi/abs/10.1080/07468342.1997.11973860

I do notice that MindYourDecisions made a similar video (youtube.com/watch?v=i4VqXRRXi68 ) 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:
docs.google.com/spreadsheets/d/1ltcLYBESXmATluMYh_lUl2YUXctDNNcxI4lknqRhllY/edit?usp=sharing

More about sampling methods described:
en.wikipedia.org/wiki/Inverse_transform_sampling
en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
en.wikipedia.org/wiki/Ziggurat_algorithm (an alternative algorithm for sampling a normally distributed variable)

Single-sample and unpaired two-sample t-tests:
youtube.com/watch?v=QZ7kgmhdIwA
Single-sample t-test (more detailed):
youtube.com/watch?v=NQWZefn41VY
(or consult any statistics textbook!)

Crash Course statistics playlist:
youtube.com/watch?v=zouPoc49xbk&list=PL8dPuuaLjXtNM_Y-bUAhblSAdWRnmBUcr&index=1

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: facebook.com/mathemaniacyt
Instagram: instagram.com/_mathemaniac_
Twitter: twitter.com/mathemaniacyt
Patreon: patreon.com/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!
The numerical simulation is NOT as easy as you think! - Average distance #2Algebra vs Geometry in Trigonometry | DIw/oI #3Chapter 1: Symmetries, Groups and Actions | Essence of Group TheoryComplex integration, Cauchy and residue theorems | Essence of Complex Analysis #6What do Fibonacci numbers have to do with combinatorics?Why study Lie theory? | Lie groups, algebras, brackets #115-year-old did mathematical research?! What was my thinking process back then?Why care about complex analysis? | Essence of complex analysis #14 DIFFERENT ways to prove Herons formulaChapter 5: Quotient groups | Essence of Group TheoryThe 5 ways to visualize complex functions | Essence of complex analysis #3Everything you need to know about operations in modular arithmetic

The numerical simulation is NOT as easy as you think! - Average distance #2 @mathemaniac

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER