# Sample Standard Deviation

1. The following data are collected as part of study of coffee consumption among undergraduate students. The following reflect cups per day consumed:
• 4 6   8   2   1   0   2
1. Compute the sample mean
2. Compute the sample standard deviation
3. Construct a 95% confidence interval for the mean number of cups of coffee consumed among all undergraduates.
1. A clinical trial is conducted to evaluate a new pain medication for arthritis. Participants are randomly assigned to receive the new medication or a placebo. The outcome is pain relief within 30 minutes, and the data are shown below
 Pain Relief No Pain Relief New Medication 44 76 Placebo 21 99
1. Estimate the RD in pain relief between treatments
2. Estimate the RR in pain relief between treatments
3. Estimate the OR in pain relief between treatments
4. Construct 95% CI for OR
5. A clinical trial is conducted to compare an experimental medication to placebo to reduce the symptoms of asthma. Two hundred participants are enrolled in the study and randomized to receive either the experimental medication or placebo. The primary outcome is a self-reported reduction of symptoms. Among 100 participants who receive the experimental medication, 38 report a reduction of symptoms as compared to 21 participants of 100 assigned to the placebo.
1. Generate 95% CI for the difference in proportions of participants reporting a reduction of symptoms between the experimental and placebo groups.
2. Estimate the RR for reduction in symptoms between groups
3. Estimate OR for reduction in symptoms between groups
4. Generate 95% CI for the RR
1. A crossover trial is conducted to compare an experimental medication for migraine headaches to a currently available medication. A total 50 patients are enrolled in the study and each patient receives both treatments. The outcome is the time, in minutes, until the headache pain resolves. Following each treatment, patients record the time it takes until the pain is resolved. Treatments are assigned in random order. The mean different in times between the experimental and currently available medication is -9.4 minutes with a standard deviation of 2.8 minutes. Construct a 95% CI for the mean difference in times between the experimental and currently available medication.
1. A 95% CI for the mean diastolic blood pressure in women is 62 to 110. What is the margin of error? What is the standard error?
1. The data in Table 6-27 are collected in a randomized trial to test the efficacy of a new drug for migraine headaches. The following are characteristics of study participants overall and then organized by the treatment to which they are assigned.
 New Drug (n = 100) Placebo (n = 100) All (n = 200) Mean (SD) age, years 32.8 (4.7) 31.9 (5.1) 32.0 (4.9) % Male 54% 48% 51% % High school graduate 76% 80% 78% Severity of migraine headaches % Mild 22% 20% 21% % Moderate 38% 42% 39% % Severe 40% 38% 39% Median (Q1-Q3) Number of days missed work in past year due to migraine 5 (3 – 12) 6 (2 – 18) 6 (3 – 17) Min – Max number of days missed work in past year due to migraine 0 – 35 0 – 48 0 – 48
1. Generate a 95% CI for the difference in mean ages between groups.
2. Generate a 95% CI for the difference in proportion of male between groups.
3. Generate a 95% CI for the difference in proportion of patients with severe migraine headaches between groups.

Solution

1. The following data are collected as part of study of coffee consumption among undergraduate students. The following reflect cups per day consumed:
• 4 6   8   2   1   0   2
1. Compute the sample mean

Sample Mean          = ∑xi / n

= 3+4+6+8+2+1+0+2/8

= 3.25

1. Compute the sample standard deviation

Sample Standard Deviation        = ( ∑(xi – µ)2/(n-1))1/2

= ((3-3.25)2 + (4-3.25)2 + (6-3.25)2 + (8-3.25)2 + (2-3.25)2 + (1-3.25)2 + (0-3.25)2 + (2-3.25)2/7)1/2

= (0.0625 + 0.5625 + 7.5625 + 22.5625 + 1.5625 + 5.0625 + 10.5625 + 1.5625/7)1/2

= 2.659

1. Construct a 95% confidence interval for the mean number of cups of coffee consumed among all undergraduates.

95% CI           = µ ± z x s/n1/2

= 3.25 ± 1.96 x 2.659/81/2

= 3.25 ± 1.843

= (1.407 ,5.093)

1. A clinical trial is conducted to evaluate a new pain medication for arthritis. Participants are randomly assigned to receive the new medication or a placebo. The outcome is pain relief within 30 minutes, and the data are shown below
 Pain Relief No Pain Relief New Medication 44 76 Placebo 21 99
1. Estimate the RD in pain relief between treatments

Risk Difference        = 44/(44+76) – 21/(21+99)

= 0.192

1. Estimate the RR in pain relief between treatments

Relative Risk             = 44*(21+99) / 21*(44+76)

= 2.095

1. Estimate the OR in pain relief between treatments

Odds Ratio   = 44*99 / 21*76

= 2.729

1. Construct 95% CI for OR

ln(OR) = ln(2.729) = 1.004

SE{ln(OR)}    = (1/44 + 1/76 + 1/21 + 1/99)1/2

= 0.306

95% CI           = exp(ln(OR) ± 1.96*SE{ln(OR)})

= exp(1.004 ± 1.96*0.306)

= exp(1.004±0.5998)

= (exp(0.404), exp(1.604))

= (1.498, 4.973)

1. A clinical trial is conducted to compare an experimental medication to placebo to reduce the symptoms of asthma. Two hundred participants are enrolled in the study and randomized to receive either the experimental medication or placebo. The primary outcome is a self-reported reduction of symptoms. Among 100 participants who receive the experimental medication, 38 report a reduction of symptoms as compared to 21 participants of 100 assigned to the placebo.
 Symptom Reduction No Symptom Reduction Medication 38 62 Placebo 21 79
1. Generate 95% CI for the difference in proportions of participants reporting a reduction of symptoms between the experimental and placebo groups.

RD = 38/(38+62) – 21(21+79) = 0.17

SE{RD} = (38×62/1003 + 21×79/1003)1/2  = 0.063

95% CI           = RD ± 1.96 x SE{RD}

= 0.17 ± 1.96×0.063

= 0.17 ± 0.124

= (0.046, 0.294)

1. Estimate the RR for reduction in symptoms between groups

RR = 38 x (21+79) / 21 x (38+62)

RR = 1.809

1. Estimate OR for reduction in symptoms between groups

OR = 38×79/21×62 = 2.306

1. Generate 95% CI for the RR

RR = 1.809

ln(RR) = ln(1.809) = 0.593

SE{ln(RR)}  =(1/38 + 1/21 – 1/100 – 1/100)1/2  = 0.232

95% CI = exp(ln(RR) ± 1.96 x SE{ln(RR)} )

= exp( 0.593 ± 1.96×0.232)

= exp(0.593 ± 0.455)

= (exp(0.138), exp(1.048))

= (1.148, 2.852)

1. A crossover trial is conducted to compare an experimental medication for migraine headaches to a currently available medication. A total 50 patients are enrolled in the study and each patient receives both treatments. The outcome is the time, in minutes, until the headache pain resolves. Following each treatment, patients record the time it takes until the pain is resolved. Treatments are assigned in random order. The mean different in times between the experimental and currently available medication is -9.4 minutes with a standard deviation of 2.8 minutes. Construct a 95% CI for the mean difference in times between the experimental and currently available medication.

95% CI = µ ± z x s/n1/2

= -9.4 ± 1.96x(2.8/501/2)

= -9.4 ± 0.776

= (-10.176, -8.624)

1. A 95% CI for the mean diastolic blood pressure in women is 62 to 110. What is the margin of error? What is the standard error?

Margin of error = (110-62)/2 = 24

Standard Error = Margin of error/ 1.96 = 12.245

1. The data in Table 6-27 are collected in a randomized trial to test the efficacy of a new drug for migraine headaches. The following are characteristics of study participants overall and then organized by the treatment to which they are assigned.
 New Drug (n = 100) Placebo (n = 100) All (n = 200) Mean (SD) age, years 32.8 (4.7) 31.9 (5.1) 32.0 (4.9) % Male 54% 48% 51% % High school graduate 76% 80% 78% Severity of migraine headaches % Mild 22% 20% 21% % Moderate 38% 42% 39% % Severe 40% 38% 39% Median (Q1-Q3) Number of days missed work in past year due to migraine 5 (3 – 12) 6 (2 – 18) 6 (3 – 17) Min – Max number of days missed work in past year due to migraine 0 – 35 0 – 48 0 – 48
1. Generate a 95% CI for the difference in mean ages between groups.

M1-M2 = 32.8 – 31.9 = 0.9

MSE = s12 + s22 /2 = 4.72 + 5.12 /2 = 24.05

S = (2MSE/n)1/2 = ((2*24.05)/100)1/2 = 0.693

95% CI           = 0.9 ± 1.96×0.693

= 0.9 ± 1.358

= (-0.458, 2.258)

1. Generate a 95% CI for the difference in proportion of male between groups.

p1 = 0.54  p2 = 0.48

SE1 = (0.54*(1-0.54)/100)1/2 = 0.0498

SE2 = (0.48*(1-0.48)/100)1/2 = 0.04996

SE = (SE12 + SE22 )1/2  = 0.0706

95% CI           = p1-p2 ± 1.96 x SE

= 0.06 ± 1.96×0.0706

= (-0.078, 0.198)

1. Generate a 95% CI for the difference in proportion of patients with severe migraine headaches between groups.

p1 = 0.4   p2 = 0.38

SE1 = (0.4*(1-0.4)/100)1/2 = 0.04899

SE2 = (0.38*(1-0.38)/100)1/2 = 0.04854

SE = ( SE12 + SE22 ) ½  = 0.06896

95% CI           = p1-p2 ± 1.96 x SE

= 0.02 ± 1.96×0.06896

= 0.02 ± 0.135

= (-0.115, 0.155)