lab4_exercises_new

docx

School

University of Southern California *

*We aren’t endorsed by this school

Course

511A

Subject

Statistics

Date

Apr 3, 2024

Type

docx

Pages

4

Uploaded by MegaElkPerson49

Report
Lab 4 Exercises A. Use QUANTO (available on the virtual desktop) for the two following questions 1. Enter the settings described in Section F of the Lab4 Notes. What is the required N for each of the following changes? (for each below, make only the indicated change to the base settings described in Section F. Revert back to the Section F settings before addressing the next question) a. Increase the desired power to 90% N=____373______ b. Increase the treatment difference to 15 N=____122______ c. Increase the standard deviation to 50 N=____781______ d. Decrease the Type I error to 0.01 N=____415______ e. Assume a 1-sided alternative hypothesis N=____219______ Relative to the sample size N=279 from our base model settings, why do each of the above N’s make sense based on the model parameter that we are changing (the explanation for a. is given as an example)? a. To have a greater chance of detecting a difference, we need larger N b. Increase in treatment difference among N is smaller because shows the strength of effect size. c. Increase in mean of sample and SD increases N d. Type 1 error decreased N increases and margin for error is increased and significance level is decreased. e. One sided hypothesis has N smaller is only testing one side of the sample 2. Revert back to the Section F settings. What is the power to detect the desired treatment difference for the following sample sizes? N=100 Power =____0.39_______ N=200 Power =____0.66_______ N=400 Power =____0.919______
3. Again, revert back to the Section F settings. In the Outcome dialog, click the R- squared radio button. Power will now be computed as a function of the R- squared between Y and treatment. Set R-squared to 3% (0.03). What is the required sample size? N=258 What is the required N for each of the following changes? a. Increase the standard deviation to 50 N=___258_________ b. Change the proportion treated to 30% N=___116_________ What do you notice about the effect of each of these changes on required N when you have constrained the value of R-squared? I noticed that when we constrained the value of R-squared increased N also increase. As power increased to detect the desired treatment difference N also increased. However, when proportion treated increased N decreased, there was no change when standard deviation increased. Why is this so? (Hint: recall the formula for computing a t-statistic based on a correlation coefficient) I think it’s because the greater the proportion the lower the t-statistic mean difference is between the N of variables is so small. Therefore, the correlation coefficient relationship strength is decreased between the two variables
B. Suppose a pacemaker manufacturer suspects a difference exists between the proportions of defective pacemakers produced by two different machines. A study will be conducted to test the hypothesis of interest, with the following assumptions: 1. The outcome Y has a binomial distribution (e.g. the parameters of interest are the proportions of defective pacemakers from each machine) 2. The null hypothesis is Ho: 1 = 2 (Note: we can also phrase this as “No association between machine-type and defective products) 3. There will be random and equal allocation of pacemakers sampled from each machine, so that N/2 will come from machine #1 and N/2 from machine #2. 4. Machine #1 is known from previous experience to produce 3% defective pacemakers. 5. The manufacturer desires a 90% power to detect a difference between the two machines. 6. A 0.05 significance level and 2-sided alternative hypothesis. Use the following, which assumes equal allocation to each group) to program in SAS the computation of required sample size: N = 4 π ( 1 π ) ( Z 1 α + Z 1 β ) 2 Δ 2 Where π is the mean of 1 and 2 [ i.e. , π = ( 1 + 2 )/2 ] and is the difference between 1 and 2 . data a; pi= 0.03 ; pi2= 0.01 ; delta=pi-pi2; pibar=(pi+pi2)/ 2 ; alpha = 0.05 ; sides = 2 ; power = 0.90 ; zalpha =probit( 1 -alpha/sides); zbeta =probit(power); N =(( 4 *pibar)*( 1 -pibar)*(zalpha + zbeta)** 2 )/(delta** 2 ); proc print data =a; run ; 1) Compute N when 2 is 1% __2059.45___ 2) How does your estimate in 1 change if we reduce the expected difference between machines, e.g. setting 2 to 2% __10244.74__ delta=pi-pi2; pibar=(pi+pi2)/ 2 ; alpha = 0.05 ; sides = 2 ; power = 0.90 ; zalpha =probit( 1 -alpha/sides);
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
zbeta =probit(power); N =(( 4 *pibar)*( 1 -pibar)*(zalpha + zbeta)** 2 )/(delta** 2 ); proc print data =a; run ; 3) How does your estimate in 1 change if we reduce the power to 80%? ___1538.38___ data a; pi= 0.03 ; pi2= 0.01 ; delta=pi-pi2; pibar=(pi+pi2)/ 2 ; alpha = 0.05 ; sides = 2 ; power = 0.80 ; zalpha =probit( 1 -alpha/sides); zbeta =probit(power); N =(( 4 *pibar)*( 1 -pibar)*(zalpha + zbeta)** 2 )/(delta** 2 ); proc print data =a; run ; 4) How does your estimate in 1 change if we require a stricter significance level of 0.01? ___2916.36____ data a; pi= 0.03 ; pi2= 0.01 ; delta=pi-pi2; pibar=(pi+pi2)/ 2 ; alpha = 0.01 ; sides = 2 ; power = 0.90 ; zalpha =probit( 1 -alpha/sides); zbeta =probit(power); N =(( 4 *pibar)*( 1 -pibar)*(zalpha + zbeta)** 2 )/(delta** 2 ); proc print data =a; run ; 5) How does your estimate in 1 change if we can assume a 1-sided alternative? ___1678.51____ data a; pi= 0.03 ; pi2= 0.01 ; delta=pi-pi2; pibar=(pi+pi2)/ 2 ; alpha = 0.05 ; sides = 1 ; power = 0.90 ; zalpha =probit( 1 -alpha/sides); zbeta =probit(power); N =(( 4 *pibar)*( 1 -pibar)*(zalpha + zbeta)** 2 )/(delta** 2 ); proc print data =a; run ;