Section 6.4 Inferences for Variances. Chi-square probability densities.
-
Upload
tracy-gerald-osborne -
Category
Documents
-
view
215 -
download
0
description
Transcript of Section 6.4 Inferences for Variances. Chi-square probability densities.
Section 6.4 Inferences for Variances
If zzz ,..., 21 are independent standard normal random variables then 2 2 2
1 2 ...z z z has a chi-squared distribution with 2 , Xdf
Chi-square probability densities
Use of Chi-square distribution
Sample variance S2 is used to estimate the population variance 2
Assume that the population is normal.
has a chi-squared distribution with v=n-1 degrees of freedom.
Chi-square probabilities can be found in table B.5.
2
22 )1(
Sn
Then we get a 95% confidence interval:
2
2
2
2 22
( (0.025) (0.975)) 0.95
( 1)( (0.025) (0.975)) 0.95
( 1) ( 1)( ) 0.95(0.975) (0.025)
P Q Q
n sP Q Q
n s n sPQ Q
Confidence interval for 2
ExampleThe soft-drink company wants to control the variability in the amount of fill.
A sample of size 28 was drawn and the sample variance s2=0.0007.
Give a 95% confidence interval about the variance 2.
Solution
• v=n-1=27.•
• What is the CI for ?
20.025 14.573 20.975 43.194
2( 1) (28 1)(0.0007) 0.00044(0.975) 43.194n SQ
2( 1) (28 1)(0.0007) 0.00130(0.025) 14.573n SQ
00130.000044.0 2
To test #: 2 Ho vs 2: #Ha
22 2
1( 1) ~
# nn s
Reject Ho if
)975.0(#
)1(
)025.0(#
)1(
2
2
Qsn
or
Qsn
Equivalently, see if # is in the 95% confidence interval.
Example
The soft-drink company wants to control the variability in the amount of fill.
A sample of size 28 was drawn and the sample variance s2=0.0007.
Use the five-step significance testing format to assess the evidence that the variance is greater than 0.0005.
• 1 &2.
• 3. The test statistic is
• 4. The sample gives
• 5. The observed level of significance is P(a chi-square random variable with 27 d.f>37.8)0.05<P-value<0.1
20
2
: 0.0005
: 0.0005
H
Ha
22
2
( 1)n s
2 (28 1)*0.0007 37.80.0005
Inference for the Ratio of two variances
• For two independent samples from normal distributions, sometimes we want to compare two variances.
• A new distribution called F distribution can be of use here.
F distribution
F-distribution
• A F-distribution has two degrees of freedom:– Numerator degrees of freedom v1– Denominator degrees of freedom v2
– Tables B.6 give quantiles of F-distributions
• For F-distribution
So
• This is particularly useful since in table B.6 only quantiles for p larger than 0.5 are given.
1 2
2 1
,,
1( )(1 )
Q pQ p
3,55,3
1(0.1)(.99)
The ratio of two variances
• When s12 and s2
2 come from independent samples from normal distributions, the variable
where n1-1 and n2-1 are associated degrees of freedom for s1 and s2.
1 2
2 21 1
1, 12 22 2
has an distribution. n nsF Fs
1 21, 1
It is possible to pick appropriate F quantiles L and U such that the probability that the variable falls between L and U corresponds to a desired confidence level.
( ) 0.95( (0.025)n n n
P L F UP Q F Q
1 21, 1
2 21 12 22 2
2 2 21 1 1
2 2 22 2 2
(0.975)) 0.95
( (0.025) (0.975)) 0.95
( ) 0.95(0.975) (0.025)
n
sP Q Qs
s sPQ s Q s
Confidence interval for 12 /2
2
A confidence interval for 22
21 / if given by
2 21 12 22 2
1 1 to S SU S L S
1 2
1 2
1, 1
1, 1
(0.95)
(0.05)n n
n n
U Q
L Q
90%CI
The book’s F tables only give upper quantiles since we can find lower quantiles by interchanging 11 n and 12 n
)95.0(1)05.0(
05.0))95.0(
1(
95.0))95.0(
1(
95.0))95.0((
1,11,1
1,122
21
1,122
21
1,121
22
12
21
12
12
12
nnnn
nn
nn
nn
Qss
P
Qss
P
Qss
P
Example 14 (p.395) Hardness of carbon steel Heat Treated n = 10 22
1 52.7s Cold Treated n = 5 22
2 52.3s
1: 22
21
Ho
Let’s try to find a 90% CI for the ratio of the variances.
2 212 22
9,4
9,44,9
(7.52) 4.6(3.52)
(0.95) 6.00
1 1(0.05) (0.95)3.63
ssU Q
L QF
90% confidence interval 1 14.6 to 4.66 1/ 3.63
So a 90% CI for the ratio between the variances : 0.77 to 16.70Consequently a 90% CI for the ratio between the standard deviationsshould be .87 to 4.07.
is
At 10.0 level we do not reject 1: 22
21
Ho
A five step significance test of equality of variances:2
10 2
2
2
1
2
2
2 2 2 2 2
1 2 1 2 1
2 2 2
1 2 2
2
2
9,4
1. : 1.
2. : 1.
3. Test statistic is 1
7.524. The samples give 4.6
3.525. The p-value is 2P[an F random variable 4.6]=2*(0.05<p<0.1)
So p-value is betwee
H
Ha
s s s s sF
s
f
n 0.1 and 0.2.