Skip to main content

Posts

Random chord on circle

Problem:  Given a circle of radius 1, pick a chord at random. What is the chance that the length of the chord is less than the radius? Solution: Depending on how you pick it at random, the probability can be different! 1. If you pick it by randomly choosing 2 points on the circle's circumference, then the chance would be 1/3. 2. Every chord has a midpoint which is also a perpendicular bisector. If we pick this midpoint randomly within the circle, its chord length will be less than radius as long as it is outside of a smaller circle with radius $\frac{\sqrt{3}}{2}$. So the chance is 1/4 based on the ratio of area. 3. From the centre, randomly choose a radial direction and randomly pick a point along this radius, then draw a radially perpendicular line through this point, we'll get a chord. Then the chance would be \( 1 - \frac{\sqrt{3}}{2} \). Surprising, huh. In fact, you can compute the distribution of the chord length given the picking method. Is there a way to pick a chord ...

Coin toss game

Problem You and your friend play a game involving coin-flips. Each time the coin lands head, your friend pays you $ 1. But each time the coin lands tail, you pay your friend $ 1. The game goes on until either you win $ 100 or you lose $ 50. What is the probability of you winning? Solution 3 solutions, two of them are algebraic, one of them is argumentative. Algebraic Solution 1 Let \( p_i \) be the probability of winning $ 100 given that we already accumulated \( i \) dollars (can be negative, meaning we are losing money). Then we have \( p_i = \frac{1}{2} p_{i-1} + \frac{1}{2} p_{i+1} \), with special value \( p_{100} = 1 \) and \( p_{-50} = 0 \). It can be shown that \( p_i = \frac{i + 50}{150} \) the only solution that satisfies the system of linear equations. This approach can be extended to a more general problem: what is the probability of winning if we stop at either winning $n or losing $m? It should be \( \frac{m}{n+m} \). Algebraic Solution 2 This approach is inspired by the ...

J595 Mathematical Reflection

J595 Mathematical Reflection  \(\sqrt[3]{(x-1)^2}  - \sqrt[3]{2(x-5)^2} + \sqrt[3]{(x-7)^2} = \sqrt[3]{4x} \) By Titu Adreescu. My Solution (potentially wrong): Let \(A = \sqrt[3]{(x-1)^2}\) , \(B = \sqrt[3]{2(x-5)^2}\), \(C = \sqrt[3]{(x-7)^2} \), \(D = \sqrt[3]{4x}\). Hence we have \(A + C = B + D\). Notice that \(A^3 + C^3 = B^3 + D^3 \). Also notice that \( (A+C)^3 = (B+D)^3\) yields \( AC = BD \). Also by factoring out \(A^3 + C^3 = (A+C)(A^2-AC-C^2)\) and doing the same for \(B^3+D^3\) gives us \(A^2 + C^2 = B^2 + D^2\). Lemma 1 : \((A^3 - C^3)^2 = (B^3 - D^3)^2\). Proof: Note that \((A^3+C^3)^2 - (A^3-C^3)^2 = 4A^3C^3 = 4B^3D^3 = (B^3+D^3)^2 - (B^3-D^3)^2\) and the conclusion follows. \( \square \) Using Lemma 1 we get \( ( (x-1)^2 - (x-7)^2)^2 = (2(x-5)^2 - 4x)^2\) and solving for x gives us \( x = (9 \pm 4\sqrt{2}) , (3 \pm 2\sqrt{2}) \). \(\square\)

Proving error bound of Simpson's rule

I feel like writing about some techniques I found online on how people prove the error bound of Simpson's rule for numerical integration. The Simpson's rule: \( \int_a^b f(x) dx \) can be approximated as \(\frac{b-a}{6}(f(a) + 4 f(\frac{a+b}{2}) + f(b))\). You can find more info about this rule on Wikipedia. The topic of today is: how do you prove the error bound for the Simpson's rule, which is given by: \[ -\frac{1}{90} \left( \frac{a-b}{2} \right)^5 f^{(4)}(c) \] for some constant \(c\). And I think this is the best proof I have found out there, which might probably be the standard treatment of proving such error bounds:  https://math.stackexchange.com/questions/1759326/proving-error-bound-on-simpsons-rule-numerical-integration Since the answer there is quite succinct, here I'm going to expand it for my own understanding and future reference. Also, something that I found quite interesting, turns out MVT is quite useful in coming up with error bounds such as this. I w...

Chi-Squared Distribution Proof (Elementary)

 Here I'll provide a (potentially wrong) proof for the pdf of chi-squared Distribution. The proof will be elementary, i.e. it doesn't use sophisticated mechanisms or deep results unless truly necessary. Hence the proof might be rather long. Also, I don't use standard notations, so it might be painful to some eyes. Additionally, notations might not even be consistent, so it might also cause motion sickness. Definition of Chi Squared Distribution: Given \( X_1, X_2, \cdots, X_k  \) drawn independently from standard normal distribution \( N(0, 1) \), then the random variable \( Y = X_1^2 + X_2^2 + \cdots + X_k^2 \) follows the chi-squared distribution with k degrees of freedom. This distribution naturally arises when we want to study the distribution of the sample variance. The distribution itself is going to be useful later on for defining t-distribution... Ok, I'm not good at explaining what motivates the use of something, but I guess the Wikipedia page does a better job...

p - p^2-2 / p+2