Frequency distribution: collecting data in the field

00Comment iconComment iconComment iconComment icon

The first step of statistics is collecting data, okay. And how will we collect this data?

Writer image

Translated byEditorial

Writer image

Revised byEditorial

Edit Article

Frequency Distribution Forms

Variables can be observed and studied much more easily when we arrange values in an ordered column and place, next to each value, the number of times it appears repeated.

Simple Frequency

We call frequency the number of repetitions of a given value of the studied variable. Frequency distribution is the analysis of all these frequencies and how they are distributed.

As an example, let’s analyze a frequency distribution table of the heights of students in a given class:

Height (cm)Frequency
1511
1520
1532
1541
1554
1563
1571
1582
1590
1605
1614
1623
1632
1643
1651
1661

Frequency by Class

But this process is still inconvenient, since it takes up a lot of space, even when the number of values of the variable (n) is reasonably large. When possible, the most acceptable solution, due to the very nature of the continuous variable, is to group the values into several intervals. For example:

Height (cm)Frequency
150 - 1558
155 - 16011
160 - 16513
165 - 1701

The intervals created are called classes. In the table above, on the right, we can see the frequency of each class.

> Frequency classes, or simply classes, are intervals of variation of the variable.

Frequency Nomenclature

Extremes

> We also call the extremes of each class class limits

In this case there is the lower and upper limit of each class. In the previous examples, the lower limits would be: 150, 155, 160, 165; and the upper limits: 155, 160, 165, 170.

Amplitude

> Amplitude of a class interval, or simply amplitude, is the measure of the interval that defines the class.

It is obtained by the difference between the upper and lower limits. In the previous examples, there are the following amplitudes for each class in order: 5.

\[ \text{amplitude: } 155 - 150 = 160 - 155 = 165 - 160 = 170 - 165 = 5 \]

Total amplitude of the distribution

> Total amplitude of the distribution is the difference between the upper limit of the last class and the lower limit of the first class. Or also the difference between the smallest value and the largest.

In the example, the total amplitude would be 20, because the lower limit of the first class is 150 and the upper limit of the last class is 170.

Number of classes

The first concern we have in a frequency distribution is determining the number of classes.

Normally, Sturges' rule is used, which gives us the number of classes from the following function:

\[ \text{number of classes = } 1 + 3.3 * log(n) \]

The amplitude of each class is given by dividing the total amplitude by the number of classes:

\[ \text{amplitude of each class = } \frac{\text{total amplitude}}{\text{number of classes}} \]

Types of Frequency

Simple or absolute frequency

> Simple or absolute frequency are the values that actually represent the number of data in each class

Example:

Height (cm)Simple frequency
150 - 1558
155 - 16011
160 - 16513
165 - 1701

Relative frequency

> Relative frequency are the values of the ratios between the simple frequencies and the total frequency

Example with total 33:

Height (cm)Relative frequency
150 - 1558/33
155 - 16011/33
160 - 16513/33
165 - 1701/33

Cumulative frequency

> Cumulative frequency is the total of the frequencies of all values lower than the upper limit of the interval of a given class.

Height (cm)Cumulative frequency
150 - 1558
155 - 16019
160 - 16532
165 - 17033

Relative cumulative frequency

> Relative cumulative frequency is the cumulative frequency of the classes divided by the total of the distribution.

Example with total 33:

Height (cm)Relative cumulative frequency
151 - 1558/33
156 - 16019/33
161 - 16532/33
166 - 17033/33

Graphical Representation

In addition to the bar graph or histogram to graphically represent a frequency distribution, we can use the following possibilities.

Frequency Polygon

For a graphical representation of the frequency distribution, the frequency polygon is used.

> The frequency polygon is a line graph, with the frequencies marked on perpendiculars to the horizontal axis, raised by the midpoints of the class intervals.

Example:

Image content of the Website

Cumulative Frequency Polygon

> The cumulative frequency polygon is drawn by marking the cumulative frequencies on perpendiculars to the horizontal axis, raised at the points corresponding to the upper limits of the class intervals.

Example:

Image content of the Website

The Shapes of Frequency Curves

Bell-shaped Curves

> They are characterized by having a maximum value in the central region. They are the most commonly found in nature. Examples: heights, student grades, daily growth of stock prices, etc...

They can be symmetric:

Image content of the Website

And they can be asymmetric:

Image content of the Website

The asymmetric ones can be skewed to the right or left, or respectively positive or negative asymmetrical.

J-shaped Curves

> These are related to extremely asymmetric distributions. Normally found in exponential functions. Examples: population growth, value of a fund, product prices over time.

Image content of the Website

U-shaped Curves

> These are related to distributions that present maximum ordinates at both extremes. They can be found in very specific situations: temperature throughout the year, mortality rate by age.

Image content of the Website

Transformations in the frequency table

Smoothed curve: when the sample curve does not come out as we expected

If you plot a histogram of the heights of 100 people, it may have irregular peaks and valleys. Making the smoothed curve (or smoothed) after collecting the frequencies of a sample is a common technique in statistics and data analysis, especially when working with histograms or empirical distributions. This smoothing is done for several important reasons:

  1. Reduction of Noise and Random Fluctuations
  2. Better Visualization of the Real Distribution
  3. Facilitate Comparisons and Interpretations
  4. Estimate Probabilities in a Continuous Way

The most common smoothing techniques are: Kernel Density Estimation (KDE), Moving Averages or Splines (Non-Parametric Regression). Let’s understand here the simplest method for making the smoothed curve. The simple moving average (SMA) of order n n is calculated as:

\[ SMA_t = \frac{x_t + x_{t-1} + x_{t-2} + \dots + x_{t-n+1}}{n} \]

Where:

- \( x_t \) = value at time \( t \)

- \( n \) = number of periods considered

Suppose we collected the following daily frequencies of accesses to a website during 10 days:

Day (\( t \))Accesses (\( x_t \))
1120
2150
3130
4170
5160
6140
7190
8180
9170
10200

We apply the formula for the days starting from the 3rd:

- Day 3:

\[ SMA_3 = \frac{130 + 150 + 120}{3} = \frac{400}{3} \approx 133.3 \]

- Day 4:

\[ SMA_4 = \frac{170 + 130 + 150}{3} = \frac{450}{3} = 150 \]

- Day 5:

\[ SMA_5 = \frac{160 + 170 + 130}{3} = \frac{460}{3} \approx 153.3 \]

... and so on until Day 10.

Day (\( t \))Accesses (\( x_t \))SMA(3) (Smoothed Curve)
1120-
2150-
3130133.3
4170150.0
5160153.3
6140156.7
7190163.3
8180170.0
9170180.0
10200183.3

See the final result: the smoothed curve does not have the sudden "jumps" of the initial sample distribution, smoothing its curve.

Smoothed curve vs real sample curve
Smoothed curve vs real sample curve

Other transformations

In addition to the smoothed curve (smoothing), there are several mathematical transformations applied to data to improve their distribution, linearity, or interpretation. Below is a summary of the main ones:

TransformationFormulaWhen to UseApplication Example
Logarithmic\( \log(x) \) or \( \ln(x) \)Data with positive skewness (long right tail).Income, city size, stock prices.
Square Root\( \sqrt{x} \)Count data (Poisson) or moderate skewness.Number of clicks, accidents per day.
Inverse\( \frac{1}{x} \)Inverse relationships (e.g., time vs. speed).Time between events, failure rates.
Box-Cox\( \frac{x^\lambda - 1}{\lambda} \)Normalization of non-linear data (adjusts \( \lambda \) automatically).Data with non-constant variance.
Standardization (Z-score)\( \frac{x - \mu}{\sigma} \)When a comparable scale is needed (mean=0, sd=1).Machine Learning, algorithms sensitive to scale.
Min-Max Normalization\( \frac{x - \min(X)}{\max(X) - \min(X)} \)Data in fixed intervals (e.g., [0, 1]).Neural networks, images (pixels).

Exercises

1) The grades obtained by 50 students in a class were:

1 2 3 4 5 6 6 7 7 8

2 3 3 4 5 6 6 7 8 8

2 3 4 4 5 6 6 7 8 9

2 3 4 5 5 6 6 7 8 9

2 3 4 5 5 6 7 7 8 9

It was decided to divide the frequencies into 5 classes (0-2, 2-4, 4-6, 6-8 and 8-10). Answer:

a) Complete the frequency distribution of the classes.

b) What is the sample range?

c) What is the distribution range?

d) What is the number of classes in the distribution?

e) What is the upper limit of the fourth class?

f) What is the upper limit of the second-order class?

g) What is the range of the second class interval?

2) Given the grades of 50 students:

84 68 33 52 47 73 68 61 73 77

74 71 81 91 65 55 57 35 85 88

59 80 41 50 53 65 76 85 73 60

67 41 78 56 94 35 45 55 64 74

65 94 66 48 39 69 89 98 42 54

Obtain the frequency distribution, using 30 as the lower limit of the first class and 10 as the class interval.

3) The results of rolling a die 50 times were as follows:

1 1 1 1 1 1 1 2 2 1

2 2 2 2 2 2 3 3 3 3

4 4 4 4 4 4 4 4 4 4

5 5 5 3 3 3 5 5 5 5

5 5 6 6 6 6 6 6 6 6

Form a frequency distribution without class intervals.

4) Given the frequency distribution:

xFrequency 1 Frequency 2
322
455
5129
6106
782
831

Determine:

a) The sum of the frequencies

b) The relative frequencies

c) The cumulative frequencies

d) The cumulative relative frequencies

5) Construct the smoothed curve for the frequency distribution:

iclassesFrequency
14 - 82
28 - 125
312 - 169
416 - 206
520 - 242
624 - 281

6) State the type of curve corresponding to each distribution below:

a) Number of women aged 15 to 30, in a given population, married, classified according to the number of times they have married;

b) Grades of students in the final year of high school, in a given population;

c) Mortality rate due to accidents, by age group;

d) Parking time of motor vehicles in a congested area;

e) Number of qualified men, by age group, who are unemployed.

7) The numbers below show the liquidity ratios obtained from the balance sheet analysis of 50 industries:

3,9 7,4 10,0 11,8 2,3 4,5 10,5 8,4 15,6 7,6

18,8 2,9 2,3 0,4 5,0 9,0 5,5 9,2 12,4 8,7

4,5 4,4 10,6 5,6 8,5 2,4 17,8 11,6 0,8 4,4

7,1 3,2 2,7 16,2 2,7 9,5 13,1 3,8 6,3 7,9

4,8 5,3 12,9 6,9 6,3 7,5 2,6 3,3 4,6 16,0

a) Using these data, form a distribution with class intervals of 3, such that the lower limits are multiples of 3;

b) Construct the corresponding histogram.

8) A level of cloudiness, recorded in tenths, occurs according to the distribution below:

CloudinessFrequency
0 - 0.5320
0.5 - 1.5125
1.5 - 2.575
2.5 - 3.565
3.5 - 4.545
4.5 - 5.545
5.5 - 6.555
6.5 - 7.565
7.5 - 8.590
8.5 - 9.5145
9.5 - 10676

Construct the corresponding histogram.

9) Considering the distribution below:

ClassesFrequency
1 - 27
2 - 33
3 - 410
4 - 511
5 - 612
6 - 737
7 - 835
8 - 945
9 - 1039
10 - 1130
11 - 1225

Construct the corresponding histogram.

10) The table below presents a frequency distribution of the areas of 400 lots:

Areas (m²)Number of lots
300 - 40014
400 - 50046
500 - 60058
600 - 70076
700 - 80068
800 - 90062
900 - 100048
1000 - 110022
1100 - 12006

With reference to this table, determine:

a) the total range;

b) the upper limit of the fifth class;

c) the lower limit of the eighth class;

d) the midpoint of the seventh class;

e) the width of the interval of the second class;

f) frequency of the fourth class;

g) relative frequency of the sixth class;

h) cumulative frequency of the fifth class;

i) the number of lots whose area does not reach 700 m²;

j) The number of lots whose area reaches and exceeds 800 m²;

l) The percentage of lots whose area is greater than or equal to 900 m²;

m) The percentage of lots whose area is at least 500 m², but less than 1000 m²;

Answer Key