Skip to main content

Posts

Showing posts from April, 2022

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