Assignment 5

Sample Size Determination for Paired and Two-Sample t-Tests

———————————————————-

Question 1: Aspirin study — paired t-test

H0: mu_B >= mu_A

Ha: mu_B < mu_A

Equivalently, defining D = A - B:

H0: mu_D <= 0 versus Ha: mu_D > 0

———————————————————-

aspirin <- power.t.test( delta = 1.5, # Expected mean paired difference (%) sd = 3, # Standard deviation of paired differences sig.level = 0.05, power = 0.75, type = “paired”, alternative = “one.sided” )

aspirin

Round upward to obtain the required number of participants

aspirin_participants <- ceiling(aspirin$n) aspirin_participants

Each participant provides two urine specimens: one for A and one for B

aspirin_specimens <- 2 * aspirin_participants aspirin_specimens

Conclusion: I will Enroll 23 participants and collect 46 urine specimens.

Question 1 (Paired t-test, Aspirin):

n = 23 participants

specimens = 2 * 23 = 46 urine specimens

———————————————————-

Question 2: Infant walking study — two-sample t-test

H0: mu_active >= mu_control

Ha: mu_active < mu_control

———————————————————-

infants <- power.t.test( delta = 0.5, # Difference is half the pooled standard deviation sd = 1, # Standardized scale sig.level = 0.10, power = 0.85, type = “two.sample”, alternative = “one.sided” )

infants

Required number of infants in each group

infants_per_group <- ceiling(infants$n) infants_per_group

Total number of infants

total_infants <- 2 * infants_per_group total_infants

Conclusion: I will Enroll 44 infants per group, for 88 infants total.

Question 2 (Two-sample t-test, Infant Walking):

n = 44 infants per group

total = 2 * 44 = 88 infants