Читать книгу Statistics and Probability with Applications for Engineers and Scientists Using MINITAB, R and JMP - Bhisham C. Gupta, Irwin Guttman - Страница 101
MINITAB
Оглавление1 Enter the data in column C1.
2 From the Menu bar, select Graph Boxplot. This prompts a dialog box to appear. In this dialog box, select simple and click OK. This prompts another dialog box to appear.
3 In this dialog box, enter C1 in the box under the Graph variables and click OK. Then, the box plot shown in Figure 2.8.3 will appear in the Session window.
Figure 2.8.3 MNITAB printout of box plot for the data in Example 2.8.1.
USING R
We can use a built in ‘boxplot()’ function in R to generate box plots. Extra arguments such as inserting a heading, labeling ‐axis, and coloring can be done as shown in the following R code.
NoiseLevels = c(75,79,80,85,88,89,95,96,97,99,104,105,110,115,140) #To plot boxplot boxplot(NoiseLevels, main = ‘Box plot of Noise Levels (dB)’, ylab = ‘Noise Levels (dB)’, col = ‘grey’)
Example 2.8.2 (Bus riders') From the bus riders' data in Example 2.7.4, we have
12 | 12 | 14 | 15 | 16 | 16 | 16 | 16 | 17 | 17 | 17 | 18 | 18 | 18 | 19 | 19 | 20 | 20 | 20 | 20 |
20 | 20 | 20 | 20 | 21 | 21 | 21 | 22 | 22 | 23 | 23 | 23 | 24 | 24 | 25 | 26 | 26 | 28 | 28 | 28 |
1 Find the mean, mode, and median for these data.
2 Prepare the box plot for the data.
3 Using the results of parts (a) and (b), verify if the data are symmetric or skewed. Examine whether the conclusions made using the two methods, the results of part (a) and (b) about the shapes of the distribution, are the same or not.
4 Using the box plot, check if the data contain any outliers.
5 If in part (c) the conclusion is that the data are symmetric, then find the standard deviation and verify if the empirical rule holds or not.
Solution: The sample size in this problem is n = 40. Thus, we have
1 Mean , mode , and median
2 To prepare the box plot, we first find the quartiles , , and .Rank of Rank of Rank of .Since the data presented in this problem are already in the ascending order, we can easily see that the quartiles , , and areThe interquartile range is IQR . Thus, Figure 2.8.4 Box plot for the data in Example 2.8.2.The box plot for the data is as shown in Figure 2.8.4.
3 Both parts (a) and (b) lead to the same conclusion; that is, the data are symmetric.
4 From the box plot in Figure 2.8.4, it is clear that the data do not contain any outliers.
5 In part (c), we concluded that the data are symmetric, so we can proceed to calculate the standard deviation and then determine whether or not the empirical rule holds.Thus, the standard deviation is . Now it can be seen that the intervalcontains 72.5% of the data and contains 100% of the data.
The data are slightly more clustered around the mean. But for all practical purposes, we can say that the empirical rule holds.