Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit molestiae mollitia laudantium assumenda nam eaque, excepturi, soluta, perspiciatis cupiditate sapiente, adipisci quaerat odio voluptates consectetur nulla eveniet iure vitae quibusdam? Excepturi aliquam in iure, repellat, fugiat illum voluptate repellendus blanditiis veritatis ducimus ad ipsa quisquam, commodi vel necessitatibus, harum quos a dignissimos.
Close Save changesHelp F1 or ? Previous Page ← + CTRL (Windows) ← + ⌘ (Mac) Next Page → + CTRL (Windows) → + ⌘ (Mac) Search Site CTRL + SHIFT + F (Windows) ⌘ + ⇧ + F (Mac) Close Message ESC
To introduce the idea of variability, consider this example. Two vending machines A and B drop candies when a quarter is inserted. The number of pieces of candy one gets is random. The following data are recorded for six trials at each vending machine:
Vending Machine APieces of candy from vending machine A:
mean = 3, median = 3, mode = 3
Vending Maching BPieces of candy from vending machine B:
mean = 3, median = 3, mode = 3
The dot plot for the pieces of candy from vending machine A and vending machine B is displayed in figure 1.4.
They have the same center, but what about their spreads?
There are many ways to describe variability or spread including:
The range is the difference in the maximum and minimum values of a data set. The maximum is the largest value in the dataset and the minimum is the smallest value. The range is easy to calculate but it is very much affected by extreme values. \(Range = maximum - minimum\)
Like the range, the IQR is a measure of variability, but you must find the quartiles in order to compute its value.
The interquartile range is the difference between upper and lower quartiles and denoted as IQR. \begin IQR &=Q3 -Q1\\&=upper\ quartile - lower\ quartile\\&= 75th\ percentile - 25th\ percentile \end
Note! The IQR is not affected by extreme values. It is thus a resistant measure of variability.Find the IQR for the final exam scores example.
24, 58, 61, 67, 71, 73, 76, 79, 82, 83, 85, 87, 88, 88, 92, 93, 94, 97 \(IQR=Q3-Q1=89-70=19\)One way to describe spread or variability is to compute the standard deviation. In the following section, we are going to talk about how to compute the sample variance and the sample standard deviation for a data set. The standard deviation is the square root of the variance.
Variance the average squared distance from the meanPopulation variance \(\sigma^2=\dfrac^N (x_i-\mu)^2>\) where $\mu$ is the population mean and the summation is over all possible values of the population and \(N\) is the population size.\sum_
$\sigma^2$ is often estimated by using the sample variance.
Sample Variance \(s^2=\dfrac^n (x_i-\bar)^2>=\dfrac^n x_i^2-n\bar^2>\) Where $n$ is the sample size and $\bar$ is the sample mean.\sum_
Why do we divide by \(n-1\) instead of by \(n\)?
When we calculate the sample sd we estimate the population mean with the sample mean, and dividing by (n-1) rather than n which gives it a special property that we call an "unbiased estimator". Therefore \(s^2\) is an unbiased estimator for the population variance.
The sample variance (and therefore sample standard deviation) are the common default calculations used by software. When asked to calculate the variance or standard deviation of a set of data, assume - unless otherwise instructed - this is sample data and therefore calculating the sample variance and sample standard deviation.
Calculate the variance for these final exam scores.
24, 58, 61, 67, 71, 73, 76, 79, 82, 83, 85, 87, 88, 88, 92, 93, 94, 97
First, find the mean:
Next, use a table to sum the squared distances. Click to show the full table.Calculate the sample variances for the data set from vending machines A and B yourself and check that it the variance for B is smaller than that for data set A. Work out your answer first, then click the graphic to compare answers.
a. 1, 2, 3, 3, 4, 5 b. 2, 3, 3, 3, 3, 4The standard deviation is a very useful measure. One reason is that it has the same unit of measurement as the data itself (e.g. if a sample of student heights were in inches then so, too, would be the standard deviation. The variance would be in squared units, for example \(inches^2\)). Also, the empirical rule, which will be explained later, makes the standard deviation an important yardstick to find out approximately what percentage of the measurements fall within certain intervals.
Standard Deviation approximately the average distance the values of a data set are from the mean or the square root of the variance
Population Standard deviation \(\sigma=\sqrt\)\sigma^2>It has the same unit as the \(x_i\)’s. This is a desirable property since one may think about the spread in terms of the original unit.
\(\sigma\) is estimated by the sample standard deviation \(s\) :
Sample Standard Deviation \(s=\sqrt\)A rough estimate of the standard deviation can be found using \(s\approx \frac>\)
What happens to measures of variability if we add or multiply each observation in a data set by a constant? We learned previously about the effect such actions have on the mean and the median, but do variation measures behave similarly? Not really.
When we add a constant to all values we are basically shifting the data upward (or downward if we subtract a constant). This has the result of moving the middle but leaving the variability measures (e.g. range, IQR, variance, standard deviation) unchanged.
On the other hand, if one multiplies each value by a constant this does affect measures of variation. The result on the variance is that the new variance is multiplied by the square of the constant, while the standard deviation, range, and IQR are multiplied by the constant. For example, if the observed values of Machine A in the example above were multiplied by three, the new variance would be 18 (the original variance of 2 multiplied by 9). The new standard deviation would be 4.242 (the original standard 1.414 multiplied by 3). The range and IQR would also change by a factor of 3.
Above we considered three measures of variation: Range, IQR, and Variance (and its square root counterpart - Standard Deviation). These are all measures we can calculate from one quantitative variable e.g. height, weight. But how can we compare dispersion (i.e. variability) of data from two or more distinct populations that have vastly different means?
A popular statistic to use in such situations is the Coefficient of Variation or CV. This is a unit-free statistic and one where the higher the value the greater the dispersion. The calculation of CV is:
Coefficient of Variation (CV) \(CV = \dfrac>>\)\textTo demonstrate, think of prices for luxury and budget hotels. Which do you think would have the higher average cost per night? Which would have the greater standard deviation? The CV would allow you to compare this dispersion in costs in relative terms by accounting for the fact that the luxury hotels would have a greater mean and standard deviation.
You are shopping for toilet tissue. As you compare prices of various brands, some offer price per roll while others offer price per sheet. You are interested in determining which pricing method has less variability so you sample several of each and calculate the mean and standard deviation for the sampled items that are priced per roll, and the mean and standard deviation for the sampled items that are priced per sheet. The table below summarizes your results.