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.

Describing populations 149variance 1. A key property of the normal distribution is that <strong>for</strong> any normal randomvariable the z-score, (X−µ)/σ, is a standard normal. This says that areas are determined byz-scores. In Figure 5.5 the two shaded areas are the same, as each represents the area tothe left of 1.5 standard deviations above the mean.We can verify this with the “p” function:> pnorm(1.5, mean=0,sd=1)[1] 0.9332> pnorm(4.75, mean=4,sd=1/2) # same z-score asabove[1] 0.9332Figure 5.5 Two normal densities: thestandard normal, f(x|0,1), andf(x|4,1/2). For each, the shaded areacorresponds to a z-score of 3/2 orless.It is useful to know some areas <strong>for</strong> the normal distribution based on z-scores. Forexample, the IQR is the range of the middle 50%. We can find this <strong>for</strong> the standardnormal by breaking the total area into quarters.> qnorm(c(.25,.5,.75))[1] −0.6745 0.0000 0.6745We use qnorm() to specify the area we want. The mean and standard deviation are takenfrom the defaults of 0 and 1. For any normal random variable, this says the IQR is about1.35σ.How much area is no more than one standard deviation from the mean? We usepnorm() to find this:> pnorm(1)−pnorm(−1)[1] 0.6827

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

Saved successfully!

Ooh no, something went wrong!