Ripetizioni di Analisi
EN

Theory

Data, frequencies, and graphs

From collecting data on individual units to interpreting frequencies, tables, empirical distributions, and histograms.

On this page
  1. Populations, units, and samples
  2. Variables and measurement scales

Statistics derives, from collected data, numbers that describe a group of people or objects. For the students of a university, for example, these numbers might be the mean time it takes to get to class or the percentage of students who take the bus.

The work has two parts. The first part summarizes the collected data with tables, graphs, and a few indices, such as the mean, and is called descriptive statistics; it is the subject of this chapter and the next. The second part arises because data are usually not collected for the whole group, since that would cost too much time and money, so one interviews, for example, 200 students out of 12000. From the answers of the 200, one wants to estimate the percentage of bus users among all 12000, and also to state by how much that estimate can be wrong. This second part is called statistical inference and is the subject of Chapters 8 to 12. Chapters 3 to 7 introduce probability, which is used to measure that error.

This chapter starts from the basics: whom the data refer to, what was measured, and how the collected numbers are read. It defines population and sample, then the types of data and the calculations that make sense for each type, and finally the frequencies, tables, and graphs used to summarize data. The indices of Chapter 2, such as the mean and the variance, are computed from these frequencies, and two-way tables return in the conditional probability of Chapter 4.

Populations, units, and samples

1. Population and sample

Suppose one wants to know how long the students of a university take to get to campus during a given semester. The students enrolled in that semester form the population of the survey. The population is therefore the set of all the members to which the question refers, and each of these members is a statistical unit. In the example, the statistical unit is an individual enrolled student.

To define the population, one states who belongs to it, where, and in which period. Here it consists of the students enrolled at that university in the semester considered. When the population is finite, the number of its units is denoted by ; in the example, is the number of enrolled students, which can be read from the registrar’s list.

Observing every unit is called a census. A census costs time and money, so usually only some of the units are observed. The units selected for observation form the sample, and the number of its units, called the sample size, is denoted by . If 200 students are interviewed at a university with 12000 enrolled students, then and .

One unit with several measurements

A company produces a batch of 300 tiles and wants to check their mass and thickness. It selects 25 tiles; for each one it measures the mass and measures the thickness at three different points. The population is the batch, the statistical unit is an individual tile, and the sample consists of the 25 selected tiles, so and .

The data are recorded in a table with one row for each unit and one column for each measurement. Here there are 25 rows and four measurement columns, namely the mass and the three thicknesses.

There are thickness measurements, but there are still only 25 units, because each tile appears with three measurements. To compare the tiles with one another, one first computes the mean thickness of each tile, that is, the mean of its three thicknesses; the comparison therefore uses 25 values, one per tile. To see how much the thickness varies within a single tile, one instead uses the three values of that tile.

2. Parameter and statistic

In the batch of 300 tiles, some have a thickness outside the limits allowed by the company; these tiles are said to be outside tolerance. The proportion of tiles outside tolerance among all 300 is a fixed number of the batch, even though nobody knows it until every tile has been measured. A parameter is a number of this kind, that is, a quantity that describes the entire population. From Chapter 5 on, the population will also be represented by a formula that gives the probability of each possible value, called a model. The numbers that appear in that formula, such as the probability that a tile is outside tolerance, will also be called parameters.

The proportion of tiles outside tolerance among the 25 selected tiles, by contrast, is computed from the sample data alone. A number computed from the sample observations is called a sample statistic; in mathematical terms, it is a function of the sample observations.

If another group of 25 tiles is selected from the same batch, the parameter stays the same, because the batch has not changed. The statistic, however, can take a different value, because different tiles have been selected. For example, if 3 tiles are outside tolerance in the first sample and 1 in the second, the statistic equals in the first case and in the second.

The parameter is usually the number of interest, but it is unknown; the statistic is known, because it is computed from the collected data. Much of the course studies how to use a sample statistic to say something reliable about the parameter: this is the subject of the chapters on estimation, confidence intervals, and tests.

Remark

Each unit has an identifier, for example the number printed on the back of the tile. The identifier shows which measurements belong to the same unit. The mass and the thickness measured on tile number 7, for example, form a pair of data.

If the column of masses and, separately, the column of thicknesses are each sorted from smallest to largest, each column still contains the same values, but the pairs no longer correspond to the tiles. To study the relationship between two characteristics measured on the same units, such as mass and thickness, one therefore sorts complete rows of the table, so that the pairs stay together.

Variables and measurement scales

1. Categorical and quantitative variables

Several pieces of information can be recorded for each student in the commuting survey, for example the means of transportation, the rating given to the transportation service, the number of absences in the semester, and the travel time. Each of these characteristics is a variable. The value that the variable takes on a particular unit, for example “bus” or “35 minutes”, is called a value of the variable; for a categorical variable the values are also called categories.

Variables fall into four types.

  • A variable is nominal categorical when its values are categories with no order. The means of transportation is of this type, because bicycle, bus, car, and walking are different categories and none comes before the others.
  • A variable is ordinal categorical when its values are ordered categories. The rating poor, adequate, or excellent is of this type. The order of the levels is clear, while the distance between two levels is undefined, so one cannot say whether the distance between poor and adequate is the same as the distance between adequate and excellent.
  • A variable is discrete quantitative when its values are numbers that can be listed one after another. The number of absences is of this type, because it takes the integer values . The set of possible values is finite, or infinite but listable like the natural numbers; an infinite set that can be listed in this way is called countable.
  • A variable is continuous quantitative when its values are numbers and, in principle, every value in an interval is possible. Travel time is of this type, because a trip can last , , or minutes. The variable remains continuous even if, for convenience, the durations are recorded rounded to the nearest minute.

The type of variable determines which calculations are meaningful. For the means of transportation, one counts the students who use each means. For the rating, one can also count how many students gave at least “adequate”, because the values are ordered. For travel time, one can compute the difference in minutes between two trips, because the values are numbers.

2. Interval and ratio scales

Consider two temperatures, and . In degrees Celsius their ratio is , and it is tempting to say that the second temperature is twice the first. The same temperatures in kelvins, however, are and , and their ratio is . The “twice” therefore depends on the unit chosen, so it does not describe the temperatures. This happens because the zero of the Celsius scale is set by convention at the temperature at which ice melts, and is a temperature like any other.

The difference between the two temperatures, by contrast, is degrees Celsius and kelvins, so it stays the same in the two units.

A variable such as temperature in degrees Celsius is measured on an interval scale. On an interval scale the zero is chosen by convention, so differences between values are meaningful and their ratios are not. The reason can be seen with a calculation. A change of unit or of zero has the form with ; from Celsius to kelvins, for example, and . The difference of two values becomes

because the term cancels. The ratio still contains , so it changes when the zero changes.

With durations the situation is different. A trip of lasts twice as long as one of , and in seconds the two durations become and , whose ratio is still . Here the zero is not a convention, because a duration of means the absence of duration. A variable such as duration is measured on a ratio scale. On a ratio scale the zero indicates the absence of the measured quantity, and a change of unit has the form with ; from minutes to seconds, for example, . If , the ratio stays the same, because

On a ratio scale, therefore, both differences and ratios are meaningful. Interval scales and ratio scales are two types of measurement scale, that is, two ways of assigning numbers to a quantitative variable.

Warning

To process the data, numbers are sometimes assigned to the categories of a categorical variable, for example 1 to bicycle and 2 to bus. These numbers are only labels. With one answer “bicycle” and one answer “bus”, the coding gives the mean , while the coding gives the mean , even though the answers are the same. The mean of a nominal variable therefore depends on the coding chosen. Categorical data are described by the count of answers in each category.

End of the free preview

The theory of this topic continues with 7 more sections

  1. Absolute and relative frequencies
  2. Cumulative frequencies and the empirical distribution
  3. Grouping data into classes
  4. Graphs and frequency density
  5. Two-way tables
  6. Selection and missing data
  7. Keep studying

Full access also includes the other 7 worked examples of this topic and the solutions of the 14 practice exercises.

Unlock Statistics and probability · €49

Read the first 3 worked examples in this chapter for free.

Report a mistake

Where:

Ripetizioni di Analisi

Keep studying

With a free account, you can pick up where you left off and see your progress next time you visit.

Sign up for free

Already have an account? Sign in

Contents