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.

Univariate data 61Figure 2.15 Galaxies data ismultimodal; OBP data is unimodaldistributions have very little in the middle and a lot at the ends. Surprisingly, thesedistribution show up in unlikely places. Economic data can show this shape—e.g., thevanishing middle class—as can grade distributions. A more theoretical example is thelocation of the last tie in a game of chance. Imagine a coin is tossed 100 times, and arunning count of heads and tails is kept. After 100 tosses, the number of heads may bemore than the number of tails, the same, or less. The last tie is defined as the last toss onwhich there were the same number of heads as tails. This is a number in the range of 0 to100. A simulation of this was done 200 times. The results are stored in the data set last.tie (<strong>Using</strong>R). A histogram of the data is shown in Figure 2.16.Figure 2.16 An example of asymmetric, well-shaped distribution.This graphic shows 200 simulationsof 100 coin tosses. For eachsimulation, the location of the lasttime there are an equal number ofheads and tails is recorded.

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

Saved successfully!

Ooh no, something went wrong!