For anyone interested in coding it up, a simplified scenario is (to guarantee closeness to the line and to ignore the mirror symmetry) to take a uniformly random x from [0,1) and theta from [0,pi/2), then you count a success if x + sin(theta) >= 1. The probability of success is still 2/pi. Note that sin and cos are interchangeable here.
@lexinwonderland5741 Жыл бұрын
Very unrelated but nice haircut dude! Whatever your latest look is looks very clean and sharp
@DrTrefor Жыл бұрын
Ha thank you! That is my wife’s amazing handiwork:D
@johnchessant3012 Жыл бұрын
Fun fact: The same formula holds even when the needle isn't a straight line, except it gives the _expected number_ of crossings; the intuition being that if your "needle" has the same length but is really curled up, it will be less likely to intersect a line but when it does, it will usually intersect it more than once.
@DrDeuteron Жыл бұрын
so do you count the number of crossings? That's going to jack up my error estimate, as it's now a Poisson process.
@zeev549 Жыл бұрын
There is a simpler random way to calculate pi by throwing arrows at a circle bounded by a square, and calculating pi from the ratio of the arrows inside the circle. Not only it's much simpler, simulating it does not require usage of pi or trigo functions - just random numbers, substruction and multiplication
@jeremytimothy3646 Жыл бұрын
Another wonderful video from my favorite math tutor. You're one of the reasons i fell in love with math and now i study it for the beauty not just the marks. Major thanks dr trefor
@DrTrefor Жыл бұрын
Wow, thank you!
@leif1075 Жыл бұрын
@DrTrefor Yes thanks for sharing Dr Trefor. I really hope you can respond to my other comment when you can. Thanks very much.
@mtaur4113 Жыл бұрын
At the start of the video, the second = is also an "approximately", because you swap out a mathematical probability for its observed frequency. It's also probably not so easy to guarantee that the angles and positions are uniformly distributed on the range, but sample size is probably a much more relevant concern for a trial by hand anyway.
@Javy_Chand Жыл бұрын
That is some hilarious T-shirt! "sinx = opposite/hipopotamus"
@DrTrefor Жыл бұрын
haha I love it:D
@DrDeuteron Жыл бұрын
Since one toothpick is a Bernoulli process, you get a binomial distribution, and the square of the uncertainty goes as P(1-P)/N.
@Ninja20704 Жыл бұрын
Theres another pi formula which uses arctan, similar to the 1-1/3+1/5-... one. It is pi = 16arctan(1/5)-4arctan(1/239), and was used to calculate pi to 527 digits, which is the world record for calculating pi by hand. Could you maybe do a video on a geometric proof of this? Because I have no idea where it comes from.
@DrTrefor Жыл бұрын
I believe that family is all coming from the Taylor series for arctan
@General12th Жыл бұрын
Hi Dr. Bazett! Very cool!
@kodychoi6984 Жыл бұрын
The integral of arccos(x) from 0 to 1 is the same as the integral of cos(x) from 0 to pi/2, which makes the calculation much easier. (Convince yourself graphically)
@DrTrefor Жыл бұрын
Absolutely!
@vortex6132 Жыл бұрын
Hey man! This was a really nice simple and elegant proof. Side note: the chapter of "deriving the formula" was spelt as driving the formula, otherwise, great vid!
@schizoframia4874 Жыл бұрын
That is very cool
@GeoffryGifari Жыл бұрын
The formula uses probability. how can we express this as a counting problem? The number of toothpicks that intersect a line vs the total number of toothpicks? and the lined paper needs to be large enough so that every toothpick lies between two lines right?
@DrTrefor Жыл бұрын
Exactly!
@GeoffryGifari Жыл бұрын
Is this one of the ways of using monte carlo method to approximate π?
@_abdul Жыл бұрын
Pi is Cool and all but I can't take my eyes away from that cute Hippopotamus.
@DrTrefor Жыл бұрын
lol:D
@erawanpencil Жыл бұрын
If you toss as many toothpicks as there are lines on the page is there some connection with 1/e ? I keep trying to find ways to visualize the constant e but so far I've been told a catenary arch or a hanging chain are the only things that sorta get close.
@DrTrefor Жыл бұрын
I don’t think so, the rotations of the toothpicks make it reasonable that pi is involved but I can’t see an e
@carly09et Жыл бұрын
Ah I was trying to recall this to prove the quantum version of pi - quantum length and angle from measurement 'noise'
@nuthakantirohan46852 ай бұрын
i did the integral without substituting l/2=1 and i am getting -l/pi what to do?
@billcook4768 Жыл бұрын
Fun stuff, but there’s an issue with your computer simulation. I suspect that pi exists somewhere in your code (or in the machine code for one of the functions you use). Could someone program a needle dropping simulation that calculates pi without already knowing pi?
@DrTrefor Жыл бұрын
The pi is purely emergent here. The simulation works by randomly choosing an x and y coordinate of midpoints from the square, randomly choosing a rotation angle, and then counts them up.
@FredFred-wy9jw Жыл бұрын
I liked your analysis of this method to “compute” pi …. But the glib comment about just running a computer a million samples is fraught with danger. It’s very easy with this type of problem to run into problems with the random number generator used … first you need random pairs of numbers (x and theta), something an a lot of pseudo random number generators are very bad at, second it can be fairly easy to exceed the actual length of the generator is capable of generating i.e. its period. Many modern tools and computer libraries have generators that greatly reduce these issues and very many do not. A fun exercise is to calculate the convergence rate and the compare the analytical results to a computer experiment. The convergence rate is quite slow no surprise, but often the computer results stops improving after a surprising small number of trials.
@andrewharrison8436 Жыл бұрын
It's lovely maths, but lacks a certain practicality. Modelling it as a random walk suggest that the error should be 1/sqrt(n) so for 3 decimal places something like 1,000,000 throws would be needed. ... but we are in the company of mathematicians, why worry about such mundane issues.
@davethesid8960 Жыл бұрын
Before I liked, you'd got 314 likes, wow!
@DrTrefor Жыл бұрын
Haha that’s awesome
@MathsMadeSimple101 Жыл бұрын
Maths is life
@c.f.3503 Жыл бұрын
First
@DrTrefor Жыл бұрын
Wow you are fast!
@drsteel87018 ай бұрын
You are such an amazing teacher. I really learn a lot from your lectures. Do you have an IG or Facebook?