Summary
The most basic way to analyze / summarize a dataset is a frequency table. It involves the operation of counting units of analysis or their variables, grouped by some criterion into mutually exclusive (non-overlapping) categories or classes. For qualitative variables this is usually quite direct, since the categories are naturally identified; for quantitative ones it depends on the analysis, which may group by intervals of equal or different size, as needed.
The specific result of the count for each class or interval is called the frequency, and the set of these is known as the frequency distribution. The frequency can be absolute or relative (if it is divided by the total number of units or the total for the variable), the latter giving a better idea of how relevant a certain class is with respect to the total and also allowing comparison with other variables. The sum of the column of absolute frequencies must always equal the total count of units, while the relative frequencies must always add up to 1.
The frequency table can thus be built initially as follows: one column with the classes / categories / intervals, one column with the absolute frequencies and another column with the relative ones. These last 2 are usually accompanied by a row with the total, so as to verify what was said above. On top of this basic layout, a column can be added with the class midpoint (usually the sum of the maximum and minimum values of an interval, divided by 2) or the upper limit, which helps identify an interval quickly without resorting to its definition by values (both maximum and minimum), and also supports a later visualization. In addition, another column can be used for the class width or range (the difference between the maximum and minimum values).
Answering some analysis questions may also require calculating cumulative frequencies (only for variables that can be ordered). Essentially, once the table has been sorted by some criterion, the absolute and/or relative frequencies are added up row by row. Summing these new columns makes no sense, but it must be checked that the last row of the running sum equals the total absolute or relative frequency, depending on which was used.
Although this can be done by hand, with large datasets it is possible to use pivot tables or some implementation specific to frequency tables (for example, the FREQUENCY function in Google Sheets).
To close on the construction of the frequency table, the most important point is its flexibility and reach for any dataset. Building one is recommended in every analysis, for every variable, since it may reveal problems in them or even yield some first conclusions. Frequency tables will also be needed for some specific types of analysis covered later.
Further reading
- Construcción de una tabla de frecuencias. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 23–24.
- Construcción de distribuciones de frecuencias: datos cuantitativos. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 29–34.
- Problema de trabajo e investigación estadística. Aguirre, Niño and Simonetti, Estadística aplicada en las ciencias sociales y humanas (in Spanish), pp. 12–13.
- El análisis de la matriz de datos. Aguirre, Niño and Simonetti, Estadística aplicada en las ciencias sociales y humanas (in Spanish), p. 28.
- Las distribuciones de frecuencias en el análisis univariado. Aguirre, Niño and Simonetti, Estadística aplicada en las ciencias sociales y humanas (in Spanish), pp. 29–45.
- Frecuencia, tablas de frecuencia y niveles de medición (in Spanish). Introducción a la estadística, OpenStax, section 1.3.