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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Bivariate data 73Figure 3.1 Segmented and side-bysidebarplots showing distribution ofchild’s seat-belt usage depending onwhether parent is buckled orunbuckledthe primary distribution, then we need to flip the table around. This is done with thetranspose function, t(), as in barplot(t(x)).Sometimes a relationship is better presented as proportions than counts. To do this, weapply prop. table() prior to the barplot.3.1.6 Problems3.1 Find an example of a two-way contingency table in the media. Identify the twovariables and summarize the data that is presented.3.2 Wired magazine announced that as of July 2003 the percentage of all e-mail that isspam (junk e-mail) is above 50% and climbing. A user may get over 100 e-mail messagesa day, making spam a time-consuming and expensive reality. Table 3.3 lists the amountof spam in commercial e-mail and the total amount of commercial e-mail by year withsome predicted amounts. Enter in the data and then recreate the table. Make a segmentedbarplot showing the amount of spam and the total amount of e-mail.Table 3.3 Volume of spam in commercial e-mail(in billions)2000 2001 2002 2003 2004 2005spam 50 110 225 315 390 450total 125 210 375 475 590 700Source: Wired magazine September 20033.3 The data set coins (<strong>Using</strong>R) contains the number of coins in a change bin and theyears they were minted. Do the following:1. How much money is in the change bin?

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

Saved successfully!

Ooh no, something went wrong!