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 141This is a weighted average of the values in the range of X.On the spike plot, the mean is viewed as a balancing point if there is a weight assignedto each value in the range of X proportional to the probability.The population standard deviation is denoted by σ (the Greek letter sigma). Thestandard deviation is the square root of the variance. If X is a discrete random variable,then its variance is defined by σ 2 =VAR(X)=E((X−µ) 2 ). This is the expected value of therandom variable (X−µ) 2 . That is, the population variance measures spread in terms of theexpected squared distance from the mean.5.1.2 Continuous random variablesContinuous data is modeled by continuous random variables. For a continuous randomvariable X, it is not fruitful to specify probabilities like P(X=k) <strong>for</strong> each value in therange, as the range has too many values. Rather, we specify probabilities based on thechance that X is in some interval. For example, P(a< X≤b), which would be the chancethat the random variable is more than a but less than or equal to b.Rather than try to enumerate values <strong>for</strong> all a and b, these probabilities are given interms of an area <strong>for</strong> a specific picture.A function f(x) is the density of X if, <strong>for</strong> all b, P(X≤b) is equal to the area under thegraph of f and above the x-axis to the left of b. Figure 5.2 shows this by shading the areaunder f to the left of b. Although in most cases computing these areas is more advancedthan what is covered in this text, we can find their values <strong>for</strong> many different densitiesusing the appropriate group of functions in R.Figure 5.2 P(X≤b) is defined by thearea to left of b under the density ofX<strong>Using</strong> our intuitive notions of probability, <strong>for</strong> f(x) to be a density of X the total area underf(x) should be 1 and f(x)≥0 <strong>for</strong> all x. Otherwise, some intervals could get negativeprobabilities. Areas can also be broken up into pieces, as Figure 5.3 illustrates, showingP(ab).

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

Saved successfully!

Ooh no, something went wrong!