Group Comparisons Part 1

advertisement
Group Comparisons
Part 1
Robert Boudreau, PhD
Co-Director of Methodology Core
PITT-Multidisciplinary Clinical Research Center
for Rheumatic and Musculoskeletal Diseases
Core Director for Biostatistics
Center for Aging and Population Health
Dept. of Epidemiology, GSPH
Flow chart for group comparisons
Measurements to be compared
continuous
discrete
( binary, nominal, ordinal with few values)
Distribution approx normal
or N ≥ 20?
No
Yes
Non-parametrics
T-tests
< next lecture >
Outline For Today
Continuous Distributions
 Normal distribution




Mean
Standard deviation ( computation, interpretation )
Confidence Intervals, t-distribution
Comparing 2-groups
T-tests
Next lecture
 Wilcoxon Rank-Sum (non-parametric)

Confidence Interval
For a Continuous Variable
Aflatoxin levels of raw peanut kernels (n=15).
30, 26, 26, 36, 48, 50, 16, 31, 22, 27, 23, 35, 52,
28, 37
Aflatoxin, a natural toxin produced by certain strains of the mold
Aspergillus flavus and A. parasiticus that grow on peanuts stored
in warm, humid silos. Peanuts aren't the only affected crops.
Aflatoxins have been found in pecans, pistachios and walnuts, as
well as milk, grains, soybeans and spices. Aflatoxin is a potent
carcinogen, known to cause liver cancer in laboratory animals
and may contribute to liver cancer in Africa where peanuts are a
dietary staple.
Aflatoxin levels of raw peanut kernels
Stem-and-leaf plot
Stem (tens)
1
2
3
4
5
Leaf (Units)
6
236678
01567
8
02
Range= max-min= 52-16=36
Mode = 26 (highest frequency)
Aflatoxin levels of raw peanut kernels
30, 26, 26, 36, 48, 50, 16, 31, 22, 27, 23, 35, 52, 28, 37
Q1
median
Q3
16, 22, 23 26, 26, 27, 28, 30, 31, 35, 36, 37, 48, 50, 52
(1st Quartile: 25%)
(3rd Quartile: 75%)
IQR= Q3-Q1= 37-26= 11
<= No outliers
Slightly skewed
Box-and-Whisker Plot
(full Bell-labs version with outliers)
Standard Deviation (SD)

N-1 = degrees of freedom (df)
N datapoints
(total pieces of information)
Parameters estimated: Mean: 1 df, SD: N-1 df


Large SD => data points widely spread out from the
mean
Small SD => data points clustered closely around
the mean
Empirical rule for interpreting SD
in normal distributions
Empirical rule for interpreting SD
Hseih, et. al. Effects of high-intensity exercise
training in a pulmonary rehabilitation programme
for patients with chronic obstructive pulmonary
disease. Respirology (2007) 12:381–388
Age of cohort: 73.9 ± 6.7
(Mean ± SD)
“Patients who completed high-intensity training had
significant improvements in FVC (2.47 ± 0.70 L,
P = 0.024) at rest”.
Rules for interpreting SDs
that apply to any distribution
Chebyshev’s Inequality



At least 50% of the values are within √ 2 SDs
of the mean
At least 75% of the values are within 2 SDs
At least 89% of the values are within 3 SDs
Rules for interpreting SDs
that apply to any distribution
Women’s Health Initiative Observational Study
(WHI-OS) ~ 90,000 women
longitudinal cohort study (8yrs and continuing)
Osteoporotic Fractures Ancillary Substudy

case-control study

1200 cases (fractures), 1200 controls
Inflammatory markers (e.g. IL-6)
Hormones (estradiol), bone mineral density, …
25(OH)2 Vitamin D3 (ng/ml)



Rules for interpreting SDs
that apply to any distribution
Women’s Health Initiative Observational Study
Osteoporotic Fractures Ancillary Substudy

25(OH)2 Vitamin D3 (ng/ml)
mean (SD): 32.8 ± 10.7 (controls)
21.6 ± 13.6 (cases)
Rules for interpreting SDs
that apply to any distribution
Women’s Health Initiative Observational Study
Osteoporotic Fractures Ancillary Substudy
25(OH)2 Vitamin D3 (ng/ml)
mean (SD): 32.8 ± 10.7 (controls)
21.6 ± 13.6 (cases)
Cases: (SD=13.6)
At least 50% within √2 SD’s (21.6 ± 19.2, 2.4 - 40.8 )
At least 75% within 2 SD’s (21.6 ± 27.2, 0 - 48.8 )

Confidence Interval
for a Population Mean
Mean:
Standard error of the mean:
* Standard error is general term for standard deviation of some estimator
Example:
n=19, df=18
1.96  Normal dist (limit)
Aflatoxin levels of raw peanut kernels
n= 15
df=14 (=n-1)
16, 22, 23 26, 26, 27, 28, 30, 31, 35, 36, 37, 48, 50, 52
t 0.025,14= 2.145
95% C.I: 32.47 ± 2.145*(10.63/√15)
= 32.47 ± 2.145*2.744
= 32.47 ± 5.89
= 2.744
95% C.I: (26.58, 38.36)
Aflatoxin levels of raw peanut kernels
n= 15 peanuts sampled from silo
16, 22, 23 26, 26, 27, 28, 30, 31, 35, 36, 37, 48, 50, 52
95% C.I: (26.58, 38.36)
95% C.I.  p < 0.05 (using t-test)
Hypothesis: Mean of entire silo = 30
(p>0.05 => not rejected)
H0: Mean of all silos = 25
(p<0.05 => rejected)
Aflatoxin levels of raw peanut kernels
n= 15 peanuts sampled from silo
95% C.I: (26.58, 38.36)
95% C.I.  p < 0.05 (using t-test)
Hypothesis: Mean of entire silo = 30
t = ( mean – 30 ) / Stderr( mean ) = (32.47 - 30)/2.744 = 0.90
t=0.90, df=14, p = 0.3833
( 0.3833/2= 0.19167 => see table)
t=0.90, df=14, p = 0.3833
( 0.3833/2= 0.19167)
2-sample independent t-test
for comparing means of two groups
 General Formula: stdev = sqrt(variance)
If two independent estimators (e.g. group means):
 Variance(of difference) = sum of variances
2-sample t-test
to compare two groups
Case 1: Equal variances
“pooled” variance estimate
df = n1 + n2 - 2
2-sample t-test
to compare two groups
Case 2: Unequal variances
denom = stderr of numerator
D.F = Welch-Satterthwaite equation (best approx df)
Does Cell Phone Use While Driving
Impair Reaction Times?
Sample of 64 students from Univ of Utah
 Randomly assigned: cell phone group or control
=> 32 in each group
 On machine that simulated driving situations:
=> at irregular periods a target flashed red or green
 Participants instructed to hit “brake button” as soon as
possible when they detected red light
 Control group listened to radio or to books-on-tape
 Cell phone group carried on conversation about a
political issue with someone in another room
Does Cell Phone Use While Driving
Impair Reaction Times ? (milliseconds)
Cell Phone
Control
-------Difference
N
32
32
Mean
585.2
533.7
SD
89.6
65.3
51.5
= sqrt(89.62/32+65.32/32)=19.6
= 56.685
t = 51.5/19.6 = 2.63, p=0.011
Removing one high outlier
from cell phone group
Cell Phone
Control
-------Difference
N
31
32
Mean
573.1
533.7
SD
58.9 (“equal
65.3 variances”)
39.4
= 62.69
(pooled var)
df= n1+n2-2 = 61
t = 39.4/(62.69*√(1/31+1/32)) = 2.52 (p=0.015)
Download