10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> R <strong>for</strong> introductory statistics 230■ Example 8.9: Differing dosages of AZTAZT was the first FDA-approved antiretroviral drug used in the care of HIVinfectedindividuals. The common dosage is 300 mg twice daily. Higher dosages cause more sideeffects. But are they more effective? A study done in 1990 compared dosages of 300 mg,600 mg, and 1,500 mg (source http://www.aids.org/). The study found higher toxicitywith greater dosages, and, more importantly, that the lower dosage may be equallyeffective.The p24 antigen can stimulate immune responses. The measurement of p24 levels <strong>for</strong>the 300 mg and 600 mg groups is given by the simulated data in Table 8.4. Per<strong>for</strong>m a t-test to determine whether there is a difference in means.Table 8.4 Levels of p24 in mg <strong>for</strong> two treatmentgroupsAmountp24 level300 mg 284 279 289 292 287 295 285 279 306 298600 mg 298 307 297 279 291 335 299 300 306 291Let µ x be the mean of the 300 mg group, and µ y the mean of the 600 mg group. We cantest the hypothesesH 0 :µ x =µ y , H A :µ x ≠µ ywith a t-test. First, we check to see whether the assumption of a common variance andnormality seems appropriate by looking at two densityplots:> x = c(284, 279, 289, 292, 287, 295, 285, 279, 306,298)> y = c(298, 307, 297, 279, 291, 335, 299, 300, 306,291)> plot(density(x))> lines(density(y), lty=2)The graph (Figure 8.5) shows two density estimates that indicate normally distributedpopulations with similar spreads. As such, the t-test looks appropriate.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!