R_composite.pdf

# N0 2000 t 200 k 400 alpha c005002001 ralpha qhyper1

This preview shows pages 5–8. Sign up to view the full content.

> N0<-2000; t<-200; k<-400 > alpha<-c(0.05,0.02,0.01) > ralpha<-qhyper(1-alpha,t,N0-t,k) > data.frame(alpha,ralpha) alpha ralpha 1 0.05 49 2 0.02 51 3 0.01 53 For example, we must capture al least 49 that were tagged in order to reject H 0 at the = 0 . 05 level. In this case the estimate for N is ˆ N = [ kt/r ] = 1632 . As anticipated, r increases and the critical regions shrinks as the value of decreases. Using the level r determined using the value N 0 for N , we see that the power function ( N ) = P N { R r } . R is a hypergeometric random variable with mass function f R ( r ) = P N { R = r } = ( t r )( N - t k - r ) ( N k ) . The plot for the case = 0 . 05 is given using the R commands > N<-c(1300:2100) > pi<-1-phyper(49,t,N-t,k) > plot(N,pi,type="l",ylim=c(0,1)) We can increase power by increasing the size of k , the number the value in the second capture. This increases the value of r . For = 0 . 05 , we have the table. > k<-c(400,600,800) > N0<-2000 > ralpha<-qhyper(0.95,t,N0-t,k) > data.frame(k,ralpha) k ralpha 1 400 49 2 600 70 3 800 91 We show the impact on power ( N ) of both significance level and the number in the recapture k in Figure 18.3. Exercise 18.4. Determine the type II error rate for N = 1600 with k = 400 and = 0 . 05 , 0 . 02 , and 0.01, and = 0 . 05 and k = 400 , 600 , and 800. 281

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

View Full Document
Introduction to the Science of Statistics Composite Hypotheses 1400 1600 1800 2000 0.0 0.2 0.4 0.6 0.8 1.0 N pi 1400 1600 1800 2000 0.0 0.2 0.4 0.6 0.8 1.0 N pi Figure 18.3: Power function for Lincoln-Peterson mark and recapture test for population N 0 = 2000 and t = 200 captured and tagged. (left) k = 400 recaptured = 0 . 05 (black), 0.02 (red), and 0.01 (blue). Notice that lower significance level reduces power. (right) = 0 . 05 , k = 400 (black), 600 (red), and 800 (blue). As expected, increased recapture size increases power. Example 18.5. For a two-sided test H 0 : μ = μ 0 versus H 1 : μ 6 = μ 0 . In this case, the parameter values for the null hypothesis 0 consist of a single value, μ 0 . We reject H 0 if | ¯ X - μ 0 | is too large. Under the null hypothesis, Z = ¯ X - μ 0 σ / p n is a standard normal random variable. For a significance level , choose z / 2 so that P { Z z / 2 } = P { Z  - z / 2 } = 2 . Thus, P {| Z | z / 2 } = . For data x = ( x 1 , . . . , x n ) , this leads to a critical region C = x ; ¯ x - μ 0 σ / p n z / 2 . If μ is the actual mean, then ¯ X - μ σ 0 / p n is a standard normal random variable. We use this fact to determine the power function for this test ( μ ) = P μ { X 2 C } = 1 - P μ { X / 2 C } = 1 - P μ ¯ X - μ 0 σ 0 / p n < z / 2 = 1 - P μ - z / 2 < ¯ X - μ 0 σ 0 / p n < z / 2 = 1 - P μ - z / 2 - μ - μ 0 σ 0 / p n < ¯ X - μ σ 0 / p n < z / 2 - μ - μ 0 σ 0 / p n = 1 - Φ z / 2 - μ - μ 0 σ 0 / p n + Φ - z / 2 - μ - μ 0 σ 0 / p n 282