当前位置:网站首页>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)
边栏推荐
- Install mysql5.7.36 in CentOS
- HCIP第十一天
- 围绕新市民金融聚焦差异化产品设计、智能技术提效及素养教育
- Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
- 软件测试工程师的职业规划
- (function(global,factory){
- Hcip day 10
- How to effectively conduct the review meeting (Part 1)?
- Collaborative office tools: Online whiteboard is in its infancy, and online design has become a red sea
- 【LeetCode】1331. 数组序号转换
猜你喜欢

Thrift 序列化协议浅析

35道MySQL面试必问题图解,这样也太好理解了吧

2022高处安装、维护、拆除考试题库及在线模拟考试

国产数据库的红利还能“吃”多久?

Revised version | target detection: speed and accuracy comparison (faster r-cnn, r-fcn, SSD, FPN, retinanet and yolov3)

Tdengine helps Siemens' lightweight digital solutions

Foundation of deep learning ---- GNN spectral domain and airspace (continuous improvement, update and accumulation)

2022 melting welding and thermal cutting examination questions and online simulation examination

Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it

How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
随机推荐
C # read INI file and key value pair operation
[线程安全问题] 多线程到底可能会带来哪些风险?
Career planning of Software Test Engineer
String转为long 类型报错原因:要转为long必须是int、double、float型[通俗易懂]
Leetcode 1331. array sequence number conversion
【七夕】七夕孤寡小青蛙究极版?七夕节最终章!
Super resolution reconstruction based on deep learning
Excel VBA password free view VBE encryption code
Bulk Rename Utility
Factory mode and constructor mode
文件批量重命名工具Bulk Rename Utility
力扣解法汇总1331-数组序号转换
(function(global,factory){
OKR and grad
八、picker用法 下拉框选择效果
2022年熔化焊接与热切割考题及在线模拟考试
2022 melting welding and thermal cutting examination questions and online simulation examination
ZABBIX distributed
Force deduction solution summary 1331 array sequence number conversion
Realization of chat room function