UA MATH564 概率论VI 数理统计基础4 t分布
UA MATH564 概率論VI 數(shù)理統(tǒng)計基礎(chǔ)4 t分布
- t分布的定義
- t分布的概率密度
- t分布的性質(zhì)
t分布的定義
假設(shè)X,YX,YX,Y互相獨立,X~N(δ,1)X \sim N(\delta,1)X~N(δ,1),Y~χn2Y\sim \chi^2_nY~χn2?,則
Z=XY/n~tn,δZ = \frac{X}{\sqrt{Y/n}}\sim t_{n,\delta}Z=Y/n?X?~tn,δ?
其中nnn被稱為自由度,δ\deltaδ為非中心參數(shù),δ=0\delta=0δ=0稱為中心化的t分布,簡稱t分布。下面計算t分布的CDF與PDF并介紹幾個常用性質(zhì)。
t分布的概率密度
記ZZZ的概率密度為s(x∣n,δ)s(x|n,\delta)s(x∣n,δ),分布函數(shù)為S(x∣n,δ)S(x|n,\delta)S(x∣n,δ)。
引理1 假設(shè)X,YX,YX,Y互相獨立,概率密度分別為g(x),h(y)g(x),h(y)g(x),h(y),Y>0,a.s.Y>0,a.s.Y>0,a.s.,Z=X/YZ=X/YZ=X/Y,則
fZ(z)=∫0∞tg(tz)h(t)dt,FZ(z)=∫0∞G(tz)h(t)dt,?z∈Rf_Z(z) = \int_0^{\infty} tg(tz)h(t)dt,\ F_Z(z) = \int_0^{\infty} G(tz)h(t)dt,\forall z \in \mathbb{R}fZ?(z)=∫0∞?tg(tz)h(t)dt,?FZ?(z)=∫0∞?G(tz)h(t)dt,?z∈R
證明
FZ(z)=P(Z≤z)=P(XY≤z)=P(X≤zY)=∫x≤zyg(x)h(y)dxdy=∫0∞h(y)dy∫?∞zyg(x)dx=∫0∞G(zy)h(y)dyfZ(z)=FZ′(z)=∫0∞G′(zy)h(y)dy=∫0∞zg(zy)h(y)dyF_Z(z) = P(Z \le z) = P(\frac{X}{Y} \le z) = P(X \le zY) = \int_{x \le zy} g(x)h(y)dxdy \\ = \int_{0}^{\infty} h(y)dy \int_{-\infty}^{zy} g(x)dx = \int_{0}^{\infty} G(zy)h(y)dy \\ f_Z(z) = F_Z'(z) = \int_{0}^{\infty} G'(zy)h(y)dy = \int_{0}^{\infty} zg(zy)h(y)dyFZ?(z)=P(Z≤z)=P(YX?≤z)=P(X≤zY)=∫x≤zy?g(x)h(y)dxdy=∫0∞?h(y)dy∫?∞zy?g(x)dx=∫0∞?G(zy)h(y)dyfZ?(z)=FZ′?(z)=∫0∞?G′(zy)h(y)dy=∫0∞?zg(zy)h(y)dy
證畢
下面分別考慮XXX與Y/n\sqrt{Y/n}Y/n?的分布。X~N(δ,1)X \sim N(\delta,1)X~N(δ,1),因此
g(x)=12πexp?(?(x?δ)22)=12πe?x2+δ22e?δxg(x) = \frac{1}{\sqrt{2\pi}} \exp \left(-\frac{(x-\delta)^2}{2} \right) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2+\delta^2}{2}} e^{-\delta x}g(x)=2π?1?exp(?2(x?δ)2?)=2π?1?e?2x2+δ2?e?δx
類似我們在計算卡方分布時的處理,將e?δxe^{-\delta x}e?δx展開為級數(shù),
g(x)=12πe?x2+δ22∑i=0∞(δx)ii!g(x) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2+\delta^2}{2}}\sum_{i=0}^{\infty} \frac{(\delta x)^i}{i!}g(x)=2π?1?e?2x2+δ2?i=0∑∞?i!(δx)i?
因為Y~χn2Y \sim \chi^2_nY~χn2?,記W=Y/nW=\sqrt{Y/n}W=Y/n?,則
HW(w)=P(W≤w)=P(Y/n≤w)=P(Y≤nw2)=FY(nw2)hW(w)=FW′(w)=2nwfY(nw2)=2nw(1/2)n/2Γ(n/2)(nw2)n2?1e?nw2/2=nn2wn?12n2?1Γ(n2)e?nw22,w>0H_W(w) = P(W \le w) = P(\sqrt{Y/n} \le w) = P(Y \le nw^2) = F_Y(nw^2) \\ h_W(w) = F_W'(w) = 2nwf_Y(nw^2) = 2nw \frac{(1/2)^{n/2}}{\Gamma(n/2)}(nw^2)^{\frac{n}{2}-1}e^{-nw^2/2} \\ = \frac{n^{\frac{n}{2}}w^{n-1}}{2^{\frac{n}{2}-1}\Gamma(\frac{n}{2})}e^{-\frac{nw^2}{2}},w>0HW?(w)=P(W≤w)=P(Y/n?≤w)=P(Y≤nw2)=FY?(nw2)hW?(w)=FW′?(w)=2nwfY?(nw2)=2nwΓ(n/2)(1/2)n/2?(nw2)2n??1e?nw2/2=22n??1Γ(2n?)n2n?wn?1?e?2nw2?,w>0
下面根據(jù)引理1計算t分布的概率密度:
s(z∣n,δ)=∫0∞zg(zy)h(y)dy=∫0∞znn2yn?12n2?1Γ(n2)e?ny2212πe?(zy)2+δ22∑i=0∞(δzy)ii!dy=znn22n2?1Γ(n2)12πe?δ22∑i=0∞δizii!∫0∞yi+n?1e?n+z22y2dys(z|n,\delta) = \int_{0}^{\infty} zg(zy)h(y)dy=\int_{0}^{\infty} z\frac{n^{\frac{n}{2}}y^{n-1}}{2^{\frac{n}{2}-1}\Gamma(\frac{n}{2})}e^{-\frac{ny^2}{2}}\frac{1}{\sqrt{2\pi}} e^{-\frac{(zy)^2+\delta^2}{2}}\sum_{i=0}^{\infty} \frac{(\delta zy)^i}{i!}dy \\ = z\frac{n^{\frac{n}{2}}}{2^{\frac{n}{2}-1}\Gamma(\frac{n}{2})}\frac{1}{\sqrt{2\pi}}e^{-\frac{\delta^2}{2}}\sum_{i=0}^{\infty}\frac{\delta ^i z^i}{i!}\int_{0}^{\infty} y^{i+n-1}e^{-\frac{n+z^2}{2}y^2} dy s(z∣n,δ)=∫0∞?zg(zy)h(y)dy=∫0∞?z22n??1Γ(2n?)n2n?yn?1?e?2ny2?2π?1?e?2(zy)2+δ2?i=0∑∞?i!(δzy)i?dy=z22n??1Γ(2n?)n2n??2π?1?e?2δ2?i=0∑∞?i!δizi?∫0∞?yi+n?1e?2n+z2?y2dy
這里需要用到Gamma函數(shù)求積技巧:
∫0∞yi+n?1e?n+z22y2dy=1n+z2∫0∞yi+n?2e?n+z22y2d(n+z22y2)=2i+n?22(n+z2)i+n2∫0∞(n+z22y2)i+n?22e?n+z22y2d(n+z22y2)=2i+n?22(n+z2)i+n2Γ(n+i2)\int_{0}^{\infty} y^{i+n-1}e^{-\frac{n+z^2}{2}y^2} dy = \frac{1}{n+z^2} \int_{0}^{\infty} y^{i+n-2}e^{-\frac{n+z^2}{2}y^2} d\left( \frac{n+z^2}{2}y^2\right) \\ = \frac{2^{\frac{i+n-2}{2}}}{(n+z^2)^{\frac{i+n}{2}}} \int_{0}^{\infty} \left( \frac{n+z^2}{2}y^2\right) ^{\frac{i+n-2}{2}}e^{-\frac{n+z^2}{2}y^2} d\left( \frac{n+z^2}{2}y^2\right) =\frac{2^{\frac{i+n-2}{2}}}{(n+z^2)^{\frac{i+n}{2}}} \Gamma(\frac{n+i}{2}) ∫0∞?yi+n?1e?2n+z2?y2dy=n+z21?∫0∞?yi+n?2e?2n+z2?y2d(2n+z2?y2)=(n+z2)2i+n?22i+n?2??∫0∞?(2n+z2?y2)2i+n?2?e?2n+z2?y2d(2n+z2?y2)=(n+z2)2i+n?22i+n?2??Γ(2n+i?)
帶入概率密度并化簡:
s(z∣n,δ)=nn2πΓ(n2)e?δ22(n+z2)n+12∑i=0∞(n+i+1)(δz)i2i!(2n+z2)i2s(z|n,\delta) = \frac{n^{\frac{n}{2}}}{\sqrt{\pi}\Gamma(\frac{n}{2})} \frac{e^{-\frac{\delta^2}{2}}}{(n+z^2)^{\frac{n+1}{2}}}\sum_{i=0}^{\infty} \frac{(n+i+1)(\delta z)^i}{2i!} \left( \frac{2}{n+z^2} \right)^{\frac{i}{2}}s(z∣n,δ)=π?Γ(2n?)n2n??(n+z2)2n+1?e?2δ2??i=0∑∞?2i!(n+i+1)(δz)i?(n+z22?)2i?
當(dāng)δ=0\delta=0δ=0時,
s(z∣n,0)=Γ(n+12)nπΓ(n2)(1+z2n)?n+12s(z|n,0) = \frac{\Gamma(\frac{n+1}{2})}{\sqrt{n\pi}\Gamma(\frac{n}{2})}\left(1+\frac{z^2}{n} \right)^{-\frac{n+1}{2}}s(z∣n,0)=nπ?Γ(2n?)Γ(2n+1?)?(1+nz2?)?2n+1?
t分布的性質(zhì)
性質(zhì)1:X1,?,Xn~iidN(μ,σ2)X_1,\cdots,X_n \sim_{iid} N(\mu,\sigma^2)X1?,?,Xn?~iid?N(μ,σ2),Z=n(Xˉ?b)1n?1∑i=1n(Xi?Xˉ)2~tn?1,δZ = \frac{\sqrt{n}(\bar{X}-b)}{\sqrt{\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2}} \sim t_{n-1,\delta}Z=n?11?∑i=1n?(Xi??Xˉ)2?n?(Xˉ?b)?~tn?1,δ?,δ=n(μ?b)σ\delta = \frac{\sqrt{n}(\mu-b)}{\sigma}δ=σn?(μ?b)?
性質(zhì)2:X1,?,Xm~iidN(a,σ2),Y1,?,Yn~iidN(b,σ2)X_1,\cdots,X_m \sim_{iid} N(a,\sigma^2),Y_1,\cdots,Y_n \sim_{iid} N(b,\sigma^2)X1?,?,Xm?~iid?N(a,σ2),Y1?,?,Yn?~iid?N(b,σ2),他們均互相獨立,則
Z=mn(m+n?2)m+nXˉ?Yˉ?c∑i=1m(Xi?Xˉ)2+∑j=1n(Yj?Yˉ)2~tm+n?2,δZ = \sqrt{\frac{mn(m+n-2)}{m+n}}\frac{\bar{X}-\bar{Y}-c}{\sqrt{\sum_{i=1}^m(X_i-\bar{X})^2+\sum_{j=1}^n (Y_j - \bar{Y})^2}} \sim t_{m+n-2,\delta}Z=m+nmn(m+n?2)??∑i=1m?(Xi??Xˉ)2+∑j=1n?(Yj??Yˉ)2?Xˉ?Yˉ?c?~tm+n?2,δ?
其中δ=mnm+na?b?cσ\delta = \sqrt{\frac{mn}{m+n}}\frac{a-b-c}{\sigma}δ=m+nmn??σa?b?c?
性質(zhì)3:Xn~tn,δX_n \sim t_{n,\delta}Xn?~tn,δ?,則Xn→dN(δ,1)X_n \to _d N(\delta,1)Xn?→d?N(δ,1)
性質(zhì)1和性質(zhì)2都比較簡單,性質(zhì)1是單總體正態(tài)均值的t檢驗的基礎(chǔ);性質(zhì)2是雙總體正態(tài)均值的t檢驗的基礎(chǔ)。性質(zhì)1中,對ZZZ做簡單變形:
Z=n(Xˉ?b)1n?1∑i=1n(Xi?Xˉ)2=n(Xˉ?b)σ1n?1∑i=1n(Xi?μσ?Xˉ?μσ)2Z = \frac{\sqrt{n}(\bar{X}-b)}{\sqrt{\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2}} = \frac{\frac{\sqrt{n}(\bar{X}-b)}{\sigma}}{\sqrt{\frac{1}{n-1}\sum_{i=1}^n(\frac{X_i-\mu}{\sigma}-\frac{\bar{X}-\mu}{\sigma})^2}}Z=n?11?∑i=1n?(Xi??Xˉ)2?n?(Xˉ?b)?=n?11?∑i=1n?(σXi??μ??σXˉ?μ?)2?σn?(Xˉ?b)??
分子n(Xˉ?b)σ~N(n(μ?b)σ,1)\frac{\sqrt{n}(\bar{X}-b)}{\sigma} \sim N(\frac{\sqrt{n}(\mu-b)}{\sigma},1)σn?(Xˉ?b)?~N(σn?(μ?b)?,1),并且與分母互相獨立;數(shù)理統(tǒng)計基礎(chǔ)1中已經(jīng)證明了分母是服從χn?12\chi^2_{n-1}χn?12?的。性質(zhì)2的證明方法與性質(zhì)1類似。下面證明性質(zhì)3:
證明 定義+大數(shù)定律
根據(jù)定義,XnX_nXn?可以寫成Z/1n∑i=1nYi2Z/\sqrt{\frac{1}{n}\sum_{i=1}^n Y_i^2}Z/n1?∑i=1n?Yi2??,其中Z~N(δ,1)Z \sim N(\delta,1)Z~N(δ,1)且與所有的YiY_iYi?獨立,Y1,?,Yn~iidN(0,1)Y_1,\cdots,Y_n \sim _{iid} N(0,1)Y1?,?,Yn?~iid?N(0,1),根據(jù)弱大數(shù)定律
1n∑i=1nYi2→PE[Y12]=1\frac{1}{n}\sum_{i=1}^n Y_i^2 \to_P E[Y_1^2] = 1n1?i=1∑n?Yi2?→P?E[Y12?]=1
因此當(dāng)n→∞n\to \inftyn→∞時,Xn→dZ~N(δ,1)X_n \to_d Z \sim N(\delta,1)Xn?→d?Z~N(δ,1)。
總結(jié)
以上是生活随笔為你收集整理的UA MATH564 概率论VI 数理统计基础4 t分布的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Julia程序设计2 数值类型
- 下一篇: UA MATH564 概率论VI 数理统