R_composite.pdf

If we do not know if the mimic is larger or smaller

This preview shows pages 7–9. Sign up to view the full content.

If we do not know if the mimic is larger or smaller that the model, then we use a two-sided test. Below is the R commands for the power function with = 0 . 05 and n = 16 observations. > zalpha = qnorm(.975) > mu0<-10 > sigma0<-3 > mu<-(600:1400)/100 > n<-16 > pi<-1-pnorm(zalpha-(mu-mu0)/(sigma0/sqrt(n))) +pnorm(-zalpha-(mu-mu0)/(sigma0/sqrt(n))) > plot(mu,pi,type="l") We shall see in the the next topic how these tests follow from extensions of the likelihood ratio test for simple hypotheses. The next example is unlikely to occur in any genuine scientific situation. It is included because it allows us to compute the power function explicitly from the distribution of the test statistic. We begin with an exercise. Exercise 18.6. For X 1 , X 2 , . . . , X n independent U (0 , ) random variables, 2 = (0 , 1 ) . The density f X ( x | ) = 1 if 0 < x , 0 otherwise . Let X ( n ) denote the maximum of X 1 , X 2 , . . . , X n , then X ( n ) has distribution function F X ( n ) ( x ) = P { X ( n ) x } = x n . Example 18.7. For X 1 , X 2 , . . . , X n independent U (0 , ) random variables, take the null hypothesis that lands in some normal range of values [ L , R ] . The alternative is that lies outside the normal range. H 0 : L R versus H 1 : < L or > R . 283

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document