1 / 40

Designing a Study

Designing a Study. Material that is not in the text. Sample size needed to get a specified α and β. Prior Result (stated without proof). Extending Results to Other Situations. Today, we will prove the result. Extend it to two independent samples. Extend it to univariate linear regression.

roysantos
Télécharger la présentation

Designing a Study

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Designing a Study • Material that is not in the text. • Sample size needed to get a specified α and β. • Prior Result (stated without proof)

  2. Extending Results to Other Situations • Today, we will prove the result. • Extend it to two independent samples. • Extend it to univariate linear regression.

  3. One Sample Problem • Test: H0: E(Y)=E0. • Alternative: H1: E(Y)>E0. • The distribution of Y is normal under both null and alternative. • Under null, var(Y)=σ02. • Under alternative, E(Y)=E1>E0, and var(Y)=σ12.

  4. Two Independent Sample Problem • Test: H0: E(X)=E(B). • Alternative: H1: E(X)-E(B)>0. • The distribution of Y is normal under both null and alternative. • Under null, var(X)=var(B)=σ02. • Under alternative, E(X)-E(B)=E1>0, and var(X)=var(B)=σ12.

  5. Univariate Linear Regression Problem • Test: H0: β1=0. • Alternative: H1: β1>0. • The distribution of Y is normal under both null and alternative. • Under null, var(Y)=σ02. • Under alternative, β1=E1>0, and var(Y)=σ12.

  6. Step 1: Choose the test statistic and specify its null distribution • One sample test:

  7. Step 1: Choose the test statistic and specify its null distribution • SPECIFY that the sample size in the two groups is the same:

  8. Step 1: Choose the test statistic and specify its null distribution • Use conditions of the null to find:

  9. Bringing sample size into regression design • The sample size n is hidden in the regression results. That is, let:

  10. Step 2: Define the critical value • For the one sample test:

  11. Step 2: Define the critical value • For the two sample test:

  12. Step 2: Define the critical value • For the univariate linear regression test:

  13. Step 3: Define the Rejection Rule • Each test is a right sided test, and so the rule is to reject when the test statistic is greater than the critical value.

  14. Step 4: Specify the Distribution of Test Statistic under Alternative • One sample test:

  15. Step 4: Specify the Distribution of Test Statistic under Alternative • SPECIFY that the sample size in the two groups is the same:

  16. Step 4: Specify the Distribution of Test Statistic under Alternative • Use conditions of the null to find:

  17. Step 5: Define a Type II Error • For the one-sample test, a Type II error occurs when:

  18. Step 5: Define a Type II Error • For the two independent sample test:

  19. Step 5: Define a Type II Error • For the univariate linear regression test:

  20. Step 6: Find β • For a one-sample test:

  21. Step 6: Find β • For a two independent sample test:

  22. Step 6: Find β • For a univariate linear regression test:

  23. Basic Insight • Notice that all three problems have the same basic structure. • That is, if you understand the solution of the one sample test, then you can derive the answer to the other problems.

  24. Step 7: Phrase requirement on β • For example, we seek to “choose n so that β=0.01.” • That is, “choose n so that Pr1{Accept H0}=β=0.01.

  25. Step 7: Phrase requirement on β • For example, we seek to “choose n so that

  26. Step 7: Phrase requirement on β • Notice the parallel phrasing:

  27. Step 7: Phrase requirement on β • That is, “choose n so that:

  28. Step 7: Phrase requirement on β • That is, choose n so that (after algebraic clearing out):

  29. Step 8: State the conclusion • The sample size formula for the one-sample test is clear from the prior slide. • The result for a left sided test has to be worked through but is similar. You must remember to keep all entries positive. This is reasonable if both α and β are constrained to be less than or equal to 0.5. The restriction is not a hardship in practice.

  30. Two independent sample case • Note that there is a factor of 20.5σ0 rather than σ0. • There is a similar adjustment for the alternative standard deviation.

  31. Univariate Linear Regression • Note that the σ0 factor is changed to σ0/σX. • There is a similar adjustment for the alternative standard deviation.

  32. Example Problem Group A • In a clinical trial, 1000 patients suffering from an illness will be randomly assigned to one of two groups so that 500 receive an experimental treatment and 500 receive the best available treatment. The random variable X is the response of a patient to the experimental medicine, and the random variable B is the response of a patient to the best currently available treatment.

  33. Example Problems • Both X and B are normally distributed with σX = σB=600. The null hypothesis to be tested is that E(X)-E(B)=0 against the alternative that E(X)-E(B)>0 at the 0.01 level of significance.

  34. Example Problem 1 in Group A • What is the probability of a Type II error for the test specified in the common section when E(X)-E(B)=125 and σX = σB=600?

  35. Solution to Problem 1 • Test statistic is the difference of the two means. • Under null, distribution is normal, mean 0, and variance {[(600)2/500]+[(600)2/500]}=1440=(37.94)2 • The critical value is 0+2.326(37.94)=88.27. • Then, β=Pr1{TS<88.27}

  36. Solution to Problem 1 • Specify distribution of test statistic under the alternative: difference of two means is normal with mean 125 and variance 1440=(37.94)2. • Find probability: β=Pr{Z<(88.27-125)/37.94}=Pr{Z<-0.97}=0.1660. • The answer is 0.1660; an increase in sample size is needed.

  37. Example Problem 2 in Group A • What is the number n in each group that would have to be taken so that the probability of a Type II error for the test of the null hypothesis in the common section is 0.01 when E(X)-E(B)=125 and the standard deviations of both groups are 600?

  38. Solution to Problem 2 • The error rates α and β are both 0.01, so that |zα| and |zβ| are both 2.326. • The term |E1-E0|=125. • The σ0 term is (2)0.5600=848.5. • The σ1 term is (2)0.5600=848.5.

  39. Solution to Problem 2 • The answer is (31.58)2=998 or more in each group. Note that the total number of subjects is 1996 or more.

  40. Next Class • Design in the univariate regression problem. • Example Computer Problems • Residual Analysis

More Related