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 232sample sizes are the same. We get a larger p-value, though, as the degrees of freedomdecrease.8.6.2 Matched samplesThere are times when two samples depend on each other in some way, <strong>for</strong> example,samples from twin studies, where identical or fraternal twins are used as pairs, so thatgenetic or environmental factors can be controlled. For this, the usual two-sample t-test isnot applicable. We mention two examples.■ Example 8.10: Twin studies An industry-sponsored clinical trial(http://www.hairtoday.com/html/propeciatwins.cfm) demonstrates that Finasterideinhibits male-pattern hair loss. How did the researchers show this? They used twotreatment groups: one received a Finasteride treatment, the other a placebo. Arandomized, double-blind study was per<strong>for</strong>med. Hair loss was measured by photographs,hair counts, and questionnaires.What was different about this study was the use of identical twins <strong>for</strong> the treatmentgroups. For each pair of twins, one was randomly assigned to the treatment group and theother to the control group. This allowed the researchers to “control” <strong>for</strong> geneticdifferences—differences that might be so great that the true effect of the Finasteridetreatment could be hidden. The researchers statedAs identical twins share the same genetic makeup, comparison betweenthe responses of each subject in a twin pair, when one receives drug andthe other receives placebo, allows <strong>for</strong> rigorous examination of the effectsdue to drug treatment in a limited number of subjects.■ Example 8.11: Pre- and post-tests Outcomes assessment is an attempt to measurewhether a certain action actually does what it is intended to do. For example, does astatistics book actually work <strong>for</strong> teaching R? Or, does a statistics class make youunderstand the difference between mere sampling variation and a true effect? One way toassess the effectiveness of something is with a pre-test and a post-test. If the scores aremarkedly better on the post-test, then we may be able to attribute the change to theteaching.Imagine a class takes a pre-test and a post-test. Each student has two test scores, X i <strong>for</strong>the first test and the matching Y i <strong>for</strong> the second. How can we test whether there is adifference in the means? We might be tempted to use the t-test, but we should be careful,as the two samples are not independent. This assumption of independence was usedimplicitly when computing the standard error in the test statistic. Besides, what is reallyimportant is the change in the scores X i −Y i .For paired data, even if there are large variations within the samples, we can still test adifference in the means by using a one-sample test applied to the data, X i −Y i .Significance tests <strong>for</strong> paired samplesIf the two sample X 1 , X 2 , …, X n and Y 1 , Y 2 , …, Y n are matched so that the differencesX i −Y i are an i.i.d. sample, then the significance test of hypotheses

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

Saved successfully!

Ooh no, something went wrong!