AboutPosts
AboutResumeGallery
ToolsAdvanced SearchGPT-4o Prompts
ProjectsBB EnhancedDORM WIFIS-R-H-C

Review of Probability, Random Variables, and Distributions

SCU

This note is a backup from Notion.

Contents

  • Lecture 8
    • Definition of Variance
    • Covariance
    • Correlation coefficient
  • Lecture 9
    • Bernoulli Distribution
    • Binomial Distribution
    • Multinomial Distribution
  • Lecture 10
    • Hypergeometric Distribution
    • Multivariate Hypergeometric
    • Geometric Distribution
    • Negative Binomial Distribution
    • Poisson Distribution
  • Lecture 11
    • Uniform Distribution
    • Exponential Distribution
    • Gamma Distribution
    • Gamma Function
    • Normal Distribution
    • Standard Normal
  • Lecture 12
    • Central Limit Theorem
  • Lecture 13
    • Estimation Methods
  • Lecture 14
    • Unbiasedness
    • Efficiency
    • Mean Squared Error(MSE)
  • Lecture 15
    • Chi-Squared Distribution
    • t-Distribution
    • F-Distribution
    • Sampling Distribution Theorems
  • Lecture 16
    • CI under Normal Distribution
    • Sampling Distribution under Two Populations
  • Sample variance

Lecture 8

Definition of Variance

  • Def: The variance of X, Var(X)X,\ Var(X)X, Var(X) is:

    • If XXX is discrete

      σ2=Var(X)=E((X−μx)2)=∑x(x−μx)2f(x)\sigma^2=Var(X)=E((X-\mu_x)^2)=\sum_x(x-\mu_x)^2f(x)σ2=Var(X)=E((X−μx​)2)=x∑​(x−μx​)2f(x)
    • If XXX is continuous

      σ2=Var(X)=E((X−μx)2)=∫−∞+∞(x−μx)2f(x)dx\sigma^2=Var(X)=E((X-\mu_x)^2)=\int_{-\infty}^{+\infty}(x-\mu_x)^2f(x)dxσ2=Var(X)=E((X−μx​)2)=∫−∞+∞​(x−μx​)2f(x)dx
    • σ\sigmaσ is called the standard deviation

    • σ2=E((X−μx)2)=E(X2−2μxX+μx2)=E(X2)−2μxE(X)+μx2=E(X2)−E2(X)\sigma^2=E((X-\mu_x)^2)=E(X^2-2\mu_xX+\mu_x^2)=E(X^2)-2\mu_xE(X)+\mu_x^2=E(X^2)-E^2(X)σ2=E((X−μx​)2)=E(X2−2μx​X+μx2​)=E(X2)−2μx​E(X)+μx2​=E(X2)−E2(X)

  • Properties

    1. ∀X, Var(X)≥0, Var(C)=0\forall X,\ Var(X)\ge0,\ Var(C)=0∀X, Var(X)≥0, Var(C)=0

      Var(X)=0⇔P(X=C)=1Var(X)=0\Leftrightarrow P(X=C)=1Var(X)=0⇔P(X=C)=1

    2. Var(CX)=C2Var(X)Var(CX)=C^2Var(X)Var(CX)=C2Var(X)

    3. If XXX and YYY are independent, then

      E(XY)=E(X)E(Y)E(XY)=E(X)E(Y)E(XY)=E(X)E(Y)

      Var(X±Y)=Var(X)+Var(Y)Var(X\pm Y)=Var(X)+Var(Y)Var(X±Y)=Var(X)+Var(Y)

    4. If X1,X2...XnX_1,X_2...X_nX1​,X2​...Xn​ are mutually independent, Var(∑i=1nCiXi+b)=∑i=1nCi2Var(Xi)Var(\sum_{i=1}^nC_iX_i+b)=\sum_{i=1}^{n}C_i^2Var(X_i)Var(∑i=1n​Ci​Xi​+b)=∑i=1n​Ci2​Var(Xi​)

Covariance

  • Def: the covariance of XXX and YYY is

    σXY=Cov(X,Y)=E[(X−μx)(Y−μy)]\sigma_{XY}=Cov(X,Y)=E[(X-\mu_x)(Y-\mu_y)]σXY​=Cov(X,Y)=E[(X−μx​)(Y−μy​)]
  • σXY=Cov(X,Y)=E(XY)−E(X)E(Y)\sigma_{XY}=Cov(X,Y)=E(XY)-E(X)E(Y)σXY​=Cov(X,Y)=E(XY)−E(X)E(Y)

  • If XXX and YYY are independent, Cov(X,Y)=0Cov(X,Y)=0Cov(X,Y)=0

  • The inverse direction may not be true!

    Var(X±Y)=Var(X)+Var(Y)±2Cov(X,Y)Var(X\pm Y)=Var(X)+Var(Y)\pm 2Cov(X,Y)Var(X±Y)=Var(X)+Var(Y)±2Cov(X,Y)

Correlation coefficient

  • Def: The correlation coefficient of XXX and YYY is

    ρXY=σXYσYσY\rho_{XY}=\frac{\sigma_{XY} }{\sigma_Y\sigma_Y}ρXY​=σY​σY​σXY​​
  • If XXX and YYY are independent, ρXY=0\rho_{XY}=0ρXY​=0

  • Properties:

    1. ∀X,Y ∣ρXY≤1∣\forall X,Y\ |\rho_{XY}\le1|∀X,Y ∣ρXY​≤1∣

      pf: use Var(Y−tX)≥0Var(Y-tX)\ge0Var(Y−tX)≥0

    2. ∣ρXY∣=1⇔∃a≠0, bs.t. P(Y=aX+b)=1|\rho_{XY}|=1\Leftrightarrow \exists a\ne0,\ b\\ s.t.\ P(Y=aX+b)=1∣ρXY​∣=1⇔∃a=0, bs.t. P(Y=aX+b)=1

    3. If ∣ρXY∣=1|\rho_{XY}|=1∣ρXY​∣=1, we call XXX and YYY are completely linear correlated

    4. If ρXY=0\rho_{XY}=0ρXY​=0, XXX and YYY are called uncorrelated, means there is not any "linear correlation" between XXX and YYY.

    5. independent ⟶\longrightarrow⟶ uncorrelated

  • ∣ρXY∣|\rho_{XY}|∣ρXY​∣ denote the strongness of linear correlation between XXX and YYY

  • ρXY>0\rho_{XY}\gt0ρXY​>0 means there is positive linear correlation between XXX and

    If XXX becomes larger, then YYY tends to become stronger

Lecture 9

Bernoulli Distribution

  • 0-1 distribution X∼B(1,p)X\sim B(1,p)X∼B(1,p)

    F(x)={0,x<01−p,0≤x<11,x≥1F(x)=\left\{ \begin{aligned} &0,&x\lt0\\&1-p,&0\le x\lt1\\&1,&x\ge1\end{aligned} \right.F(x)=⎩⎨⎧​​0,1−p,1,​x<00≤x<1x≥1​
  • E(X)=p, Var(X)=p−p2=pqE(X)=p,\ Var(X)=p-p^2=pqE(X)=p, Var(X)=p−p2=pq

  • Indicator A⊂S, IA(ω)={1,if ω∈A0,if ω∉AA\subset S,\ I_A(\omega)=\left \{ \begin{aligned}&1,&if\ \omega\in A\\&0,&if\ \omega\notin A\end{aligned}\right.A⊂S, IA​(ω)={​1,0,​if ω∈Aif ω∈/A​

  • It can be used everywhere

Binomial Distribution

  • Def: the number of success XXX in nnn Bernoulli trails X∼B(n,p)X\sim B(n,p)X∼B(n,p)
  • If n=1n=1n=1, it becomes Bernoulli distribution
  • pmfpmfpmf: f(x)=P(X=x)=b(x;n,p)=Cnxpxqn−x,x=0,1,...,nf(x)=P(X=x)=b(x;n,p)=C_n^xp^xq^{n-x},x=0,1,...,nf(x)=P(X=x)=b(x;n,p)=Cnx​pxqn−x,x=0,1,...,n
  • Binomial: ∑x=0nb(x;n,p)=∑x=0nCnxpxqn−x=(p+q)n=1\sum_{x=0}^nb(x;n,p)=\sum^{n}_{x=0}C_n^xp^xq^{n-x}=(p+q)^n=1∑x=0n​b(x;n,p)=∑x=0n​Cnx​pxqn−x=(p+q)n=1
  • E(X)=np,Var(X)=npqE(X)=np,Var(X)=npqE(X)=np,Var(X)=npq
    • hint: Xi={1,the i−th trail succeeds0,the i−th trail failsX_i=\left\{\begin{aligned} &1,&the\ i-th\ trail \ succeeds\\&0,&the\ i-th\ trail\ fails \end{aligned} \right.Xi​={​1,0,​the i−th trail succeedsthe i−th trail fails​
    • XiX_iXi​ are mutually independent Xi∼B(1,p), X=∑i=1nXiX_i\sim B(1,p),\ X=\sum_{i=1}^nX_iXi​∼B(1,p), X=∑i=1n​Xi​

Multinomial Distribution

  • Def: Multinomial experiments repeatedly: independent, kkk outcomes each time
  • DefL Multinomial distribution: the number of each outcomes in nnn trails
  • Joint pmfpmfpmf: f(x1,x2,...,xk;p1,p2,...,pk,n)=n!x1!x2!...xk!p1x1p2x2...pkxkf(x_1,x_2,...,x_k;p_1,p_2,...,p_k,n)=\frac{n!}{x_1!x_2!...x_k!}p_1^{x_1}p_2^{x_2}...p_k^{x_k}f(x1​,x2​,...,xk​;p1​,p2​,...,pk​,n)=x1​!x2​!...xk​!n!​p1x1​​p2x2​​...pkxk​​
  • Each marginal distribution is binomial

Lecture 10

Hypergeometric Distribution

  • Motivation: Sampling without replacement
  • Def: XXX the number of success
    1. nnn is selected from NNN terms without replacement;
    2. of NNN terms, kkk are success and N−kN-kN−k are failures.
X∼H(N,n,k)X\sim H(N,n,k)X∼H(N,n,k)
  • pmfpmfpmf:
f(x;N,n,k)=CknCn−xN−kCnN, max(0,n−(N−k))≤x≤min(n,k)f(x;N,n,k)=\frac{C_{k}^{n}C_{n-x}^{N-k} }{C_{n}^{N} }, \ max(0,n-(N-k))\le x\le min(n,k)f(x;N,n,k)=CnN​Ckn​Cn−xN−k​​, max(0,n−(N−k))≤x≤min(n,k)
  • Relationship to Binomial

    • Binomial is the limit case for hypergeometric when NNN approaches infinity
    • When NNN is larger enough(nN\frac nNNn​ is small): f(x;N,n,k)≈b(x;n,kN)f(x;N,n,k)\approx b(x;n,\frac kN)f(x;N,n,k)≈b(x;n,Nk​)
  • XXX is hypergeometric with N, n and kN,\ n\ and \ kN, n and k, then

    E(X)=nkNE(X)=n\frac kNE(X)=nNk​

    Var(X)=N−nN−1nkN(1−kN)Var(X)=\frac{N-n}{N-1}n\frac kN(1-\frac kN)Var(X)=N−1N−n​nNk​(1−Nk​)

Multivariate Hypergeometric

  • N terms be Lectureified into k kinds, select n randomly, number of each kind

    f(x1,x2,...,xk;a1,a2,...,ak,N,n)=Ca1x1Ca2x2...CakxkCNnf(x_1,x_2,...,x_k;a_1,a_2,...,a_k,N,n)=\frac{C_{a_1}^{x_1}C_{a_2}^{x_2}...C_{a_k}^{x_k} }{C_N^n}f(x1​,x2​,...,xk​;a1​,a2​,...,ak​,N,n)=CNn​Ca1​x1​​Ca2​x2​​...Cak​xk​​​
  • Each marginal is hypergeometric!

Geometric Distribution

  • Def: Do Bernoulli experiments until succeed, XXX the number of trails X∼G(p)X\sim G(p)X∼G(p)

  • pmf: g(x;p)=qx−1p,x=1,2,3...g(x;p)=q^{x-1}p,x=1,2,3...g(x;p)=qx−1p,x=1,2,3...

  • Mean E(X)E(X)E(X) and variance Var(X)Var(X)Var(X)

    E(X)=1p, Var(X)=qp2E(X)=\frac 1p,\ Var(X)=\frac{q}{p^2}E(X)=p1​, Var(X)=p2q​

Negative Binomial Distribution

  • Def: Do Bernoulli experiments until the k-th succeed, XXX the number of trails X∼NB(k,p)X\sim NB(k,p)X∼NB(k,p)

  • pmf:

    b∗(x;k,p)=Cx−1k−1qx−kpk, x=k,k+1,k+2,...b^*(x;k,p)=C_{x-1}^{k-1}q^{x-k}p^k,\ x=k,k+1,k+2,...b∗(x;k,p)=Cx−1k−1​qx−kpk, x=k,k+1,k+2,...

  • Mean E(X)E(X)E(X) and variance Var(X)Var(X)Var(X)

    E(X)=kp, Var(X)=kpp2E(X)=\frac kp,\ Var(X)=\frac{kp}{p^2}E(X)=pk​, Var(X)=p2kp​

Poisson Distribution

  • Def: number of occurring in a Poisson process

  • Derivation: Poisson theorem

    lim⁡n→∞Cnx(λn)x(1−λn)n−x=λxx!e−λ\lim_{n\to\infty}C_n^x(\frac \lambda n)^x (1-\frac \lambda n)^{n-x}=\frac{\lambda^x}{x!}e^{-\lambda}limn→∞​Cnx​(nλ​)x(1−nλ​)n−x=x!λx​e−λ

  • pmf:

    p(x;λ)=λxx!e−λ, x=0,1,2...p(x;\lambda)=\frac{\lambda^x}{x!}e^{-\lambda},\ x=0,1,2...p(x;λ)=x!λx​e−λ, x=0,1,2...

  • Expectation:

    X∼P(λ), E(X)=λ, Var(X)=λX\sim P(\lambda),\ E(X)=\lambda,\ Var(X)=\lambdaX∼P(λ), E(X)=λ, Var(X)=λ

  • Relationship to Binomial

    • Poisson distribution is the limit case of binomial when nnn approaches infinity while npnpnp is fixed
    • If n(n≥50)n(n\ge50)n(n≥50) is large while p(p≤0.1)p(p\le0.1)p(p≤0.1) is small, X∼B(n,p)≈P(np)X\sim B(n,p)\approx P(np)X∼B(n,p)≈P(np)

Lecture 11

Uniform Distribution

  • Def: XXX is called uniform distribution on [a,b][a,b][a,b] if its density satisfy: X∼U(a,b)X\sim U(a,b)X∼U(a,b)

    f(x)={1b−a,x∈[a,b]0,elsewheref(x)=\left\{\begin{aligned} &\frac{1}{b-a},&x\in[a,b]\\&0,&elsewhere\end{aligned}\right.f(x)=⎩⎨⎧​​b−a1​,0,​x∈[a,b]elsewhere​
  • cdf and probability

  • Expectations: E(X)=a+b2,Var(X)=(b−a)212E(X)=\frac{a+b}{2},Var(X)=\frac{(b-a)^2}{12}E(X)=2a+b​,Var(X)=12(b−a)2​

Exponential Distribution

  • Def: XXX is called exponential distribution if

    f(x)={1βe−xβ,x>00,x≤0f(x)=\left\{\begin{aligned} &\frac{1}{\beta}e^{-\frac{x}{\beta} },&x\gt0\\ & 0,&x\le0\end{aligned} \right.f(x)=⎩⎨⎧​​β1​e−βx​,0,​x>0x≤0​
  • cdf: F(x)={0,x≤01−e−xβ,x>0F(x)= \left\{\begin{aligned} &0,&x\le0\\ &1-e^{-\frac{x}{\beta} }, &x\gt0\end{aligned}\right.F(x)={​0,1−e−βx​,​x≤0x>0​

Gamma Distribution

Gamma Function

  • Def: Gamma function

    Γ(α)=∫0+∞xα−1e−xdx,α>0\Gamma(\alpha)=\int_{0}^{+\infty}x^{\alpha-1}e^{-x}dx,\alpha\gt0Γ(α)=∫0+∞​xα−1e−xdx,α>0
  • Properties:

    Γ(1)=1,Γ(0.5)=πΓ(α+1)=αΓ(α),Γ(n)=(n−1)!\Gamma(1)=1,\Gamma(0.5)=\sqrt \pi\\\Gamma(\alpha+1)=\alpha\Gamma(\alpha),\Gamma(n)=(n-1)!Γ(1)=1,Γ(0.5)=π​Γ(α+1)=αΓ(α),Γ(n)=(n−1)!

  • Def: the Gamma density is as following: X∼Γ(α,β)X\sim \Gamma(\alpha,\beta)X∼Γ(α,β)

    f(x)={1βαΓ(α)xα−1e−xβ,x>00,x≤0f(x)=\left\{\begin{aligned} &\frac{1}{\beta^\alpha\Gamma(\alpha)}x^{\alpha-1}e^{-\frac x\beta}, &x\gt0\\&0,&x\le0\end{aligned} \right.f(x)=⎩⎨⎧​​βαΓ(α)1​xα−1e−βx​,0,​x>0x≤0​

  • Exponential is special case of Gamma density X∼e(β)=Γ(1,β)X\sim e(\beta)=\Gamma(1,\beta)X∼e(β)=Γ(1,β)

  • Expectations:

    E(X)=αβ,Var(X)=αβ2E(X)=\alpha\beta,Var(X)=\alpha\beta^2E(X)=αβ,Var(X)=αβ2

    X∼e(β),E(X)=β,Var(X)=β2X\sim e(\beta),E(X)=\beta,Var(X)=\beta^2X∼e(β),E(X)=β,Var(X)=β2

Normal Distribution

Standard Normal

  • Def: XXX is called standard normal if density

    φ(x)=12πe−x22,x∈(−∞,+∞)\varphi(x)=\frac{1}{\sqrt{2\pi} }e^{-\frac{x^2}{2} },x\in(-\infty,+\infty)φ(x)=2π​1​e−2x2​,x∈(−∞,+∞)
  • The cdf can be found from tables

    Φ(x)=∫−∞xφ(t)dt=∫−∞x12πe−t22dt\Phi(x)=\int_{-\infty}^{x}\varphi(t)dt=\int_{-\infty}^{x}\frac{1}{\sqrt{2\pi} }e^{-\frac{t^2}{2} }dtΦ(x)=∫−∞x​φ(t)dt=∫−∞x​2π​1​e−2t2​dt

    Φ(0)=0.5,Φ(−x)=1−Φ(x)\Phi(0)=0.5,\Phi(-x)=1-\Phi(x)Φ(0)=0.5,Φ(−x)=1−Φ(x)

  • Expectations: if XXX is standard normal

    E(X)=0,Var(X)=1E(X)=0,Var(X)=1E(X)=0,Var(X)=1

    X∼N(0,1)X\sim N(0,1)X∼N(0,1)

  • Def: XXX is normal with parameter μ,σ2\mu,\sigma^2μ,σ2

    X∼N(μ,σ2)⇔X−μσ∼N(0,1)X\sim N(\mu,\sigma^2)\Leftrightarrow \frac{X-\mu}{\sigma}\sim N(0,1)X∼N(μ,σ2)⇔σX−μ​∼N(0,1)
  • The density of N(μ,σ2)N(\mu,\sigma^2)N(μ,σ2) is:

    F(x)=P(X≤x)=P(X−μσ≤x−μσ)=Φ(x−μσ)F(x)=P(X\le x)=P(\frac{X-\mu}{\sigma}\le\frac{x-\mu}{\sigma})=\Phi(\frac{x-\mu}{\sigma})F(x)=P(X≤x)=P(σX−μ​≤σx−μ​)=Φ(σx−μ​)

    f(x)=12πσe−(x−μ)22σ2,x∈(−∞,+∞)f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2} },x\in(-\infty,+\infty)f(x)=2π​σ1​e−2σ2(x−μ)2​,x∈(−∞,+∞)

  • Expectations:

    E(X)=μ,Var(X)=σ2E(X)=\mu,Var(X)=\sigma^2E(X)=μ,Var(X)=σ2

  • pth quantile

    • Def: for p in (0,1)(0,1)(0,1), the pth quantile xpx_pxp​ of XXX is P(X≤xp)=pP(X\le x_p)=pP(X≤xp​)=p
    • Def: for p in (0,1)(0,1)(0,1), the critical value cpc_pcp​ of XXX is P(X≥xp)=pP(X\ge x_p)=pP(X≥xp​)=p
    • xp=c1−px_p=c_{1-p}xp​=c1−p​

Lecture 12

Central Limit Theorem

  • Th (Lindeberge-Levy): if {Xi}\{X_i\}{Xi​} is a iid sequence with

    E(Xk)=μ,Var(Xk)=σ2Yn=∑k=1nXk−nμnσ=1n∑k=1nXk−μσ/nE(X_k)=\mu,Var(X_k)=\sigma^2\\Y_n=\frac{\sum_{k=1}^{n}X_k-n\mu}{\sqrt n \sigma}=\frac{\frac 1n\sum_{k=1}^{n}X_k-\mu}{\sigma/\sqrt n}E(Xk​)=μ,Var(Xk​)=σ2Yn​=n​σ∑k=1n​Xk​−nμ​=σ/n​n1​∑k=1n​Xk​−μ​
  • Then

    lim⁡n→+∞P(Yn≤x)=Φ(x)∑k=1nXk∼N(nμ,nσ2),1n∑k=1nXk∼N(μ,σ2n)\lim_{n\to+\infty}P(Y_n\le x)=\Phi(x)\\\sum_{k=1}^{n}X_k\sim N(n\mu,n\sigma^2),\frac 1n\sum_{k=1}^{n}X_k\sim N(\mu, \frac{\sigma^2}{n})n→+∞lim​P(Yn​≤x)=Φ(x)k=1∑n​Xk​∼N(nμ,nσ2),n1​k=1∑n​Xk​∼N(μ,nσ2​)

Lecture 13

Estimation Methods

  1. Moment estimate

    • Fundamental basis: {Xi}\{ X_i\}{Xi​}iid E(Xi)=μ,Var(Xi)=σ2E(X_i)=\mu, Var(X_i)=\sigma^2E(Xi​)=μ,Var(Xi​)=σ2

      X‾=1n∑i=1nXi∼N(μ,σ2n)⇒X‾→n→∞μ\overline X=\frac 1n\sum_{i=1}^n X_i\sim N(\mu,\frac{\sigma^2}{n})\Rightarrow\overline X\xrightarrow{n\to\infty} \muX=n1​∑i=1n​Xi​∼N(μ,nσ2​)⇒Xn→∞​μ

    • Distribution parameter θ\thetaθ is related to μ\muμ

    • Estimation:

      E(x)=μ=g(θ)⟶θ=h(μ)≈h(X‾)=θ^E(x)=\mu=g(\theta)\longrightarrow\theta=h(\mu)\approx h(\overline X)=\hat\thetaE(x)=μ=g(θ)⟶θ=h(μ)≈h(X)=θ^
  2. The Method of Maximum Likelihood

  • Suppose the population X∼f(x,θ)X\sim f(x,\theta)X∼f(x,θ)

    P(X1=x1,X2=x2,...,Xn=xn)=f(x1,θ)f(x2,θ)...f(xn,θ)≡L(θ)P(X_1=x_1,X_2=x_2,...,X_n=x_n)=f(x_1,\theta)f(x_2, \theta)...f(x_n,\theta)\equiv L(\theta)P(X1​=x1​,X2​=x2​,...,Xn​=xn​)=f(x1​,θ)f(x2​,θ)...f(xn​,θ)≡L(θ)

  • L(θ)L(\theta)L(θ) is called likelihood function

  • The estimation of mle is chosen as:

    L(θ^)=maxL(θ)L(\hat\theta)=max L(\theta)L(θ^)=maxL(θ)
  • Solution of mle for uniform distribution

    1. find the likelihood function for X∼U(a,b)X\sim U(a,b)X∼U(a,b)

      L(a,b)=∏i=1nf(xi)=(1b−a)nL(a,b)=\prod_{i=1}^{n}f(x_i)=(\frac{1}{b-a})^nL(a,b)=∏i=1n​f(xi​)=(b−a1​)n

    2. find mle ∂L(a,b)∂a>0,∂L(a,b)∂b<0\frac{\partial L(a,b)}{\partial a}\gt0,\frac{\partial L(a,b)}{\partial b}\lt0∂a∂L(a,b)​>0,∂b∂L(a,b)​<0

      ∀i,a<Xi<b⇒a≤min{Xi},b≥max{Xi}\forall i,a\lt X_i\lt b\Rightarrow a\le min\{X_i\},b\ge max\{X_i\}∀i,a<Xi​<b⇒a≤min{Xi​},b≥max{Xi​}

    3. The likelihood function is strictly increasing with aaa but strictly decreasing with bbb, so the mle are:

      a^=min{Xi},b^=max{Xi}\hat a=min\{X_i\},\hat b=max\{Xi\}a^=min{Xi​},b^=max{Xi}

Lecture 14

Unbiasedness

  • Def: if E(θ^)=θE(\hat\theta)=\thetaE(θ^)=θ, θ^\hat\thetaθ^ is called unbiased
  • Def: b(θ^)=E(θ^)−θb(\hat\theta)=E(\hat\theta)-\thetab(θ^)=E(θ^)−θ is called bias
  • Def: if b(θ^)≠0,lim⁡n→+∞b(θ^)=0b(\hat\theta)\ne0,\lim_{n\to+\infty}b(\hat\theta)=0b(θ^)=0,limn→+∞​b(θ^)=0, θ^\hat\thetaθ^ is asymptotically

Efficiency

  • Def: both θ^1\hat\theta_1θ^1​ and θ^2\hat\theta_2θ^2​ are biased, θ^1\hat\theta_1θ^1​ is more efficient than θ^2\hat\theta_2θ^2​ if Var(θ^1)<Var(θ^2)Var(\hat\theta_1)\lt Var(\hat\theta_2)Var(θ^1​)<Var(θ^2​)

Mean Squared Error(MSE)

  • Def: the mean squared error is:

    M(θ^)=E[(θ^−θ)2]M(\hat\theta)=E[(\hat\theta-\theta)^2]M(θ^)=E[(θ^−θ)2]

  • The MSE can be computed as:

    M(θ^)=Var(θ^)+b2(θ^)M(\hat\theta)=Var(\hat\theta)+b^2(\hat\theta)M(θ^)=Var(θ^)+b2(θ^)

Lecture 15

Chi-Squared Distribution

Xi∼N(0,1),X=∑i=1nXi2∼χ2(n)X_i\sim N(0,1),X=\sum_{i=1}^{n}X_i^2\sim \chi^2(n)Xi​∼N(0,1),X=i=1∑n​Xi2​∼χ2(n)
  • Derive of density:

    χ2(n)=Γ(n2,2)\chi^2(n)=\Gamma(\frac n2, 2)χ2(n)=Γ(2n​,2)

    f(x;n)={12n/2Γ(n/2)xn/2−1e−x/2,x>00,elsewheref(x;n)= \left\{\begin{aligned} &\frac{1}{2^{n/2}\Gamma(n/2)}x^{n/2-1}e^{-x/2},&x\gt0\\&0,&elsewhere \end{aligned} \right.f(x;n)=⎩⎨⎧​​2n/2Γ(n/2)1​xn/2−1e−x/2,0,​x>0elsewhere​

  • Expectations: X∼χ2(n)⇒E(x)=n,Var(X)=2nX\sim\chi^2(n)\Rightarrow E(x)=n,Var(X)=2nX∼χ2(n)⇒E(x)=n,Var(X)=2n

  • Chi-Squared distributions are addictive:

    X∼χ2(n),Y∼χ2(m),X,Y indep⇒X+Y∼χ2(n+m)X\sim\chi^2(n),Y\sim\chi^2(m),X,Y\ indep\Rightarrow X+Y\sim\chi^2(n+m)X∼χ2(n),Y∼χ2(m),X,Y indep⇒X+Y∼χ2(n+m)

t-Distribution

X∼N(0,1),Y∼χ2(n)⇒T=XY/n∼t(n)X\sim N(0,1),Y\sim\chi^2(n)\Rightarrow T=\frac{X}{\sqrt{Y/n} }\sim t(n)X∼N(0,1),Y∼χ2(n)⇒T=Y/n​X​∼t(n)
  • Density:

    f(t)=Γ[(n+1)/2]Γ(n/2)nπ(1+t2n)−(n+1)/2,−∞<t<+∞f(t)=\frac{\Gamma[(n+1)/2]}{\Gamma(n/2)\sqrt{n\pi} }(1+\frac{t^2}{n})^{-(n+1)/2},-\infty\lt t\lt +\inftyf(t)=Γ(n/2)nπ​Γ[(n+1)/2]​(1+nt2​)−(n+1)/2,−∞<t<+∞

  • Even function

  • Limit is standard normal: lim⁡n→∞f(t)=φ(t)\lim_{n\to\infty} f(t)=\varphi(t)limn→∞​f(t)=φ(t)

F-Distribution

X∼χ2(n1),Y∼χ2(n2)⇒F=X/n1Y/n2∼F(n1,n2)X\sim \chi^2(n_1), Y\sim \chi^2(n_2)\Rightarrow F=\frac{X/n_1}{Y/n_2}\sim F(n_1, n_2)X∼χ2(n1​),Y∼χ2(n2​)⇒F=Y/n2​X/n1​​∼F(n1​,n2​)
  • Property: F∼F(n1,n2)⇒1/F∼F(n2,n1)F\sim F(n_1,n_2)\Rightarrow1/F\sim F(n_2,n_1)F∼F(n1​,n2​)⇒1/F∼F(n2​,n1​)
  • The limit case is Normal Distribution

Sampling Distribution Theorems

  • Suppose the population is Normal: X∼N(μ,σ2)X\sim N(\mu,\sigma^2)X∼N(μ,σ2)

  • Th1:

    X‾∼N(μ,σ2n)orX‾−μσ/n∼N(0,1)\overline{X}\sim N(\mu,\frac{\sigma^2}{n})or\frac{\overline X-\mu}{\sigma/\sqrt{n} }\sim N(0,1)X∼N(μ,nσ2​)orσ/n​X−μ​∼N(0,1)
  • Th2: X‾\overline XX and S2S^2S2 are independent, and

    (n−1)S2σ2=∑i=1n(Xi−X‾)2σ2∼χ2(n−1)\frac{(n-1)S^2}{\sigma^2}=\sum_{i=1}^{n}\frac{(X_i-\overline X)^2}{\sigma^2}\sim\chi^2(n-1)σ2(n−1)S2​=i=1∑n​σ2(Xi​−X)2​∼χ2(n−1)
  • Th3:

    X‾−μS/n∼t(n−1)\frac{\overline X-\mu}{S/\sqrt{n} }\sim t(n-1)S/n​X−μ​∼t(n−1)

Lecture 16

CI under Normal Distribution

  • find μ\muμ
    • X∼N(μ,σ2)X\sim N(\mu, \sigma^2)X∼N(μ,σ2), and σ2\sigma^2σ2 is given
      1. find X‾≈μ\overline X\approx\muX≈μ
      2. construct Z=X‾−μσ/n∼N(0,1)Z=\frac{\overline X-\mu}{\sigma/\sqrt n}\sim N(0,1)Z=σ/n​X−μ​∼N(0,1)
      3. find P(−zα/2<Z<zα/2)=1−αP(-z_{\alpha/2}<Z<z_{\alpha/2})=1-\alphaP(−zα/2​<Z<zα/2​)=1−α
      4. solve −zα/2<Z<zα/2⇔X‾−zα/2σn<μ<X+zα/2-z_{\alpha/2}<Z<z_{\alpha/2}\Leftrightarrow \overline X-z_{\alpha/2}\frac{\sigma}{\sqrt n}<\mu <X+z_{\alpha/2}−zα/2​<Z<zα/2​⇔X−zα/2​n​σ​<μ<X+zα/2​
    • X∼N(μ,σ2)X\sim N(\mu, \sigma^2)X∼N(μ,σ2), and σ2\sigma^2σ2 is unknown
      1. find X‾≈μ\overline X\approx\muX≈μ
      2. construct T=X‾−μS/n∼t(n−1)T=\frac{\overline X-\mu}{S/\sqrt n}\sim t(n-1)T=S/n​X−μ​∼t(n−1)
      3. find P(−tα/2<T<tα/2)=1−αP(-t_{\alpha/2}<T<t_{\alpha/2})=1-\alphaP(−tα/2​<T<tα/2​)=1−α
      4. solve −tα/2<T<tα/2⇔X‾−tα/2Sn<μ<X‾+tα/2Sn-t_{\alpha/2}<T<t_{\alpha/2}\Leftrightarrow \overline X-t_{\alpha/2}\frac{S}{\sqrt n}<\mu<\overline X+t_{\alpha/2}\frac{S}{\sqrt n}−tα/2​<T<tα/2​⇔X−tα/2​n​S​<μ<X+tα/2​n​S​
  • find σ\sigmaσ
    • X∼N(μ,σ2)X\sim N(\mu,\sigma^2)X∼N(μ,σ2), and μ\muμ is given
      1. construct W=∑i=1n(Xi−μ)2σ2∼χ2(n)W=\sum_{i=1}^{n}\frac{(X_i-\mu)^2}{\sigma^2}\sim\chi^2(n)W=∑i=1n​σ2(Xi​−μ)2​∼χ2(n)
      2. solve P(χ1−α/22<W<χα/22)=1−αP(\chi^2_{1-\alpha/2}<W<\chi^2_{\alpha/2})=1-\alphaP(χ1−α/22​<W<χα/22​)=1−α
    • X∼N(μ,σ2)X\sim N(\mu,\sigma^2)X∼N(μ,σ2), and μ\muμ is unknown
      1. construct W=n−1σ2S2=∑i=1n(Xi−X‾)2σ2∼χ2(n−1)W=\frac{n-1}{\sigma^2}S^2=\sum_{i=1}^{n}\frac{(X_i-\overline X)^2}{\sigma^2}\sim\chi^2(n-1)W=σ2n−1​S2=∑i=1n​σ2(Xi​−X)2​∼χ2(n−1)

Sampling Distribution under Two Populations

  • Suppose X∼N(μ1,σ12), Y∼N(μ2,σ22)X\sim N(\mu_1, \sigma_1^2), \ Y\sim N(\mu_2,\sigma_2^2)X∼N(μ1​,σ12​), Y∼N(μ2​,σ22​)

  • XXX, YYY independent, n1,n_1,n1​, n2n_2n2​ samples from X, YX,\ YX, Y

  • Th1: var known

    (X‾−Y‾)−(μ1−μ2)σ12/n+σ22/n2∼N(0,1)\frac{(\overline X-\overline Y)-(\mu_1-\mu_2)}{\sqrt{\sigma_1^2/n+\sigma_2^2/n_2} }\sim N(0,1)σ12​/n+σ22​/n2​​(X−Y)−(μ1​−μ2​)​∼N(0,1)
  • Th2: var unknown but equal

    (X‾−Y‾)−(μ1−μ2)Sp1/n1+1/n2∼t(n1+n2−2)\frac{(\overline X-\overline Y)-(\mu_1-\mu_2)}{S_p\sqrt{1/n_1+1/n_2} }\sim t(n_1+n_2-2)Sp​1/n1​+1/n2​​(X−Y)−(μ1​−μ2​)​∼t(n1​+n2​−2)
Sp2=(n1−1)S12+(n2−1)S22n1+n2−2S_p^2=\frac{(n_1-1)S_1^2+(n_2-1)S_2^2}{n_1+n_2-2}Sp2​=n1​+n2​−2(n1​−1)S12​+(n2​−1)S22​​
  • Th3: Sampling theorem for Variance
S12/σ12S22/σ22∼F(n1−1,n2−1)\frac{S_1^2/\sigma_1^2}{S_2^2/\sigma_2^2}\sim F(n_1-1,n_2-1)S22​/σ22​S12​/σ12​​∼F(n1​−1,n2​−1)

Sample variance

S2=∑(Xi−X‾)2n−1S^2=\frac{\sum(X_i-\overline X)^2}{n-1}S2=n−1∑(Xi​−X)2​

X∼ ?, E(X)=μ, Var(X)=σ2X‾=1n∑Xi∼N(μ,σ2n)X\sim \ ?,\ E(X)=\mu,\ Var(X)=\sigma^2\\\overline X=\frac 1n\sum X_i\sim N(\mu,\frac{\sigma^2}{n})X∼ ?, E(X)=μ, Var(X)=σ2X=n1​∑Xi​∼N(μ,nσ2​) Var(X)=E(X2)−E2(X)Var(X‾)=E(X‾2)−E2(X‾)Var(X)=E(X^2)-E^2(X)\\Var(\overline X )=E({\overline X}^2)-E^2(\overline X)\\Var(X)=E(X2)−E2(X)Var(X)=E(X2)−E2(X) E(X2)=μ2+σ2E(X‾2)=μ2+σ2nE(X^2)=\mu^2+\sigma^2\\E(\overline X^2)=\mu^2+\frac{\sigma^2}{n}E(X2)=μ2+σ2E(X2)=μ2+nσ2​ E(∑(Xi−X‾)2)=E(∑(Xi2+X‾2−2XiX‾))=E(∑Xi2+nX‾2−2X‾∑Xi)=E(∑Xi2+nX‾2−2nX‾2)=∑E(Xi2)−E(nX‾2)=nE(X2)−nE(X‾2)=n(μ2+σ2)−n(μ2+σ2n)=nσ2−σ2=(n−1)σ2\begin{aligned}E(\sum(X_i-\overline X)^2)=& E(\sum(X_i^2+\overline X^2-2X_i\overline X))\\=&E(\sum X_i^2+n\overline X^2-2\overline X\sum X_i)\\=&E(\sum X_i^2+n\overline X^2-2n\overline X^2)\\=&\sum E(X_i^2)-E(n\overline X^2)\\=&nE(X^2)-nE(\overline X^2)\\=&n(\mu^2+\sigma^2)-n(\mu^2+\frac{\sigma^2}{n})\\=&n\sigma^2-\sigma^2=(n-1)\sigma^2\end{aligned}\\E(∑(Xi​−X)2)=======​E(∑(Xi2​+X2−2Xi​X))E(∑Xi2​+nX2−2X∑Xi​)E(∑Xi2​+nX2−2nX2)∑E(Xi2​)−E(nX2)nE(X2)−nE(X2)n(μ2+σ2)−n(μ2+nσ2​)nσ2−σ2=(n−1)σ2​ ⇒E(∑(Xi−X‾)2)=(n−1)σ2E(∑(Xi−X‾)2)n−1=σ2E(∑(Xi−X‾)2n−1)=σ2\begin{aligned}\Rightarrow E(\sum(X_i-\overline X)^2)&=(n-1)\sigma^2\\\frac{E(\sum(X_i-\overline X)^2)}{n-1}&=\sigma^2\\E(\frac{\sum(X_i-\overline X)^2}{n-1})&=\sigma^2\end{aligned}⇒E(∑(Xi​−X)2)n−1E(∑(Xi​−X)2)​E(n−1∑(Xi​−X)2​)​=(n−1)σ2=σ2=σ2​ S2=∑(Xi−X‾)2n−1⇒E(S2)=σ2S^2=\frac{\sum(X_i-\overline X)^2}{n-1}\Rightarrow E(S^2)=\sigma^2S2=n−1∑(Xi​−X)2​⇒E(S2)=σ2