Google
 
Web unafbapune.blogspot.com

Friday, December 28, 2018

 

How to make Latex editing work in vscode/OSX

1. Download and install TexStudio (texstudio-2.12.14-osx.dmg)
2. Download and install mactex (mactex-20180417.pkg)
3. Install extension LaTeX Workshop in Visual Studio Code

Open any .tex document.  Preview in vscode may not work, but once I get it compiled and displayed (as pdf) in TexStudio, the preview in vscode started to work, and the pdf gets updated everytime the Latex document is saved.

Tuesday, December 11, 2018

 

Why the way standard normal table is used works?

Ever wonder why the way we normalize a value for looking up the standard normal table works?

For example, suppose we know a random variable \(X\) has a normal distribution with mean \(\mu\) and standard deviation \(\sigma\), and we want to find \(\mathbb{P}(X \le L)\).

As usual, the procedure is to normalize the value \(L\) into \(\displaystyle M = \frac{L - \mu}{\sigma}\) and then look up \(M\) from the standard normal table. This works. But why?

Technically the reason is simple. It's just a change of variable in the underlying integral.

How? Remember \(\mathbb{P}(X \le L)\) is the cumulative distribution function of the normal distribution?

In particular, by definition \[\begin{aligned} \mathbb{P}(X \le L) &= \frac{1}{\sqrt{2\pi}\sigma} \int_{-\infty}^{L} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \, dx \\ \end{aligned}\] Let \(\displaystyle y = \frac{x-\mu}{\sigma}\) and \(\displaystyle M = \frac{L-\mu}{\sigma}\) \[\begin{aligned} \frac{dy}{dx} &= \frac{1}{\sigma} \\ dy &= \frac{dx}{\sigma} \\ \end{aligned}\] Substituting variable with \(y\), which leads to the necessity of adjusting the bound with \(M\), we turn the above integral into: \[\begin{aligned} \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{M} e^{-\frac{y^2}{2}} \, dy \\ \end{aligned}\] but that's equivalent to \(\mathbb{P}(Y \le M)\) under the standard normal distribution! That's why it works.


This page is powered by Blogger. Isn't yours?