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.

Analysis of variance 325(Intercept) 58.75 2.40 24.43 1.3e−11***SeatGood 6.75 3.40 1.99 0.0705 .PopcornY −2.00 3.40 −0.59 0.5673SeatGood:PopcornY 19.00 4.81 3.95 0.0019**Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1‘ ’ 1Residual standard error: 4.81 on 12 degrees of freedomMultiple R-Squared: 0.855, Adjusted R-squared: 0.819F-statistic: 23.7 on 3 and 12 DF, p-value: 2.50e-05It appears that a good seat and popcorn can go a long way toward a moviegoer’ssatisfaction (at least from this fabricated data). Perhaps new seats and less expensivepopcorn will keep the customers coming back.11.4.4 Problems11.25 A politician’s campaign manager is interested in the effects of television andinternet advertising. She surveys 18 people and records changes in likability after a smalladvertising campaign. Additionally, she records the amount of exposure her subjects haveto the ad campaigns. The data is in Table 11.7. Use an analysis of variance to investigatethe following questions:1. Is there any indication that web advertising alone is effective?2. After controlling <strong>for</strong> television exposure, is there any indication that webadvertising is effective?Table 11.7 Change in likahility of politicianTV ad exposure (viewings) 0 1-2 3+Web exposure N −1 −40−141627Y 1 2 27 5236111.26 The grip (<strong>Using</strong>R) data set contains more data than is used in Example 11.3. Thedata is from four skiers instead of one. You can view the data in a convenient mannerwith the command> ftable(xtabs(UBP ~ person + replicate + grip.type,data=grip))Per<strong>for</strong>m a two-way analysis of variance on the data. Check first to see whether there areany interactions, then see whether the difference in skier or grip has an effect.11.27 In the data set mtcars the variables mpg, cyl, and am indicate the miles pergallon, the number of cylinders, and the type of transmission respectively. Per<strong>for</strong>m a twowayANOVA modeling mpg by the cyl and am, each treated as categorical data.

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

Saved successfully!

Ooh no, something went wrong!