128k views
1 vote
Create a frequency distribution, find the midpoint, relative frequency, cumulative frequency and create a histogram for the following:

Data Set: Highway fuel consumptions (in miles per gallon) for a sample of cars
Number of Classes: 5 classes
32, 35, 28, 40, 30, 42, 55, 40, 45, 24, 28, 34, 40, 36, 34, 40, 30, 25, 28, 32, 40, 35, 25, 44, 26, 39, 38, 42, 45, 32

User Kennes
by
5.1k points

1 Answer

3 votes

First sort the data:

24, 25, 25, 26, 28, 28, 28, 30, 30, 32, 32, 32, 34, 34, 35, 35, 36, 38, 39, 40, 40, 40, 40, 40, 42, 42, 44, 45, 45, 55

Not the size of this data (30) and the range, 55 - 24 = 31.

Now, 31/5 = 6.2, so split up the interval from 24 to 55 into the following 5 classes with equal size:

[1] 24 - 30.2

[2] 30.2 - 36.4

[3] 36.4 - 42.6

[4] 42.6 - 48.8

[5] 48.8 - 55

If a given data has a value in one of these sub-ranges, you place it in that group.

You would end up with the following frequency distribution:

[1] 24, 25, 25, 26, 28, 28, 28, 30, 30

[2] 32, 32, 32, 34, 34, 35, 35, 36

[3] 38, 39, 40, 40, 40, 40, 40, 42, 42

[4] 44, 45, 45

[5] 55

To get the relative frequencies for each class, count the number of data in each class and divide it by the total size of the dataset.

The relative frequencies in this case would be

[1] 9/30 = 3/10

[2] 8/30 = 4/15

[3] 9/30 = 3/10

[4] 3/30 = 1/10

[5] 1/30

The cumulative frequencies are the cumulative sums of the frequencies as you move up from one class to another:

• For any data less than 24, the cumulative frequency is 0

• Up to class [1], the cumulative frequency is 3/10

• Up to class [2], the c.f. is 3/10 + 4/15 = 17/30

• Up to class [3], the c.f. is 17/30 + 3/10 = 26/30 = 13/15

• Up to class [4], the c.f. is 13/15 + 1/10 = 29/30

• Up to class [5] and beyond, the c.f. is 29/30 + 1/30 = 1

The c.f.'s always range from 0 to 1 in this way.

The histogram should roughly look like the one I've attached.

Create a frequency distribution, find the midpoint, relative frequency, cumulative-example-1
User Anudeep Gade
by
4.6k points