Prepare a frequency distribution table for these data.
Solution: Following the steps described previously, we have the following:
1 Range
2 Number of classes
3 Class width
The six classes used to prepare the frequency distribution table are as follows: 110–under 117, 117–under 124, 124–under 131, 131–under 138, 138–under 145, 145–152.
Note that in the case of quantitative data, each class is defined by two numbers. The smaller of the two numbers is called the lower limit and the larger is called the upper limit. Also note that except for the last class, the upper limit does not belong to the class. For example, the data point 117 will be assigned to class two and not class one. Thus, no two classes have any common point, which ensures that each data point will belong to one and only one class. For simplification, we will use mathematical notation to denote the classes above as
Here, the square bracket symbol “[“ implies that the beginning point belongs to the class, and the parenthesis”)” implies that the endpoint does not belong to the class. Then, the frequency distribution table for the data in this example is as shown in Table 2.3.4.
Table 2.3.4 Frequency table for the data on rod lengths.
Frequency | Relative | Cumulative | |||
Classes | Tally | or count | frequency | Percentage | frequency |
|
/// | 3 |
|
7.5 | 3 |
|
///// // | 7 |
|
17.5 | 10 |
|
///// /// | 8 |
|
20.0 | 18 |
|
///// // | 7 |
|
17.5 | 25 |
|
///// / | 6 |
|
15.0 | 31 |
|
///// //// | 9 |
|
22.5 | 40 |
Total | 40 | 1 | 100 |
The same frequency distribution table can be obtained by using MINITAB as follows:
MINITAB
1 Enter the data in column C1.
2 From the Menu bar select Data Recode To Text. This prompts the following dialog box to appear on the screen.
3 Enter C1 in the box under Recode values in the following columns.
4 Select Recode ranges of values from the pulldown menu next to Method.
5 Enter Lower and Upper endpoints as needed and make sure to change the final upper endpoint to 152.1. Type Recoded values in the interval format as previously shown.
6 Select Lower endpoint only from the pulldown menu next to Endpoints to include. Then, for the Storage location for the recoded columns, select At the end of the current worksheet from the pulldown menu.
7 Now from the Menu bar select Stat Tables Tally Individual Variables. This prompts the following dialog box to appear on the screen:
8 In this dialog box, enter C2 Recoded Data in the box under variables.
9 Check all the boxes under Display and click OK. The frequency distribution table as shown below will appear in the Session window
This frequency distribution table also can be obtained by using R as follows:
USING R
First, we define the required classes using the built in ‘seq()’ function. Then, we use the ‘cut()’ function to assign a corresponding class to each observation. As explained in Example 2.3.2, we then use the ‘table()’ function on class variable and the ‘cusum()’ function on the frequency results. The task can be completed by running the following R code in the R Console window.
#Assign given data to the variable RodData RodData = c(145,140,120,110,135,150,130,132,137,115,142,115,130, 124,139,133,118,127,144,143,131,120,117,129,148,130,121,136,133, 147,147,128,142,147,152,122,120,145,126,151)