Lecture4

advertisement
Two-sample with continuous outcomes
1.
Review of one sample methods.
Example 1. Mean height of the subjects in the nonfracture data set: Height for each of the 200 subjects is
collected. We would like to (a) estimate the average height for the control population; (b) test to see
whether this particular subpopulation has the same average height as the general population, which is
178cm.
a.
b.
c.
Test for mean equal to a fixed number: One sample t-test
Estimate the population mean and the variability of the mean estimator
Confidence interval for the population mean
Work step-by-step on answering each of these questions to help students to recall what they learnt in
BSTT400.
2. Two-sample mean comparison (Non-paired samples)
Example 2. We would like to examine the average heights for the control population and the facture case
population separately. We also want to see if the data contain evidence showing a significant difference in
average height between the two population.
a.
b.
c.
d.
e.
f.
g.
h.
Estimate of average heights for each population.
Estimate the variability of the mean estimates
Compare the mean estimates and assess the variance of the mean difference estimator.
Estimate the variance of the mean difference estimator
Generate the two-sample t-statistics
(1) Variances are equal in the two population.
(2) Variance are not equal but sample sizes are the same
(3) Variance are not equal and sample sizes are different.
confidence intervals for the mean difference
Sample size determination for detect a prespecified difference.
Caution: conditions for applying this test
3. Two-sample median comparison
For the same example, when normality assumption is voilated.
a.
Mood's median test: the null hypothesisis that medians for the two population are the same
(1) Find the median of the combined sample
(2) Count the number of observation above or below the median separately for each sample and form
a 2x2 table
Sample 1
Below the common median
Above the common median
(3) test independence of row and column in the 2x2 table
Sample 2
b.
Mann-Whitney test: the null hypothesis is that medians are equal.
(1) combine the two samples and rank observations in the combined sample
(2) Find the rank sum from one sample (size m), called T. Mann-Whitney's
U=mn+m(m+1)/2-T
where n is the size of the other sample
(3) P-value can be determined by the small sample reference distribution or by the standard normal
distribution for the scaled statistic
Z=(U-mn/2)/(nm(n+m+1)/12)^{1/2}
For the example, applying this test to get the result. Also illustrate how to use SAS to perform the test
Cautious: interpretation of the test result.
Homework #2
Problem 2. The dataset Fracture.txt contains fracture cases in a case-control study, and the dataset
Nonfract.txt contains controls. Both datasets can be downloaded from the course web page.
Performing the following analyses on the datasets.
(a) Test whether the mean ages are different for the control and case population by two sample t-test.
Examine visually whether the assumption for the validity of the test is close to be true.
(b) Test whether the median ages are the same for the control and case population by Mann-Whitney
test. Compare the result with that you obtained in (a). Is there any difference.
(c) Redo (a) and (b) for the variable wt.
Download