The Chi-Squared Distribution
The Chi-Squared Distribution
2014/2015
Ira M. Anjasmara
2/24
The 2 Distribution
3/24
The 2 Distribution
/2
x
x /2 1 e /2 , x > 0
( 2 )
(2)
4/24
The 2 Distribution
The 2 Table
The table gives a value of 2, corresponding to the area in the upper tail
(), for a specific degree of freedom (). The tables for the 2
distribution look something like this:
The numbers in the first column give the degrees of freedom; the numbers
in the first row represent the area of the upper tail.
Applied Statistics and Probability
5/24
The 2 Distribution
The 2 Table
The numbers in the main body of the table give the 2 -score
corresponding to those particular values of and , i.e., 2, .
The highlighted value in the table gives the 2 -score for 14 degrees of
freedom, and an area in the upper tail of 0.1 (10%), i.e.: 214,0.1 = 21.0642.
6/24
The 2 Distribution
Hypothesis Testing
The procedure for hypothesis testing of variances follows the same 8-step
procedure as for a t distribution, except we use the following test statistic:
2 =
s2
2
(3)
7/24
The 2 Distribution
Example
8/24
The 2 Distribution
Example
Step 1
Formulate alternative hypothesis: Ha : 2 6= 2500
i.e., test whether the new survey refutes the manufacturers claims.
Formulate null hypothesis: H0 : 2 = 2500
i.e., assume the given precision is correct, and the sample data are
misleading.
Step 2
Determine number of tails.
This is a 2-tailed test, because the null hypothesis has an equality.
9/24
The 2 Distribution
Example
Step 3
Determine level of significance and degrees of freedom:
We are told that the significant level is = 0.05.
From n=30, we get v=30-1=29
Step 4
Determine the critical value of 2 :
We have a 2-tailed test, so we need to find ,/2 = 229,0.025 and
,1/2 = 229,0.975
From the 2 distribution table, we have:
229,0.025 =45.7222
229,0.975 =16.0471
Applied Statistics and Probability
10/24
The 2 Distribution
Example
Step 5
Determine the rejection region:
The null hypothesis will be rejected if 2 6= 2500, so we have the following
situation:
11/24
The 2 Distribution
Example
Step 6
Determine the test statistic (2 -score) from the sample data:
2 =
s2
29 42.42
=
= 20.854
2
502
(4)
Step 7
Compare the test statistic against its critical value:
16.0471 < 20.854 < 45.7222, therefore 2 , and hence s2 , the sample
mean, do not lie in the rejection region.
Hence, we do not reject H0 at the 0.05 significance level.
Step 8
Our sample measurement is compatible with the supposed population
mean at 95% confidence level. Therefore it follows that the measured
precision of the receivers agrees with the manufacturers claims, at this
level.
Applied Statistics and Probability
12/24
The 2 Distribution
Confidence Intervals
If we are given the sample variance (s2 ), the number of observations in the
sample (n), and a significance level (), we can determine a range of
values that the population variance may assume.
The (1 )% confidence interval for the population variance is given by:
s2
s2
2
2,/2
2,1/2
(5)
13/24
The 2 Distribution
Example
A BC-2 analytical stereo plotter is used to repeatedly measure the height
of a control point. A sample of 15 measurements provides a variance of
0.0625 m2 . Develop a 95% confidence interval for the population standard
deviation of the control point height.
We have n = 15 ( = 14), s2 = 0.0625 m2 , = 0.05. So,
2,/2 = 214,0.025 = 26.1190 and 2,1/2 = 214,0.975 = 5.62872
Therefore,
14 0.0625
14 0.0625
2
26.1190
5.62872
0.0335 2 0.1555m2
0.183 2 0.394m
14/24
The 2 Distribution
P-Values
15/24
The 2 Distribution
Example
A manufacturer of handheld GPS receivers claims they have a horizontal
precision of 50 m. In a student project, 30 observations at a standard
survey mark yielded a standard deviation of 42.4 m relative to the mark.
What is the P-value for these data?
=29
2
2 = s
=
2
2942.42
502
= 20.854
16/24
The 2 Distribution
17/24
The 2 Distribution
18/24
The 2 Distribution
k
X
(Oi Ei )2
i=1
Ei
19/24
The 2 Distribution
Example
20/24
The 2 Distribution
Example
Step 1
H0 : p1 =0.5, p2 =0.3, p3 =0.2
Ha : p1 =
6 0.5, p2 6=0.3, p3 6=0.2
Step 2
Determine number of tails. This is a 2-tailed test, because the null
hypothesis has an equality.
Step 3
Determine level of significance and degrees of freedom:
Were told that the significance level is = 0.05.
We have 3 classes, so = 3 1 = 2.
Applied Statistics and Probability
21/24
The 2 Distribution
Example
Step 4
Determine the critical value of 2 :
We have a 2-tailed test, so we have:
2,/2 = 22,0.025 = 7.378
2,1/2 = 22,0.975 = 0.051
Step 5
Determine the rejection region: We are at both ends of the 2 curve,
therefore the rejection regions are 2 < 0.051 and2 > 7.378.
22/24
The 2 Distribution
Example
Step 6
Determine the test statistic (2 -score) from the sample data. First,
determine the expected frequencies:
E1 = 0.5 200 = 100
E2 = 0.3 200 = 60
E3 = 0.2 200 = 40
These are all 5, fulfilling the large sample requirement.
Then, determine the test statistic:
2
3
X
(Oi Ei )2
i=1
Ei
23/24
The 2 Distribution
Example
Step 7
Compare the test statistic against its critical value:
0.051 < 7.34 < 7.378, therefore 2 does not lie in the rejection region.
Hence, we do not reject H0 at the 0.05 significance level.
Step 8
Our sample data are compatible with the expected proportions at 95%
confidence level. Therefore it follows that the expected proportions of
patient arrivals do not need to be changed, at this level.
24/24
The 2 Distribution