当前位置:网站首页>Chi square distribution and gamma function
Chi square distribution and gamma function
2022-07-28 14:34:00 【Turbo-shengsong】
Gamma function
To define chi square distribution , We need to define the gamma function first :
Γ ( p ) = ∫ 0 + ∞ x p − 1 e − x d x , p > 0 (1) \Gamma(p) = \int_{0}^{+ \infty} x^{p-1} e^{-x} dx, p >0 \tag{1} Γ(p)=∫0+∞xp−1e−xdx,p>0(1)
If we use partial integral ,
Γ ( p ) = ∫ 0 + ∞ x p − 1 e − x d x = ∫ 0 + ∞ − x p − 1 d e − x = − x p − 1 e − x ∣ 0 + ∞ − ∫ 0 + ∞ [ − e − x ( p − 1 ) x p − 2 ] d x = ( p − 1 ) Γ ( p − 1 ) (2) \begin{aligned} \Gamma(p) &= \int_{0}^{+ \infty} x^{p-1} e^{-x} dx \\ & = \int_{0}^{+ \infty} -x^{p-1} d e^{-x} \\ & = -x^{p-1} e^{-x} |_{0}^{+ \infty} - \int_{0}^{+ \infty} \left [ - e^{-x} (p-1)x^{p-2} \right] dx \\ &= (p-1) \Gamma(p-1) \tag{2} \end{aligned} Γ(p)=∫0+∞xp−1e−xdx=∫0+∞−xp−1de−x=−xp−1e−x∣0+∞−∫0+∞[−e−x(p−1)xp−2]dx=(p−1)Γ(p−1)(2)
In this way , We can prove that the gamma function obeys an interesting recursive relation .
Γ ( p ) = ( p − 1 ) Γ ( p − 1 ) = ( p − 1 ) ( p − 2 ) Γ ( p − 2 ) = ( p − 1 ) ( p − 2 ) ⋯ Γ ( 1 ) (3) \begin{aligned} \Gamma(p) &= (p-1) \Gamma(p-1) \\ &= (p-1) (p-2) \Gamma(p-2) & = (p-1) (p-2) \cdots \Gamma(1) \end{aligned} \tag{3} Γ(p)=(p−1)Γ(p−1)=(p−1)(p−2)Γ(p−2)=(p−1)(p−2)⋯Γ(1)(3)
Easy to calculate
Γ ( 1 ) = 1 (4) \Gamma(1) = 1 \tag{4} Γ(1)=1(4)
therefore , We can get
Γ ( p ) = ( p − 1 ) ! (5) \Gamma(p) = (p-1)! \tag{5} Γ(p)=(p−1)!(5)
in addition , We can calculate
Γ ( 1 2 ) = ∫ 0 + ∞ x − 1 2 e − x d x = 2 ∫ 0 + ∞ e − x d x 1 2 = 2 ∫ 0 + ∞ e − u 2 d u = 2 ⋅ 2 π 1 2 ⋅ 1 2 π 1 2 ∫ 0 + ∞ e − u 2 d u = 2 π ⋅ 1 2 = π (6) \begin{aligned} \Gamma(\frac{1}{2}) &= \int_{0}^{+ \infty} x^{-\frac{1}{2}} e^{-x} dx \\ &= 2 \int_{0}^{+ \infty} e^{-x} d x^{\frac{1}{2}} \\ & = 2 \int_{0}^{+ \infty} e^{-u^2} d u \\ & = 2 \cdot \sqrt{2 \pi \frac{1}{2}} \cdot \frac{1}{\sqrt{2 \pi \frac{1}{2}}} \int_{0}^{+ \infty} e^{-u^2} d u \\ & = 2 \sqrt \pi \cdot \frac{1}{2} \\ & = \sqrt \pi \tag{6} \end{aligned} Γ(21)=∫0+∞x−21e−xdx=2∫0+∞e−xdx21=2∫0+∞e−u2du=2⋅2π21⋅2π211∫0+∞e−u2du=2π⋅21=π(6)
Chi square distribution
If x \boldsymbol x x from n n n Independent and identically distributed (i.i.d.) Random variable composition of , x i ∼ N ( 0 , 1 ) , i = 0 , 1 , ⋯ , n x_i \sim \mathcal N(0, 1), i=0,1,\cdots, n xi∼N(0,1),i=0,1,⋯,n, that
y = ∑ i = 1 n x i 2 ∼ χ n 2 (7) y = \sum_{i=1}^{n} x^2_i \sim \chi^2_n \tag{7} y=i=1∑nxi2∼χn2(7)
where χ n 2 \chi^2_n χn2 denotes a χ 2 \chi^2 χ2 random variable with n n n degree of freedom. PDF:
p ( y ) = { 1 2 n 2 Γ ( n 2 ) y n 2 − 1 exp − ( 1 2 y ) for y ≥ 0 0 for y < 0 (8) p(y) = \begin{cases} \frac{1}{ 2^{\frac{n}{2}} \Gamma(\frac{n}{2}) } y^{\frac{n}{2}-1} \exp -(\frac{1}{2} y) \ \ \text{for} \ y \geq 0 \\ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{for} \ y < 0 \end{cases} \tag{8} p(y)={ 22nΓ(2n)1y2n−1exp−(21y) for y≥00 for y<0(8)
among Γ ( u ) \Gamma(u) Γ(u) It's a gamma function . A random variable y y y The mean and variance of are :
E [ y ] = n var [ y ] = 2 n (9) \begin{aligned} \mathbb E[y] &= n \\ \text{var}[y] &= 2n \end{aligned} \tag{9} E[y]var[y]=n=2n(9)
Add
If x i ∼ N ( 0 , σ 2 ) , i = 0 , 1 , ⋯ , n x_i \sim \mathcal N(0, \sigma^2), i=0,1,\cdots, n xi∼N(0,σ2),i=0,1,⋯,n, that
p ( y ) = { 1 σ n 2 n 2 Γ ( n 2 ) y n 2 − 1 exp − ( 1 2 σ 2 y ) for y ≥ 0 0 for y < 0 (10) p(y) = \begin{cases} \frac{1}{ \sigma^n 2^{ \frac{n}{2} } \Gamma(\frac{n}{2}) } y^{\frac{n}{2}-1} \exp -(\frac{1}{2 \sigma^2} y) \ \ \text{for} \ y \geq 0 \\ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{for} \ y < 0 \end{cases} \tag{10} p(y)={ σn22nΓ(2n)1y2n−1exp−(2σ21y) for y≥00 for y<0(10)
At this time , A random variable y y y The mean and variance of are :
E [ y ] = n σ 2 var [ y ] = 2 n σ 4 (11) \begin{aligned} \mathbb E[y] &= n \sigma^2 \\ \text{var}[y] &= 2n \sigma^4 \end{aligned} \tag{11} E[y]var[y]=nσ2=2nσ4(11)
边栏推荐
- How does vos3000 send incoming calls to okcc
- 天气这么热太阳能发电不得起飞喽啊?喽啊个头……
- Excel VBA 免密查看VBE加密代码
- Brief introduction of diversity technology
- 2022 high altitude installation, maintenance, removal of examination question bank and online simulated examination
- pix2pix
- Copy excel row to specified row
- [ecmascript6] iterator and generator
- unittest执行runTestCase提示<_io.TextIOWrapper name=‘<stderr>‘ mode=‘w‘ encoding=‘utf-8‘>解决方案
- 2022年安全员-A证操作证考试题库模拟考试平台操作
猜你喜欢

As a programmer, how to manage time efficiently?

如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然

OKR与GRAD
![[线程安全问题] 多线程到底可能会带来哪些风险?](/img/79/112ab7e586b0bceb296dfddb2728be.png)
[线程安全问题] 多线程到底可能会带来哪些风险?

Target detection: speed and accuracy comparison (fater r-cnn, r-fcn, SSD, FPN, retinanet and yolov3)

如何只降3D相机不降UI相机的分辨率

bgp实验

MySQL development skills - View

2022 low voltage electrician examination questions and answers

软件测试的发展与定义
随机推荐
如何有效进行回顾会议(上)?
Target detection: speed and accuracy comparison (fater r-cnn, r-fcn, SSD, FPN, retinanet and yolov3)
Core Data 是如何在 SQLite 中保存数据的
Some problems encountered in the development of Excel VBA, solutions, and continuous updates
2022 melting welding and thermal cutting examination questions and online simulation examination
Super resolution reconstruction based on deep learning
How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
在 SwiftUI 视图中打开 URL 的若干方法
These three online PS tools should be tried
(function(global,factory){
Three methods to disassemble the rotation array
国产数据库的红利还能“吃”多久?
聊天室功能的实现
为什么jq的匿名函数 外部可以访问到里面的方法
Use of formdata object, VAR formdata=new formdata()
UI开发中所遇到的各种坑
成为绿色数据中心新样板,东莞华为云数据中心是怎样炼成的?
如何只降3D相机不降UI相机的分辨率
企鹅一面:为什么不建议使用SELECT * ?
&0xffffffff(0x08)