Section 13.4 Tests Concerning Variances  Why do we need to test hypothesis about population variance? o We need to certify that the variability in our product is below a certain level (Consistency in quality) o For warrantee purposes, we need to make sure that the chances of failure before the warrantee expires are very small. o Quality Engineers worry about controlling variability for ensuring six-sigma limits  Random Sample of size n from a Normal population with both the Mean and the Variance unknown. 

In Chapter 12, Exercise 12.24 (Assigned Problem in Home Work #5), we learned that the Critical region of the Likelihood ratio test for H 0 :  2   02 against H1 :  2   02 is equivalent to ueu  k , where u=

1 n  ( xi  x )2 n i 1

 02

.

 It was also shown in the lecture that this critical region is a two-tailed region: u  c1or u  c2 .  From Theorem 8.11, (see also Chapter 11) we learned that under H0, sampling distribution of S2 is given by: 2 

(n  1) S 2



2 0

2 , where  =(n-1).

 Now choose (c1,c2) such that

P(Reject H 0 | H 0 )   , i.e., P(c1   2  c2 | H 0 )  1   .

 An easy choice of (c1,c2) is to allocate  / 2 area to the intervals (0, c1 ) and (c2 ,) under the chi-square density with (n-1) degrees of freedom, so that the area inside the interval (c1,c2) equals 1   . Then c1  12 /2, and c2  2 /2, , which are tabulated in Table V, pp 576 for different values of   .05, .025, .01 and .005 and   1,30.  Note that a sample variance is in the “Accept H0” region 2 of the   level test, if and only if  0 is inside the

100(1   )% CI for  2 given by [Theorem 11.9], namely (n  1) s 2 (n  1) s 2 1 n 2  , where s 2 = ( xi  x ) 2 : sample variance.  b a n  1 i 1

 What happens to the LR test for one-sided alternatives: H1 :  2   02 ; or H1 :  2   02 ?

o The first alternative: the null hypothesis is that process is under control, and we want to detect whenever it goes out of control. o The second alternative: the null hypothesis is that process is out of control, and we need to provide evidence that it is under control. 

In this case, it can be proved that the Critical Region of the   level LR test is one tailed: Reject H0 if  2  2 , or  2  12 , , respectively.

 Example: Ex. 13.47, 13.51 and 13.52

Testing the Equality of Two Variances:  Why might we need this? o For the equality of two means for small sample sizes, we needed to assume that the two populations have equal variances. So we need a tool to check if there is evidence against this hypothesis.  Testing H 0 :

 12  1  H 0 :  12   22  H 0 :  12   22  0  22

 Against: H1 : (i) 12   22 ; or (ii) 12   22 or (iii) 12   22 

Notation  S12 and S22 : sample variances for independent random samples of sizes n1 , n 2 from normal populations with unknown variances  12 ,  22 .

 Theorem 8.15 (See also Section 11.7) provides the S12 /  12 sampling distribution of U  2 2 is Snedecor’s FS2 /  2

distribution with 1  n1  1, and  2  n2  1 d.f. S12 o Note that under H0: U  2 and the d.f. S2

1  n1  1, and  2  n2  1 are stated corresponding to

the terms of numerator and denominator. o So, under H0, the ratio V 

1 S22  U S12

F 2 ,1

 Exercise 12.26 asks us to prove a well known result that the LR test for these hypotheses depends on the ratio U and/or V.

o This was an unassigned problem. If you can prove it on your own, you are an excellent candidate for admission to a Grad Program in STAT.]  It follows from the above exercise and Theorem 8.15 that the   level CR for the various alternatives is given by:  Reject H0 if (i) U  f ,1 . 2 ;(ii) V  f , 2 .1 ; and (iii) U  f /2,1 . 2 if U  1; or V  f /2, 2 .1 if U  1.

 The values f.05, ,v and f.01, ,v for different combinations of 1

(

1

, v2

2

1

2

) are tabulated in Table VI, pp 576-578.

 Using statistical software, one can find the PValue for any observed value of the ratio of sample variances. That allows for deciding on rejection or not for significance level  that has been decided in advance as part of the 4-step process for testing hypotheses.  Example: Ex. 13.54

Section 13.5 Test of Hypothesis for Population Proportion(s)  As discussed in Section 11.4-11.5, inference about the probability of success in independent Bernoulli trials is same as the mean of independent observations on binary outcomes. The only difference from a general mean problem is that the population variance in this case also depends on the mean.  If we assume that random variable X i for the ith unit in the population is Binary valued {0,1} [coded values for (H,T), (S,F) (Buy, not Buy) etc.] with P  X i  1   . Then, E ( X i )   ,Var ( X i )   (1   ).

 We wish to test the null hypothesis H0:   0 about the probability of success  from a RS of size n Bernoulli trials, against simple alternatives or composite hypotheses (i)   0 , or (ii)   0 or (iii)   0 .

 In this experiment, the sufficient statistic is X   X i = # of Successes out of n trials. It has a Binomial distribution b( x; n, ) [Appendix B.2]  For this problem, Exercise 12.12(Assigned problem in HW #5) gave a test for simple against simple alternative is a onetailed test based on X. For composite alternatives, the LR test gives the   level critical regions as follows:

 Reject H0 if (i ) x  k , where k is the smallest integer for which (ii ) x  k , where k is the largest integer for which

n

 b( y; n.

y  k k

 b( y; n. y 0

0

0

)  .

)  .

(iii ) x  k /2 or x  k /2 respectively.

   

Example:13.56, 13.57, 13.58, 13.60 The text gives Binomial Probability Tables for n up to 20. Other Tables are available for n up to 100. However, for any of these n, one can find the P-value for the one-tailed or two tailed test for any  0 .

 The   level test rejects the null if P-value <  .  However, for large n [ n0  5 and n(1  0 )  5 ] one can use the CLT.  For n large, CLT implies that X 

1  X i is approximately n

normally distributed with E( X )   ,Var ( X )   (1   ) / n, i.e., ,  Z

X  0

0 (1  0 ) / n



X  n0 n0 (1  0 )

N (0,1) The corresponding

test is same as the test for normal mean discussed in Section 13.2.  Thus the   level test for these hypotheses are given by:  Reject H0 if (i) z  z ,(ii) x   z and (iii) z  z /2 or z   z /2 respectively.

 Examples: 13.63, 13.66

  Note: A better CLT approximation can be obtained by using the continuity correction introduced in Chapter 6, Example 6.5, but we will not pursue this since the test outcome rarely changes, unless the observed value is very close to the cut-off point. In that case, we may want to obtain more information (larger n) anyway.