卡方分布的定义:
若n个相互独立的随机变量ξ₁,ξ₂,…,ξn ,均服从标准正态分布(也称独立同分布于标准正态分布),则这n个服从标准正态分布的随机变量的平方和构成一新的随机变量,其分布规律称为卡方分布(chi-square distribution)。
期望值:
χ 2 = x 1 2 + x 2 2 + x 3 2 + . . . x n 2 \chi^2 = x_1^2 + x_2^2 + x_3^2 + ... x_n^2 χ2=x12+x22+x32+...xn2
E ( χ 2 ) = E ( x 1 2 + x 2 2 + x 3 2 + . . . x n 2 ) = E ( x 1 2 ) + E ( x 2 2 ) + E ( x 3 2 ) + . . . E ( x n 2 ) = ∫ − ∞ + ∞ x 1 2 f ( x 1 ) d x + ∫ − ∞ + ∞ x 2 2 f ( x 1 ) d x + ∫ − ∞ + ∞ x 3 2 f ( x 1 ) d x + . . . + ∫ − ∞ + ∞ x n 2 f ( x 1 ) d x = n E(\chi^2 )=E( x_1^2 + x_2^2 + x_3^2 + ... x_n^2 )=\\ E(x_1^2) + E(x_2^2) + E(x_3^2) + ... E(x_n^2 ) =\\ \int _{-\infty}^{+\infty} x_1^2 f(x_1) dx+ \int _{-\infty}^{+\infty} x_2^2 f(x_1) dx + \int _{-\infty}^{+\infty} x_3^2 f(x_1) dx + ... +\int _{-\infty}^{+\infty} x_n^2f(x_1) dx = n E(χ2)=E(x12+x22+x32+...xn2)=E(x12)+E(x22)+E(x32)+...E(xn2)=∫−∞+∞x12f(x1)dx+∫−∞+∞x22f(x1)dx+∫−∞+∞x32f(x1)dx+...+∫−∞+∞xn2f(x1)dx=n
方差:
χ 2 = x 1 2 + x 2 2 + x 3 2 + . . . x n 2 \chi^2 = x_1^2 + x_2^2 + x_3^2 + ... x_n^2 χ2=x12+x22+x32+...xn2
D ( χ 2 ) = D ( x 1 2 + x 2 2 + x 3 2 + . . . x n 2 ) = = D ( x 1 2 ) + D ( x 2 2 ) + D ( x 3 2 ) + . . . + D ( x n 2 ) = = E ( x 1 4 ) − [ E ( x 1 2 ) ] 2 + E ( x 2 4 ) − [ E ( x 2 2 ) ] 2 + E ( x 3 4 ) − [ E ( x 3 2 ) ] 2 + . . . + E ( x n 4 ) − [ E ( x n 2 ) ] 2 = ∫ − ∞ + ∞ x 1 4 e − x 1 2 2 d x 1 − 1 + ∫ − ∞ + ∞ x 2 4 e − x 2 2 2 d x 2 − 1 + ∫ − ∞ + ∞ x 3 4 e − x 3 2 2 d x 3 − 1 + . . . + ∫ − ∞ + ∞ x n 4 e − x n 2 2 d x n − 1 = ? ? ? D(\chi^2 )=D( x_1^2 + x_2^2 + x_3^2 + ... x_n^2 )=\\ =D( x_1^2) + D(x_2^2) + D(x_3^2) + ... + D(x_n^2 )=\\ =E(x_1^4) - [E(x_1^2)]^2+ E(x_2^4) - [E(x_2^2)]^2 + E(x_3^4) -[E(x_3^2)]^2+ ... + E(x_n^4 ) - [E(x_n^2)]^2=\\ \int_{-\infty}^{+\infty}x_1^4 e^{-\frac{x_1^2}{2}} dx_1 -1 + \int_{-\infty}^{+\infty}x_2^4e^{-\frac{x_2^2}{2}} dx_2 -1 + \int_{-\infty}^{+\infty}x_3^4 e^{-\frac{x_3^2}{2}} dx_3 -1+ ... + \int_{-\infty}^{+\infty}x_n^4 e^{-\frac{x_n^2}{2}} dx_n -1 = ???\\ D(χ2)=D(x12+x22+x32+...xn2)==D(x12)+D(x22)+D(x32)+...+D(xn2)==E(x14)−[E(x12)]2+E(x24)−[E(x22)]2+E(x34)−[E(x32)]2+...+E(xn4)−[E(xn2)]2=∫−∞+∞x14e−2x12dx1−1+∫−∞+∞x24e−2x22dx2−1+∫−∞+∞x34e−2x32dx3−1+...+∫−∞+∞xn4e−2xn2dxn−1=???
注意观察,上述第一步的转换用到了独立分布的定义。独立分布的随机变量,其和的方差的等于方差的和。
观察第一项:
∫
−
∞
+
∞
x
1
4
e
−
x
1
2
2
d
x
1
=
x
1
3
[
−
e
−
x
1
2
2
]
∣
−
∞
+
∞
−
∫
−
∞
+
∞
3
x
1
2
[
−
e
−
x
1
2
2
]
d
x
1
=
∫
−
∞
+
∞
3
x
1
2
[
e
−
x
1
2
2
]
d
x
1
=
x
1
[
−
3
e
−
x
1
2
2
]
∣
−
∞
+
∞
−
∫
−
∞
+
∞
[
−
3
e
−
x
1
2
2
]
d
x
1
=
3
\int_{-\infty}^{+\infty}x_1^4 e^{-\frac{x_1^2}{2}} dx_1 = \\ x_1^3 [-e^{-\frac{x_1^2}{2}} ] |_{-\infty}^{+\infty} - \int_{-\infty}^{+\infty}3x_1^2 [-e^{-\frac{x_1^2}{2}} ]dx_1=\\ \int_{-\infty}^{+\infty}3x_1^2 [e^{-\frac{x_1^2}{2}} ]dx_1= \\ x_1 [-3e^{-\frac{x_1^2}{2}} ] |_{-\infty}^{+\infty} - \int_{-\infty}^{+\infty} [-3e^{-\frac{x_1^2}{2}} ]dx_1= 3
∫−∞+∞x14e−2x12dx1=x13[−e−2x12]∣−∞+∞−∫−∞+∞3x12[−e−2x12]dx1=∫−∞+∞3x12[e−2x12]dx1=x1[−3e−2x12]∣−∞+∞−∫−∞+∞[−3e−2x12]dx1=3
因此可得,
χ
2
\chi^2
χ2的方差是3n-n = 2n