Basic Statistics 2 of 4
On this page

Basic Statistics

5.1 Basic notions of statistics

Chapter 1 of 3 23 min read

Statistics for centuries was used unconsciously by people as a merely descriptive and record of occurrences. The first activities were around 2000 BC and were used in the census of Chinese agricultural populations. At the beginning of the 19th century, great mathematicians entered the scene, for example, the Frenchman Pierre-Simon Laplace (1749-1827) and the German Carl Friedrich Gauss (1777–1855), the latter appearing with applications of the “normal distribution” for modeling measurement errors. The theory of normal distribution was used by the Belgian astronomer and mathematician Adolphe Quételet (1796–1874), in the statistical study of various characteristics of human populations: height, weight, birth rate, mortality, monthly income, etc. Ronald Aylmer Fisher (1890–1962), British statistician, was the genius who created the modern theory of statistics. In Statistics, he worked with frequency curve adjustments, with correlation coefficients, the so-called Fisher coefficients, in analysis of variance (ANOVA) and in parameter estimation techniques. Influenced by the works of Karl Pearson (1857-1936), another important British statistician. Fisher used the results he obtained in Statistics as tools for application in his genetic studies, and today he is considered one of the biggest names in Statistical Theory and Statistics applied to Biology.

5.1.1 Introduction

Here, we will introduce the basic elements of data analysis. We will see Descriptive Statistics used to organize, summarize and describe the behavior of data. Data description can also identify anomalies, even resulting from the incorrect recording of values ​​and extreme values ​​(those that do not follow the general trend of the rest of the data set). Descriptive tools are different types of graphs and tables, as well as synthesis measures, such as position measures, dispersion measures, asymmetry measures and kurtosis measures.

Whenever we summarize a set of data, we lose information about it, as we condense the original observations. However, this loss of information is small compared to the gain from the clarity of interpretation provided.

Statistics uses the variability present in the data to obtain information of interest about the behavior of processes and products. Variability is present everywhere. For example, the position of a car parked in a garage is not the same across days. In this case, the position of the car varies. Our strategy consists of evaluating variations and obtaining information through them.

In general, the application of statistical techniques involves several steps, as shown in Figure 1.1. An important point in statistical analysis is the definition of the management problem we are dealing with. For example, evaluating process capacity, forecasting demand for services, among others. Next, we plan and execute data collection. From the data, we apply statistical techniques to extract information about the management problem and, consequently, its solution.

Figura1.1.svg

Figure 1.1: Steps in applying statistical techniques

5.1.2 Data collection

Several problems can occur during the data collection process, which can seriously compromise the solutions proposed at the end of the process, that is, the quality of the solution to the management problem is directly related to the quality of the data obtained. We can prevent some problems from occurring by observing facts such as:

  • Data should not be collected without first clearly defining the problem or situation to be faced, as well as the objectives in relation to them;

  • The measurement systems (instrument, operators, method, means) that will be used must be evaluated and have sufficient measurement capacity (Measurement system analysis);

  • Calculations and readings must be done very carefully to avoid distortions;

  • Appropriate methods must be used to collect data according to the problem studied.

To properly collect data, we must know the basic concepts of Population and Sample. A population is an aggregate of elements (finite or not) from which we wish to obtain information about some of their characteristics. Two populations are considered distinct if one of them contains an element that is not contained in the other population. As an example of population we have the daily production of a company, measurement of steel rods carried out with a micrometer, among others. A sample is a portion of a population that can contain information about this population, see Figure 1.2.

Figura1.2.svg

Figure 1.2: Population and sample

Another important definition for choosing the statistical technique and interpretation of results is the classification of data or variables related to the management problem. A variable is a specific characteristic of the population, such as the length of a machined part, mass of a tablet, Selic rate, age, sex or party preference. Each variable consists of a set of categories that describe the nature and type of variation associated with the characteristic. Some variables may have numerous response categories, depending on the objective and focus of the management problem. Variables have distinct measurement properties associated with their categories. These categories are referred to as measurement levels or measurement scales. Scales can be classified as: quantitative or qualitative.

The quantitative scale is related to characteristics that can be measured or counted. In both cases they are numerical characteristics. For example, the mass of a pill, the price of an asset in the financial market, the number of defects in a car, the number of pressure ulcers in a hospital patient. On the other hand, the qualitative scale is related to the description of the characteristic. In this case, the variable cannot be measured but can be observed. For example, the types of defects in a product (television) at the end of the assembly line, the educational level (elementary school, high school, undergraduate and postgraduate).

In the case of nominal qualitative data, we only have the identification or labeling of the observations that constitute the data. In this case, the data is allocated into categories and counted only with respect to frequency of occurrence. No ordering is implied. A variable like “sex” can be categorized into two possible answers: male or female. Such categories only serve to count the number of individuals who indicate the respective categories. The ordinal qualitative scale classifies the categories of the variable in terms of the degree that each category has. In this case, we have information about the ordering of categories, but we may have no indication of the magnitude of the differences between these categories. For example, the educational level of participants in a race (elementary school, high school, undergraduate and postgraduate) is an ordinal qualitative variable.

On the discrete quantitative scale we have the count of an event of interest. In this case, we were able to determine the magnitude of the difference between the variable categories. For example, the count of defects in a painted part or the number of pressure ulcers in a patient. On the other hand, in the continuous quantitative scale, categories are defined through the scale of measuring systems or equipment. In general, the variable takes on values ​​in a range of numbers. For example, family income, an individual’s height, age, distance and temperature are associated with measurements carried out by measurement systems that provide indications of the value of each category and the differences between them.

Planning data collection

To properly study a population through a sample, we must plan data collection. With this objective, we asked some questions:

  • How often do problems occur?

  • What are the potential causes of the problem?

Good data collection planning should consider the following questions:

  • What is the question to be answered?

  • How to communicate the response obtained?

  • What analysis tool do we intend to use and how to use the results?

  • What type of data is needed to use the desired tools and answer the question?

  • How to collect this data with minimal effort and error?

  • Where to access this data?

  • Who can provide us with the data?

  • What period will the data be collected?

Having the answers to these questions, we must:

  • Build a methodology to make sure that all information is defined;

  • Collect data consistently and honestly;

  • Make sure there is sufficient time for data collection;

  • Define what additional information will be needed for future studies, references or recognition.

5.1.3 Data exposure

Before exposing the collected data, it is necessary to review and correct the collected data in an attempt to eliminate possible mistakes in preparing the report. Initially, data can be classified as “qualitative” or “quantitative”. Through this classification, we will define some techniques to summarize the data set.

Qualitative data

Qualitative data represents a quality characteristic (or attribute) associated with the researched item. For example, we can classify a product as: good, fair or bad. Qualitative data can be divided into two types:

Nominal qualitative data - For which there is no ordering of possible achievements;

Ordinal qualitative data - For which there is an order in its results.

Example 1.3.1

An electronic calculator company, concerned about several defects that one of its products has been presenting, carried out a survey and found the following problems:

A: Defect in the plastic cover;

B: Keyboard defect;

C: Defect in the power source;

D: Loose welds;

E: Defect in the processing unit board;

F: Display defect;

G: Others.

This is a typical example of nominal qualitative data. In this situation, for each item inspected, there is a variable T that represents the type of defect found in calculators. Therefore, this variable T can assume the values: A,B,C,D,E,F or G. Therefore, for a calculator with a defect in the plastic cover, we have T = A. Below, we have Table 1.1 with the observed values ​​of the variable T on an inspection day.

Type of Problems (T) Frequency
A 10
B 20
C 55
D 80
And 25
F 3
G 7

Table 1.1: Types of Calculator Problems

In this example, all defects have the same level of severity and therefore, we do not present an order between the attributes (defects). In this case, we have an example of nominal qualitative data.

Example 1.3.2

In a public competition, the number of people registered according to their education levels was counted: completed primary, completed secondary, completed higher education and completed postgraduate studies. Below is Table 1.2 with the observed values.

Education level Subscribed
Complete fundamental 451
Full medium 627
Complete higher education 292
Complete postgraduate degree 95

Table 1.2: Education levels of registrants

In this example, we have a natural order between the attributes (level of education) and consequently, we have an example of ordinal qualitative data.

Quantitative data

In this case, the observed characteristic takes on numerical values that can be classified as “discrete” or “continuous”.

Discrete quantitative data

Discrete quantitative data takes on values within a set of specified numbers. For example, the number of products produced by a machine in a given period of time may be 0,1,2,3,4,… In this case, the observed data forms a finite (or enumerable) set of numbers. Generally, when we count defects, we have discrete quantitative data.

Example 1.3.3

In a hospital, the number of people with diabetes were counted in 20 groups of 1000 people each. In this case, we obtain the following data (People with diabetes by group): 10, 12, 9, 11, 10, 8, 9, 10, 7, 10, 8, 9, 9, 10, 10, 11, 9, 11, 10, 10. A possible summary of the data is developed in Table 1.3 below:

People with diabetes Calculation of groups Number of groups
7 / 1
8 / / 2
9 / / / / / 5
10 / / / / / / / / 8
11 / / / 3
12 / 1

Table 1.3: Number of people with diabetes in groups

Therefore, the variable “Number of people with diabetes” takes on discrete values, that is, integers: …,7,8,9,… .

Continuous quantitative data

Continuous quantitative data takes values ​​over a continuous range of numbers. In general, this type of data comes from measurements of a quality characteristic of a part or product. Possible values ​​include “all” numbers in the range of variation of the measured characteristic. For example, when we measure the diameters of the shafts of certain motors with an electronic cell, we obtain continuous quantitative data, which takes values ​​in a determined range.

Example 1.3.4

In an electric motor factory, the production manager needs to assess the problem of excessive motor noise. One of the possible causes is associated with variations in the shaft diameter. Thus, the production manager measured the shaft diameter of 100 motors and the result is presented in Table 1.4. Values ​​are in thousandths of millimeters.

We can carry out the calculation considering measurement ranges, as shown in Table 1.4 below:

4,8 4,2 5,1 5,2 4,8 4,7 4,9 4,5 4,9 4,5
4,9 5,1 4,8 4,9 4,8 5 5,3 4,9 5,5 5,2
5,1 4,6 4,9 4,8 5,1 4,6 4,3 4,9 4,7 5,2
4,8 4,4 5,6 5 5 5 4,8 5,2 4,5 5,1
5,1 4,9 4,8 4,8 5 4,8 5,1 5,4 4,2 5,1
4,9 4,6 5,4 4,9 4,3 4,6 4,7 4,7 5,3 4,4
4,7 4,8 5,2 4,5 5,1 4,6 5,8 4,9 5,2 4,8
4,9 4,9 4,4 4,7 4,8 5,1 5,4 5 4,4 5,1
4,9 4,9 5,1 5,2 4,7 4,8 4,6 5,2 5,5 5,2
4,2 4,9 4,9 4,8 4,2 5,2 4,7 4,8 4,6 5,2

Table 1.4: Shaft diameters in thousandths of millimeters

A possible summary of the data:

Diameter Determination Number of engines checked
[4,2; 4,4) / / / / / / 6
[4,4; 4,6) / / / / / / / / 8
[4,6; 4,8) /////////////// 15
[4,8; 5,0) //////////…////////// 33
[5,0; 5,2) ////////////////// 18
[5,2; 5,4) ///////////// 13
[5,4; 5,6) / / / / / 5
[5,6; 5,8) / / 2

Table 1.4.1: Shaft diameter of 100 motors (with calculation)

When establishing class intervals, we are assuming that the axis can assume any value between the lower limit (inclusive) and the upper limit (exclusive).

5.1.4 Bar chart

Example 1.4.1

Consider the data from Example 1.3.2. Build the corresponding bar chart.

The bar chart presents data categorized into rectangular bars in which the rectangles corresponding to each category are proportional to the number of observations in the respective category. The bar chart is used to make comparisons between categories of a discrete qualitative or quantitative variable. This graph can be used vertically or horizontally. In example 1.4.1, the height of each rectangle corresponds to the number of registrants with the respective level of education. We can use Action Stat to run the bar chart.

Figura1.3.svg

Figure 1.3: Bar chart of education levels of registrants

5.1.5 Pareto Diagram

Pareto Diagram is a bar graph that orders the frequencies of occurrences, from highest to lowest, allowing problems to be prioritized. It also shows the curve of accumulated percentages. Its greatest utility is to allow easy visualization and identification of the most important causes or problems, enabling the concentration of efforts on them. It is used for qualitative data.

How to build a Pareto diagram

  1. Hold a meeting with the team to select the topic to be evaluated. For example, we can evaluate types of defects, maintenance cost per equipment, among others.

  2. Select a comparison standard with unit of measurement. Generally, we use cost or frequency of occurrence as a comparison measure.

  3. Specify the time period over which data will be collected. Example: One week, one month.

  4. Prepare a data spreadsheet, with the following columns: Categories, Quantities (individual totals), Accumulated totals, Percentages, Accumulated percentages.

  5. Collect the necessary data for each category. Example: Defect A occurred X times or defect C cost Y.

  6. Complete the data sheet, listing the categories in descending order with respect to the unit of comparison.

  7. Mark the vertical axis on the left side with the scale from zero to total in the Quantity column of the data sheet. Identify the name of the variable represented on this axis and the unit of measurement used, if necessary.

  8. Mark the vertical axis on the right with a scale from zero to 100%. Label this axis as “Cumulative percentage”(%).

  9. List the categories from left to right on the horizontal axis in order of decreasing frequency or cost. Items of lesser importance can be combined in the Other category, which is placed on the far right of the axis, with the last bar.

  10. Identify each range on the horizontal axis by writing the category names in the same order as they appear on the data sheet.

  11. Construct a bar graph using the scale on the left-hand vertical axis. To build a bar graph, above each category, simply draw a rectangle whose height represents the frequency or cost of that category.

  12. Construct the Pareto curve by marking the accumulated percentage values ​​above and in the center or right side of the range for each category, and connect the points by straight line segments.

Example 1.5.1

Considering the data from Example 1.3.1, we constructed the Pareto diagram, using Action Stat. The results obtained are shown below.

Types of Problems Frequency Accumulated Frequency Percentage Accumulated Percentage
D 80 80 40 40
C 55 135 27,5 67,5
And 25 160 12,5 80
B 20 180 10 90
Others 10 190 5 95
A 10 200 5 100

Table 1.5: Calculator Problem Type Data

The corresponding Pareto chart is shown below.

Figura1.4.svg

Figure 1.4: Pareto Chart of Types of Calculator Problems

Pareto diagram for costs

When constructing the Pareto chart, we can use the frequency of occurrence of the attribute or the cost associated with this attribute as a comparison measure. Below, we present an example of a Pareto chart with a cost-based comparison measure.

Example 1.5.2

At an ID card company, we account for card defects with a cost-based comparison measure.

Main defects Number of defective packages Cost per defective unit Defect cost
Swapped numbers 28 0,05 1,40
Wrong characters 28 0,05 1,40
Crumpled 4 1,00 4,00
Pierced 3 0,05 0,15
Illegible print 2 0,05 0,10
Torn 2 1,00 2,00
Others 1 0,05 0,05
Total 68

Table 1.6: Data on main defects in identification cards

Ordering the defects by their costs, we have the following diagram:

Main defects Defect cost
Crumpled 4,00
Torn 2,00
Swapped numbers 1,40
Wrong characters 1,40
Pierced 0,15
Illegible print 0,10
Others 0,05

Table 1.6.1: Main defects and defect cost diagram

The corresponding Pareto chart relating to costs is given by

Figura1.5.svg

Figure 1.5: Pareto Chart of types of defects relative to costs

5.1.6 Frequency Distribution

Frequency distribution is a grouping of data into classes, in such a way that we count the number of occurrences in each class. The number of occurrences of a given class is called absolute frequency. The objective is to present the data in a more concise way that allows us to extract information about your behavior. Below, we present some definitions necessary to construct the frequency distribution.

Absolute frequency $(ƒ_{i})$: It is the number of observations corresponding to each class. Absolute frequency is often just called frequency.

Relative frequency $(ƒ_{ri})$: It is the quotient between the absolute frequency of the corresponding class and the sum of the frequencies (total observed), that is, $\displaystyle f_{ri}=\frac{f_i}{\sum_{j}^{n}f_j}$ where n represents the total number of observations.

Percentage frequency $(p_{i})$: It is obtained by multiplying the relative frequency by 100%.

Accumulated frequency: It is the accumulated total (sum) of all previous classes up to the current class. Could be: absolute accumulated frequency $(F_{i})$, relative accumulated frequency $(F_{ri})$, or percentage accumulated frequency $(P_{i})$.

Point frequency distribution: discrete quantitative data

The construction of a point frequency distribution table is equivalent to the construction of a simple table, where the different observed values of the variable are listed with their absolute frequencies, denoted by $(ƒ_{i})$ (index i corresponds to the number of rows in the Table) as shown in Table 1.7 below. We use point frequency distribution when working with discrete data. A graph used to represent this type of frequency distribution is the Bar Chart.

Example 1.6.1

Consider the data from Example 1.3.3. Construct the frequency distribution for this data set and the bar chart.

Number of people with diabetes Frequency ($ƒ_i$) Relative frequency ($ƒ_{ri}$) Percentage frequency Accumulated frequency
7 1 0,05 5 5
8 2 0,1 10 15
9 5 0,25 25 40
10 8 0,4 40 80
11 3 0,15 15 95
12 1 0,05 5 100

Table 1.7: Data on Number of people with diabetes in groups

Figura1.6.svg

Figure 1.6: Bar graph of Number of people with diabetes

5.1.7 Histogram

Frequency distribution in class intervals: Continuous quantitative data

For continuous quantitative data, generally resulting from measurements of quality characteristics of parts or products, we divide the range of variation of the data into class intervals. The smallest value in the class is called the lower limit $(l_{i})$ and the largest value in the class is called the upper limit $(L_{i})$.

The range or class can be represented in the following ways:

  1. $(l_{i})-(L_{i})$, where the lower limit of the class is included in the absolute frequency count, but the upper one is not;

  2. $(l_{i})-(L_{i})$ , where the upper limit of the class is included in the count, but the lower is not.

We can choose any of these options, but it is important that we make it clear in the text or in the table which one is being used. Although not necessary, ranges are often constructed so that they are all of equal width, which makes comparisons between classes easier.

In the frequency distribution table, we add a column with the midpoints of each class interval, denoted by $x_{i}$. This is defined as the average of the class limits

$$x_i=\frac{l_i+L_i}{2}$$

These values are used in the construction of graphs. but the superior does not;

  1. $(l_{i})-(L_{i})$ , where the upper limit of the class is included in the count, but the lower is not.

Some indications in the construction of frequency distribution are:

  • As far as possible, classes should have equal amplitudes.

  • Choose the limits of the intervals between two possible observations.

  • The number of intervals should not exceed 20.

  • Choose limits that facilitate grouping.

  • Mark the midpoints of the intervals.

  • When constructing the histogram, each rectangle must have an area proportional to the corresponding relative frequency (or absolute frequency, which is the same thing).

An important point in constructing the frequency distribution is the number of class intervals. In Action Stat we use Sturges' rule to obtain the number of class intervals

$$k=1+3,3 log_{10}(n)$$

in which $k$ is the number of classes and $n$ is the size of the dataset.

Histogram

Histogram is a graphical representation (a vertical bar or horizontal bar chart) of the frequency distribution of a set of continuous quantitative data. The histogram can be a graph by absolute values ​​or relative frequency or density. In the case of density, the relative frequency of the interval $i$, $(f_{ri})$, is represented by the area of a rectangle that is placed above the midpoint of the class $i$. Consequently, the total area of ​​the histogram (equal to the sum of the areas of all rectangles) will be equal to 1. Therefore, when constructing the histogram, each rectangle must have an area proportional to the corresponding relative frequency (or absolute frequency, which is indifferent). In the case where the intervals are of equal sizes (amplitudes), the heights of the rectangles will be equal to the relative frequencies (or equal to the absolute frequencies) of the corresponding intervals.

Example 1.7.1

Considering the data from Example 1.3.4, assemble the frequency distribution and construct the corresponding histogram.

As we have continuous quantitative data, to construct the frequency distribution, we will separate the data into classes. By applying Sturges' rule we obtain

$$k=1+3,3 log_{10}(n)=7,6$$

Thus, we divided the data into 8 equally sized classes. The frequency distribution is then as follows

Class Frequency Freq. Rel. Freq. Perc. Freq. Accum. Densities Midpoint
[4,2 ; 4,4) 6 0,06 6 6 0,3 4,3
[4,4 ; 4,6) 8 0,08 8 14 0,4 4,5
[4,6 ; 4,8) 15 0,15 15 29 0,75 4,7
[4,8 ; 5) 33 0,33 33 62 1,65 4,9
[5 ; 5,2) 18 0,18 18 80 0,9 5,1
[5,2 ; 5,4) 13 0,13 13 93 0,65 5,3
[5,4 ; 5,6) 5 0,05 5 98 0,25 5,5
[5,6 ; 5,8) 2 0,02 2 100 0,1 5,7

Table 1.8: Motor shaft diameter frequency table

Below, we present the histogram obtained with the Action Stat software.

Figura1.7.1.svg

Figure 1.7.1: Frequency histogram of motor shaft diameters

We often want to represent the curve of a probability distribution (e.g. normal) together with the histogram. This is a visual way of evaluating the fit of the data by the aforementioned probability distribution. However, as the total area of ​​the absolute frequency bars is equal to 100, it does not make sense to use the height of the rectangle as the absolute frequency. In this case, we compare elements at different scales. To overcome this problem, we suggest using the area of ​​each rectangle as the relative frequency whose sum is equal to 1. In this case, the height of each rectangle is given by the density (D) which corresponds to the relative frequency divided by the size of the class interval.

Example 1.7.2

Considering the data from Example 1.3.4, construct the corresponding density histogram

To construct the density histogram, it is enough for the rectangles to have a height equal to the density of each class and a width equal to the class size. In this case, the histogram would look like this:

Figura1.7.2.svg

Figure 1.7.2: Histogram of motor shaft diameter densities

In Figure 1.7.2 we can see examples of histograms with approximately normal distribution whose main characteristic is a bell shape that tends to be symmetrical. However, histograms can take different forms according to the probability distribution of the data. Below we will see some examples of different histogram formats.

Example 1.7.3

The following histogram data follows an exponential probability distribution, which is used, for example, as a model for the lifetime of certain products and materials.

Figura1.8.svg

Figure 1.8: Histogram of data from an exponential distribution

The exponential distribution is characterized by its asymmetric shape, with many values close to 0 and a decreasing trend.

Example 1.7.4

In this example, we bring data from the Snedecor F distribution, also known as the Fisher distribution, which is often used in statistical inference for analysis of variance.

Figura1.9.svg

Figure 1.9: Histogram of data from a Fisher distribution

This distribution is also asymmetric, the shape of the histogram of this distribution almost always reflects the high density of data around 1.

Example 1.7.5

Here we bring an example of a bimodal distribution, that is, one that has two modes. Imagine a main avenue in a city where the number of cars that pass through this avenue is measured: it is possible to imagine a maximum flow of cars at a certain time when many are going to work and at night (or at dusk), a new maximum flow when people are returning home from work.

Figura1.10.svg

Figure 1.10: Histogram of data from a bimodal distribution

As you can see, the histogram shows two density peaks, one at the beginning and another almost at the end of the distribution.

5.1.8 Pie Chart

The pie chart, also known as a pie chart or circular chart, is a circular diagram where the values of each statistical category represented are proportional to their respective frequencies. This graph may be accompanied by percentages. It is used for nominal qualitative data. To build a pie chart, it is necessary to determine the angle of the circular sectors corresponding to the percentage contribution of each value to the total.

Example 1.8.1

An automotive company monitors the number of defects found in equipment sent for calibration. In the following table we present data relating to one month of monitoring defects found in equipment in the different areas.

cost center Number of defects
Pre-machining 9
Heat treatment 12
Foundry 10
Machining 45
Surface treatment 13
Total 89

Table 1.9.1: Number of equipment defects data

Thus, we can obtain the frequencies of defects in each piece of equipment:

cost center Frequencies Freq. Perc. Freq. Accum.
Pre-machining 9 10,11 10,11
Heat treatment 12 13,48 23,59
Foundry 10 11,24 34,83
Machining 45 50,56 85,39
Surface treatment 13 14,61 100
Total 89 100 100

Table 1.9.2: Table of relative frequencies

As we have a total of 89 defects, the 360º circular sector will be equivalent to 89. By calculating the proportions, we find the angles corresponding to the number of defects in each cost center. With this, we constructed the following pie charts.

Figura1.11.svg

Figure 1.11: 3D pie chart of Number of equipment defects

Figura1.12.svg

Figure 1.12: 2D pie chart of Number of equipment defects

Such an example can be carried out using the Action Stat software.

Last modified 13.10.2026: ajuste das numerações (e4440012)
↑