Lecture 02: Statistical Inference for Binomial Parameters
Total Page:16
File Type:pdf, Size:1020Kb
Lecture 02: Statistical Inference for Binomial Parameters Dipankar Bandyopadhyay, Ph.D. BMTRY 711: Analysis of Categorical Data Spring 2011 Division of Biostatistics and Epidemiology Medical University of South Carolina Lecture 02: Statistical Inference for Binomial Parameters – p. 1/50 Inference for a probability • Phase II cancer clinical trials are usually designed to see if a new, single treatment produces favorable results (proportion of success), when compared to a known, ‘industry standard’). • If the new treatment produces good results, then further testing will be done in a Phase III study, in which patients will be randomized to the new treatment or the ‘industry standard’. • In particular, n independent patients on the study are given just one treatment, and the outcome for each patient is usually 1 if new treatment shrinks tumor (success) Yi = , ( 0 if new treatment does not shrinks tumor (failure) i = 1,...,n • For example, suppose n = 30 subjects are given Polen Springs water, and the tumor shrinks in 5 subjects. • The goal of the study is to estimate the probability of success, get a confidence interval for it, or perform a test about it. Lecture 02: Statistical Inference for Binomial Parameters – p. 2/50 • Suppose we are interested in testing H0 : p = .5 where .5 is the probability of success on the “industry standard" As discussed in the previous lecture, there are three ML approaches we can consider. • Wald Test (non-null standard error) • Score Test (null standard error) • Likelihood Ratio test Lecture 02: Statistical Inference for Binomial Parameters – p. 3/50 Wald Test For the hypotheses H0 : p = p0 H : p = p A 6 0 The Wald statistic can be written as pb−p0 zW = SE b− = p p0 √pb(1−pb)/n Lecture 02: Statistical Inference for Binomial Parameters – p. 4/50 Score Test Agresti equations 1.8 and 1.9 yield y n y u(p0)= − p0 − 1 p0 − n ι(p0)= p0(1 p0) − u(p0) zS = 1/2 [ι(p0)] = (some algebra) b− = p p0 √p0(1−p0)/n Lecture 02: Statistical Inference for Binomial Parameters – p. 5/50 Application of Wald and Score Tests • Suppose we are interested in testing H0 : p = .5, • Suppose Y = 2 and n = 10 so p = .2 • Then, b (.2 .5) ZW = − = 2.37171 .2(1 .8)/10 − − and p (.2 .5) ZS = − = 1.89737 .5(1 .5)/10 − − • Here, ZW > ZS and at the α =p 0.05 level, the statistical conclusion would differ. Lecture 02: Statistical Inference for Binomial Parameters – p. 6/50 Notes about ZW and ZS • Under the null, ZW and ZS are both approximately N(0, 1) . However, ZS ’s sampling distribution is closer to the standard normal than ZW so it is generally preferred. • When testing H0 : p = .5, Z Z | W |≥| S | i.e., (p .5) (p .5) − − ˛ ˛≥ ˛ ˛ ˛ p(1 p)/n ˛ ˛ .5(1 .5)/n ˛ ˛ − ˛ ˛ − ˛ ˛ b ˛ ˛ b ˛ • ˛ p ˛ ˛ p ˛ Why ? Note that ˛ b b ˛ ˛ ˛ p(1 p) .5(1 .5), − ≤ − i.e., p(1 p) takes on its maximum value at p = .5: − b b p .10 .20 .30 .40 .50 .60 .70 .80 .90 p(1-p) .09 .16 .21 .24 .25 .24 .21 .16 .09 • Since the denominator of Z is always less than the denominator of Z , Z Z W S | W |≥| S | Lecture 02: Statistical Inference for Binomial Parameters – p. 7/50 • Under the null, p = .5, p(1 p) .5(1 .5), − ≈ − so b b Z Z | S |≈| W | • However, under the alternative, H : p = .5, A 6 ZS and ZW could be very different, and, since Z Z , | W |≥| S | the test based on ZW is more powerful (when testing against a null of 0.5). Lecture 02: Statistical Inference for Binomial Parameters – p. 8/50 • For the general test H0 : p = po, for a specified value po, the two test statistics are (p po) ZS = − po(1 po)/n b − and p (p po) ZW = − p(1 p)/n b − • For this general test, there is no strict rulep that b b Z Z | W |≥| S | Lecture 02: Statistical Inference for Binomial Parameters – p. 9/50 Likelihood-Ratio Test • It can be shown that L(p HA) 2 2 log | = 2[log L(p HA) log L(po H0)] χ1 L(po H0) | − | ∼ | ff b where b L(p H ) | A is the likelihood after replacing p by its estimate, p, under the alternative (H ), and b A L(po H0) b | is the likelihood after replacing p by its specified value, po, under the null (H0). Lecture 02: Statistical Inference for Binomial Parameters – p. 10/50 Likelihood Ratio for Binomial Data • For the binomial, recall that the log-likelihood equals n log L(p) = log + y log p +(n y) log(1 p), y ! − − • Suppose we are interested in testing H0 : p = .5 versus H0 : p = .5 6 • The likelihood ratio statistic generally only is for a two-sided alternative (recall it is χ2 based) • Under the alternative, n log L(p HA) = log + y log p +(n y) log(1 p), | y ! − − b b b • Under the null, n log L(.5 H0) = log + y log .5+(n y) log(1 .5), | y − − ! Lecture 02: Statistical Inference for Binomial Parameters – p. 11/50 Then, the likelihood ratio statistic is n 2[log L(p HA) log L(po H0)] = 2 log + y log p +(n y) log(1 p) | − | " y ! − − # n b 2 log + y logb .5+(n y) log(1 b .5) − " y ! − − # b −b = 2 y log p +(n y) log 1 p .5 − 1−.5 h “ ” “ ”i − = 2 y log y +(n y) log n y , .5n − (1−.5)n h ` ´ “ ”i 2 which is approximately χ1 Lecture 02: Statistical Inference for Binomial Parameters – p. 12/50 Example • Recall from previous example, Y = 2 and n = 10 so p = .2 • Then, the Likelihood Ratio Statistic is b .2 .8 2 2 log + (8) log = 3.85490(p = 0.049601) .5 .5 » „ « „ «– • Recall, both ZW and ZS are N(0,1), and the square of a N(0,1) is a chi-square 1 df. • 2 2 2 Then, the Likelihood ratio statistic is on the same scale as ZW and ZS , since both ZW 2 and ZS are chi-square 1 df • For this example 2 2 (.2 .5) ZS = − = 3.6 " .5(1 .5)/10 # − and p 2 2 (.2 .5) ZW = − = 5.625 " .2(1 .8)/10 # − • p 2 2 The Likelihood Ratio Statistic is between ZS and ZW . Lecture 02: Statistical Inference for Binomial Parameters – p. 13/50 Likelihood Ratio Statistic For the general test H0 : p = po, the Likelihood Ratio Statistic is p 1 p 2 2 y log +(n y) log − χ1 po − 1 po ∼ » „ « „ − «– b b asymptotically under the null. Lecture 02: Statistical Inference for Binomial Parameters – p. 14/50 Large Sample Confidence Intervals • In large samples, since p(1 p) p N p, − , ∼ n „ « we can obtain a 95% confidenceb interval for p with p(1 p) p 1.96 − ± r n b b • However, since 0 p 1, we wouldb want the endpoints of the confidence interval to ≤ ≤ be in [0, 1], but the endpoints of this confidence interval are not restricted to be in [0, 1]. • When p is close to 0 or 1 (so that p will usually be close to 0 or 1), and/or in small samples, we could get endpoints outside of [0,1]. The solution would be the truncate the interval endpoint at 0 or 1. b Lecture 02: Statistical Inference for Binomial Parameters – p. 15/50 Example • Suppose n = 10, and Y = 1, then 1 p = = .1 10 and the 95% confidence interval is b p(1 p) p 1.96 − , ± r n b b b .1(1 .1) .1 1.96 − , ± r 10 [ .086,.2867] − • After truncating, you get, [0,.2867] Lecture 02: Statistical Inference for Binomial Parameters – p. 16/50 Exact Test Statistics and Confidence Intervals Unfortunately, many of the phase II trails have small samples, and the above asymptotic test statistics and confidence intervals have very poor properties in small samples. (A 95% confidence interval may only have 80% coverage–See Figure 1.3 in Agresti). In this situation, ‘Exact test statistics and Confidence Intervals’ can be obtained. One-sided Exact Test Statistic • The historical norm for the clinical trial you are doing is 50%, so you want to test if the response rate of the new treatment is greater then 50%. • In general, you want to test H0:p = po = 0.5 versus HA:p>po = 0.5 Lecture 02: Statistical Inference for Binomial Parameters – p. 17/50 • The test statistic Y = the number of successes out of n trials Suppose you observe yobs successes ; Under the null hypothesis, np = Y Bin(n,po), ∼ i.e., b n y n−y P (Y = y H0:p = po)= po (1 po) | y ! − • When would you tend to reject H0:p = po in favor of HA:p>po Lecture 02: Statistical Inference for Binomial Parameters – p. 18/50 Answer Under H0:p = po, you would expect p po ≈ (Y npo) ≈ Under HA:p>po, you would expectbp>po (Y >npo) i.e., you would expect Y to be ‘large’b under the alternative. Lecture 02: Statistical Inference for Binomial Parameters – p. 19/50 Exact one-sided p-value • If you observe yobs successes, the exact one-sided p-value is the probability of getting the observed yobs plus any larger (more extreme) Y p value = P (Y y H :p = po) − ≥ obs| 0 n n j n−j = j=y po(1 po) obs j ! − P Lecture 02: Statistical Inference for Binomial Parameters – p.