Lecture 13: Normal distribution

피망이·2023년 12월 8일
0
post-thumbnail

Universality of Uniform

  • Let F be a continuous, strictly increasing CDF

    • Then X=F1FX=F^{-1} \sim F if U Unif(0,1)U~Unif(0, 1)

      • It used in Diffusion model ans Simulating some distribution
    • Also: if XFX \sim F, Then F(X)Unif(0,1)F(X) \sim Unif(0, 1)

      • F(X)=P(Xx)F(X) = P(X \le x),

        F(x)=1exF(x) = 1-e^{-x}, x>0x>0 F(X)=1eX\Rightarrow F(X) = 1-e^{-X}

  • Example

    • Let F(x)=1exF(x) = 1-e^{-x}, x>0x>0 (Expo(1)), UUnif(0,1)U \sim Unif(0, 1)

    • Simulate XFX \sim F, F1(u)=ln(1u)F1(u)=ln(1u)FF^{-1}(u) = -ln(1-u) \Rightarrow F^{-1}(u) = -ln(1-u) \sim F

      • 1uUnif(0,1)1-u \sim Unif(0, 1) (symmetry of Unif)

      • a+buUnif(a,a+b)a+bu \sim Unif(a, a+b) Unif on same interval (linear transform of Unif)

        • non-linear usually → non-Unif !

Indep. of r.v.s X1,...,XnX_1, ... , X_n

  • Defn in Continuous case:

    • X1,...,XnX_1, ... , X_n indep if P(X1x1,...Xnxn)P(X_1 \le x_1, ... X_n \le x_n)

      =P(X1x1)...P(Xnxn)= P(X_1 \le x_1) ... P(X_n \le x_n) for all x1,...xnx_1, ... x_n

  • Defn in Discrete case:

    • Joint PMF P(X1=x1,...Xn=xn)P(X_1=x_1, ... X_n=x_n)

      =P(X1=x1)...P(Xn=xn)= P(X_1=x_1) ... P(X_n = x_n) for all x1,...xnx_1, ... x_n

  • Example

    • X1,X2Bern(12)X_1, X_2 \sim Bern(\displaystyle \frac{1}{2}) i.i.d, X3={1,if  X1=X20,otherwiseX_3 = \begin{cases} 1, & {if \; X_1=X_2} \\ 0, & {otherwise} \end{cases}

    • These are pairwise indep, not indep.

      • (X1X_1, X2X_2), (X2X_2, X3X_3), (X1X_1, X3X_3) is indep, but not (X1X_1, X2X_2, X3X_3) indep!

      • After determined X1X_1 and X2X_2, and possible to know X3X_3

Normal distribution (By Gauss)

Central Limit Thm: Sum of a lot of i.i.d. r.v.s looks Normal

  • N(0,1)N(0, 1) has PDF f(z)=cez2/2f(z) = ce^{-z^2/2}, c is normalizing const.

  • Intergal function ff

    • ez2/2dz\int_{-∞}^{∞} e^{-z^2/2} dz → 부정적분이므로 닫힌 형태로의 적분이 불가능!

    • ez2/2dzez2/2dz\int_{-∞}^{∞} e^{-z^2/2} dz \int_{-∞}^{∞} e^{-z^2/2} dz

      =ex2/2dxey2/2dy= \int_{-∞}^{∞} e^{-x^2/2} dx \int_{-∞}^{∞} e^{-y^2/2} dy

      =e(x+y)2/2dxdy= \int_{-∞}^{∞} \int_{-∞}^{∞} e^{-(x+y)^2/2} dxdy

      =02π0er2/2rdrdθ= \int_{0}^{2 \pi} \int_{0}^{∞} e^{-r^2/2} r dr d \theta, r2=x2+y2r^2 = x^2 +y^2 (rdrdθr dr d \theta is Jacobian matrix)

    • Let u=r2/2u=r^2/2 & du=rdrdu=rdr

      =02π(0eudu)dθ=02π(1)dθ=2π= \int_{0}^{2 \pi} (\int_{0}^{∞} e^{-u} du) d \theta = \int_{0}^{2 \pi} (1) d \theta = 2 \pi

      ez2/2dz=2π\int_{-∞}^{∞} e^{-z^2/2} dz = \sqrt{2 \pi}

  • Normalizing constant c = 12π\displaystyle \frac{1}{\sqrt{2 \pi}}

Expectation & Variance

  • ZN(0,1)Z \sim N(0, 1), EZ=E(Z)=12πzez2/2=0EZ = E(Z) = \displaystyle \frac{1}{\sqrt{2 \pi}} \int_{-∞}^{∞} ze^{-z^2/2} = 0 by symmetry

    • if g(x)g(x) is an odd fn, i.e. g(x)=g(x)g(-x) = -g(x) then aag(x)dx=0\int_{-a}^{a} g(x)dx = 0

  • $Var(Z) = E(Z^2) - (EZ)^2 = E(Z^2)

    • 12πz2ez2/2dz\displaystyle \frac{1}{\sqrt{2 \pi}} \int_{-∞}^{∞} z^2 e^{-z^2/2} dz <even fn>

      =212π0z2ez2/2dz= 2 \displaystyle \frac{1}{\sqrt{2 \pi}} \int_{0}^{∞} z^2 e^{-z^2/2} dz

      =212π0zzez2/2dz= 2 \displaystyle \frac{1}{\sqrt{2 \pi}} \int_{0}^{∞} zz e^{-z^2/2} dz

    • Let u=zu=z & du=dzdu=dz, v=ez2/2dzv= -e^{-z^2/2} dz & dv=zez2/2dv = z e^{-z^2/2}

      =212π((uv)0+0ez2/2dz)=1= 2 \displaystyle \frac{1}{\sqrt{2 \pi}} \displaystyle((uv)\biggr|_{0}^{∞} + \int_{0}^{∞} e^{-z^2/2} dz) = 1

      • uv=zez2/2dz=01=0uv = ze^{-z^2/2} dz = 0•1 = 0, 0ez2/2dz=2π\int_{0}^{∞} e^{-z^2/2} dz = \sqrt{2 \pi}

Notation

  • \Phi is the standard Normal CDF

    • Φ(z)=12πzet2/2dt\Phi(z) = \displaystyle \frac{1}{\sqrt{2 \pi}} \int_{-∞}^{z} e^{-t^2/2} dt

    • Φ(z)=1Φ(z)\Phi(-z) = 1 - \Phi(z) by symmetry


profile
물리학 전공자의 프로그래밍 도전기

0개의 댓글