Resampling Stats

Order
order online
printed form

Software
Excel
Matlab
XLMiner
Downloads

Books, etc. Intro text online
Articles
Bibliographies

Courses Internet course

Teaching Teaching With RS
Teaching Information
What Students Say
What Teachers Say
What Reviewers Say
What Authors Say

Support User Guides
Troubleshooting

About Contact Mailing List

 
About Resampling



| Basic Commands | Probability Puzzles | Hypothesis Test, Count Data | Hypothesis Test, Measured Data | Confidence Interval, Count Data | Confidence Interval, Measured Data | Association / Correlation | Regression | Other Examples |

Birthweight-1

[permutation test, Monte Carlo style; see BIRTHWEIGHT-2 for a paired sign test and BIRTHWEIGHT-3 for a paired permutation test]

Problem

A drug was administered to 15 women who had previously given birth to underweight babies, to determine whether the drug would increase the birthweight of the next infant. The results are shown in the table below. The top row shows birthweights of the 15 babies born after drug treatment; the bottom row shows birthweights of babies born before drug treatment. Is the difference in mean birthweight between babies born to mothers before treatment and after treatment statistically significant (see Rosner, 1982, p. 257)?

Birthweight-1 Table. Comparison of Birthweights of Babies Born to 15 Women Before and After Drug Treatment

Treatment condition Birthweight of babies by mother
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 mean
After 6.9 7.6 7.3 7.6 6.8 7.2 8.0 5.5 5.8 7.3 8.2 6.9 6.8 5.7 8.6 7.08
Before 6.4 6.7 5.4 8.2 5.3 6.6 5.8 5.7 6.2 7.1 7.0 6.9 5.6 4.2 6.5 6.26

Note. Difference in means = .82

We calculate the difference in mean weight of babies born after drug treatment of their mothers, minus the mean weight of babies born without this treatment. The answer is .82. Could this difference have arisen through random effects even if the drug was not effective?

Null hypothesis (H0): The treatment does not affect birthweight, and the difference in means between the two groups arises by chance. Alternative hypothesis (H1): The treatment increases birthweight.

Resampling Procedure

We want to know whether a single universe of birthweights can give rise to two samples as different as these. We can answer this question by constituting a single universe, drawing resamples from it, and observing how often the resamples differ by as much as the observed samples. What should such a single universe look like? Our best guess about such a universe is simply all the available data in the two samples, pooled.

  1. Pool all birthweights, and write them onto 30 separate balls or slips of paper.
  2. Take without replacement a simulated sample of 15 "treated" weights. The remaining balls are called "untreated." Calculate the difference in mean weights, and record this difference. Return the balls to the urn.
  3. Repeat (2) 1,000 times.
  4. Find out how often the simulation yields a difference between means as big as (or bigger than) the observed difference in means. Because we would not have been interested in scientific results that yielded a smaller average birthweight after treatment, we count only large differences in favor of the resampling "treatment" and not simulated results in the other direction.

Computer Implementation in Resampling Stats

DATA (6.9 7.6 7.3 7.6 6.8 7.2 8.0 5.5 5.8 7.3 8.2 6.9 6.8 5.7 8.6) treatmt

set up a vector with the data for the treated women

DATA (6.4 6.7 5.4 8.2 5.3 6.6 5.8 5.7 6.2 7.1 7.0 6.9 5.6 4.2 6.8) control

This vector contains the data from untreated women. The mean difference in birthweight is .82 (obtained with a hand calculator).

CONCAT treatmt control all

we pool all the data to test whether the observed results could have been obtained from a single universe

REPEAT 1000
  SHUFFLE all all

randomize the data and replace in vector "all"

TAKE all 1,15 treat$

Simulate a sample of 15 "treated" women. The <$> shows a simulation of a real-world group.

TAKE all 16,30 ctrl$

And 15 simulated controls

MEAN treat$ mtreat$

obtain the means from these two simulated groups

MEAN ctrl$ mctrl$
  SUBTRACT mtreat$ mctrl$ diff$

calculate the difference between the means

SCORE diff$ scrboard

keep track of the random differences between the simulated means

END
COUNT scrboard >=.82 more

how often did the simulation produce a weight difference greater than that observed?

DIVIDE more 1000 prob

divide by the number of repetitions to obtain a probability

PRINT more prob
HISTOGRAM scrboard

show the distribution of birthweight differences if a single universe

Results

Frequency histogram of difference between

resampled means

more = 7

prob = 0.007

Conclusion

Only 0.7% of the resampled pairs had differences greater than the observed value of .82. That is, the p-value was 0.007. Because the observed drug effect is outside sampling variability, the null hypothesis is rejected, and we conclude that the drug did increase birthweights.

References

Rosner, B. (1982). Fundamentals of biostatistics. Boston: Duxbury Press.


Home | Order | Software | Books | Courses | Teaching | Support | About | Search | Contact | Mailing List

Site Design by NEW TARGET
Site Hosted by Hagen Hosting
© 2003 Resampling Stats, Inc.
Contact Resampling Stats