sd(x = farmers_count$plots)#> [1] 2.64486
IQR(x = farmers_count$plots)#> [1] 3
quantile(x = farmers_count$plots)#> 0% 25% 50% 75% 100%
#> 1 4 5 7 12
length(x = farmers_count$plots)#> [1] 55
After this tutorial the student should be able to:
name the correct measure for variability given the variable;
determine and interpret the value for the range, interquartile range, percentiles, variance, and standard deviation;
interpret a box plot, side-by-side box plots, and a scatter plot;
choose the correct graph to use (box plot, side-by-side box plots, or scatter plot) given the data.
Read:
The following measures of variability for a sample are discussed: the range, percentiles, the interquartile range, the variance and the standard deviation.
Some books use for the definition of \(s^2\) and \(s\) in the denominator \(n\) instead of \(n - 1\). (Graphing) Calculators usually have both versions, e.g., designated \(\sigma_n\) and \(\sigma_{n - 1}\) for \(s\).
The range equals: \(12 - 1 = 11\).
The first (lower) quartile is the 14th observation, therefore equal to \(4\); the third (upper) quartile is the 42th observation, therefore equals \(7\). The interquartile range is then \(\mbox{IQR} = 7 - 4 = 3\).
The variance is \(s^2 \approx 6.9953\) and the standard deviation is \(s \approx \sqrt{6.9953} \approx 2.645\). Use your (graphing) calculator to check this.
Asking for a numerical summary in R or R Commander, provides not only the mean and the median (as shown in Example 1.3) but also the quartiles. The ‘numerical summary’ function in R Commander numSummary() additionally provides the standard deviation,the IQR, and the number of observations \(n\). These can be also be obtained using the following commands in R:
Read about the box plot:
A researcher did a small study about the cultivation under glass. He asked 33 growers the area of cultivation under glass. The results are shown in Table 2.
The corresponding box plot, constructed in R and displayed in Figure 1, shows that the sample distribution is skewed to the right and that 2 outlying observations (values 98 and 100) are present.
Box plots should not be created for small sample sizes.
Read about the scatter plot:
Read about the side-by-side box plots:
Exercise 2.1 up to and including Exercise 2.4 are in the presentation handouts of Tutorial 2. For answers/feedback check Brightspace.
Watch:
The clip is linked on Brightspace.
For answers/feedback check Brightspace.
A researcher registers the number of plots (variable \(y\)) from 55 farmers having companies of nearly the same size. The results are shown in Table 3.
The R Commander numerical summary output for the number of plots for 55 farmers is given in Table 1.
| mean | sd | IQR | 0% | 25% | 50% | 75% | 100% | n | |
|---|---|---|---|---|---|---|---|---|---|
| 5.490909 | 2.64486 | 3 | 1 | 4 | 5 | 7 | 12 | 55 |
The default R summary output for the number of plots for 55 farmers is:
a. Use the R Commander numerical summary output in Table 1 to determine the range and the IQR. Check your answer with respect to the IQR with the default R summary output provided above.
b. Find the median in the default R summary output provided above and check your answer with the R Commander numerical summary output in Table 1.
c. Check, using the R Commander numerical summary output in Table 1 and a (graphing) calculator, that the variance \(s^2 \approx 6.995\).
Use the data from either
to calculate the range, interquartile range, variance, and standard deviation.
Do either
Replace the two data points as mentioned in the exercise. What will be the result from these changes with respect to the range, interquartile range, variance, and standard deviation? Do not recalculate the requested measures, but provide an argumentation.
Do either
This exercise is slightly modified compared to the version presented in O&L, use the ordered data as provided in Table 2.
The treatment times (in minutes) for patients at a health clinic are as follows:
| 7 | 11 | 13 | 15 | 17 | 20 | 21 | 24 | 28 | 32 |
| 8 | 12 | 13 | 16 | 17 | 20 | 22 | 24 | 29 | 33 |
| 10 | 12 | 14 | 16 | 18 | 21 | 22 | 24 | 29 | 35 |
| 10 | 12 | 15 | 16 | 18 | 21 | 24 | 26 | 29 | 45 |
| 11 | 12 | 15 | 16 | 19 | 21 | 24 | 27 | 31 | 54 |
Do either
Do either