Mengapa chi square digunakan saat membuat interval kepercayaan untuk varians?


15

Ini adalah pertanyaan yang sangat mendasar. Mengapa kita menggunakan distribusi chi square? Apa arti dari distribusi ini? Mengapa ini distribusi yang digunakan untuk membuat interval kepercayaan untuk varians?

Setiap tempat saya mencari penjelasan hanya menyajikan fakta ini, menjelaskan kapan harus menggunakan chi, tetapi tidak menjelaskan mengapa menggunakan chi, dan mengapa itu terlihat seperti itu.

Banyak terima kasih kepada siapa pun yang dapat mengarahkan saya ke arah yang benar dan itu - benar-benar memahami mengapa saya menggunakan chi ketika saya membuat interval kepercayaan untuk varians.


4
Anda menggunakannya karena - ketika data normal - Q=(n1)s2σ2χn12 . (Ini menjadikanQjumlah yang sangat penting)
Glen_b -Reinstate Monica


1
Bagi mereka yang tertarik dengan aplikasi atau penelitian lebih lanjut ke , Anda akan ingin memperhatikan perbedaan antara distribusi χ 2 ("chi-squared") dan distribusi χ ("chi") (itu adalah akar kuadrat dari χ 2 , tidak mengejutkan). χ2χ2χχ2
whuber

Jawaban:


23

Jawaban cepat

Alasannya adalah karena, dengan asumsi data iid dan , dan mendefinisikan ˉ XXiN(μ,σ2) saat membentuk interval kepercayaan, distribusi sampling yang terkait dengan varians sampel (S2, ingat, variabel acak!) Adalah distribusi chi-square (S2(N-1)/σ2χ2n-1), sama seperti distribusi sampling yang terkait dengan mean sampel adalah distribusi normal standar ((ˉX-μ)

X¯=NXiNS2=N(X¯Xi)2N1
S2S2(N1)/σ2χn12) ketika Anda mengetahui varians, dan dengan siswa-t ketika Anda tidak (( ˉ X -μ)(X¯μ)n/σZ(0,1) ).(X¯μ)n/STn1

Jawaban panjang

Pertama-tama, kita akan membuktikan bahwa mengikuti distribusi chi-square dengan N - 1S2(N1)/σ2N1 derajat kebebasan. Setelah itu, kita akan melihat bagaimana bukti ini berguna ketika menurunkan interval kepercayaan untuk varians, dan bagaimana distribusi chi-square muncul (dan mengapa itu sangat berguna!). Mari kita mulai.

Bukti

Untuk ini, mungkin Anda harus terbiasa dengan distribusi chi-square di artikel Wikipedia ini . Distribusi ini hanya memiliki satu parameter: derajat kebebasan, , dan kebetulan memiliki Moment Generating Function (MGF) yang diberikan oleh: m χ 2 ν ( t ) = ( 1 - 2 t ) - ν / 2 . Jika kita dapat menunjukkan bahwa distribusi S 2 ( N - 1 ) / σ 2 memiliki fungsi menghasilkan momen seperti ini, tetapi dengan ν =ν

mχν2(t)=(12t)ν/2.
S2(N1)/σ2 , maka kita telah menunjukkan bahwa S 2 ( Nν=N1 mengikuti distribusi chi-square dengan N - 1 derajat kebebasan. Untuk menunjukkan ini, perhatikan dua fakta:S2(N1)/σ2N1
  1. Jika kita mendefinisikan,

    Y=(XiX¯)2σ2=Zi2,
    where ZiN(0,1), i.e., standard normal random variables, the moment generating function of Y is given by
    mY(t)=E[etY]=E[etZ12]×E[etZ22]×...E[etZN2]=mZi2(t)×mZ22(t)×...mZN2(t).
    The MGF of Z2 is given by
    mZ2(t)=f(z)exp(tz2)dz=(12t)1/2,
    where I have used the PDF of the standard normal, f(z)=ez2/2/2π and, hence,
    mY(t)=(12t)N/2,
    which implies that Y follows a chi-square distribution with N degrees of freedom.
  2. If Y1 and Y2 are independent and each distribute as a chi-square distribution but with ν1 and ν2 degrees of freedom, then W=Y1+Y2 distributes with a chi-square distribution with ν1+ν2 degrees of freedom (this follows from taking the MGF of W; do this!).

With the above facts, note that if you multiply the sample variance by N1, you obtain (after some algebra),

(N1)S2=n(X¯μ)+(Xiμ)2,
and, hence, dividing by σ2,
(N1)S2σ2+(X¯μ)2σ2/N=(Xiμ)2σ2.
Note that the second term in the left-side of this sum distributes as a chi-square distribution with 1 degree of freedom, and the right-hand side sum distributes as a chi-square with N degrees of freedom. Therefore, S2(N1)/σ2 distributes as a chi-square with N1 degrees of freedom.

Calculating the Confidence Interval for the variance.

When looking for a confidence interval for the variance, you want to know the limits L1 and L2 in

P(L1σ2L2)=1α.
Let's play with the inequality inside the parenthesis. First, divide by S2(N1),
L1S2(N1)σ2S2(N1)L2S2(N1).
And then remember two things: (1) the statistic S2(N1)/σ2 has a chi-squared distribution with N1 degrees of freedom and (2) the variances is always greather than zero, which implies that you can invert the inequalities, because
L1S2(N1)σ2S2(N1)S2(N1)σ2S2(N1)L1,σ2S2(N1)L2S2(N1)S2(N1)L2S2(N1)σ2,
hence, the probability we are looking for is:
P(S2(N1)L2S2(N1)σ2S2(N1)L1)=1α.
Note that S2(N1)/σ2χ2(N1). We want then,
S2(N1)L2N1pχ2(x)dx=(1α)/2   ,N1S2(N1)L1pχ2(x)dx=(1α)/2  
(we integrate up to N1 because the expected value of a chi-squared random variable with N1 degrees of freedom is N1) or, equivalently,
0S2(N1)L2pχ2(x)dx=α/2,S2(N1)L1pχ2(x)dx=α/2.
Calling χα/22=S2(N1)L2 and χ1α/22=S2(N1)L1, where the values χα/22 and χ1α/22 can be found in chi-square tables (in computers mainly!) and solving for L1 and L2,
L1=S2(N1)χ1α/22,L2=S2(N1)χα/22.
Hence, your confidence interval for the variance is
C.I.=(S2(N1)χ1α/22,S2(N1)χα/22).

1
Simply because S2 does not follow a centered chi-square distribution, while S2(N1)/σ2 does and, therefore, its easier to work with. Are you asking for a derivation for that? (i.e., you want someone to show you that S2(N1)/σ2 follows a chi-square distribution with N1 degrees of freedom?)
Néstor

4
It would be helpful to modify this answer to include the very strong but unstated assumption that the sample variance follows a chi-squared distribution when the underlying data are independent and follow a normal distribution. Unlike the theory of the distribution of the sample mean, where in practice its sampling distribution will be approximately Normal to reasonable accuracy in many situations, this same asymptotic behavior tends not to happen with the sample variance (until sample sizes become extremely large).
whuber

1
Oops. So, so true! This actually came from a problem solution that I handed out to some students, where I state on the question all these assumptions. I edited the answer now.
Néstor

1
@user34756 The reason we don't use the distribution of S2 directly is that its distribution depends on the value of a parameter. You may find it useful to investigate the use of pivotal quantities in constructing confidence intervals.
Glen_b -Reinstate Monica

1
Isn't f(z)=ez2/2 instead of f(z)=ez2 ?
Benoît Legat
Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.