Tutorials › Introduction to Statistics › Variables, Values, and Data Records

Variables, Data Types and Questions · Tutorial 2 of 996

Variables, Values, and Data Records

Learn how variables, observed values, data records, rows, and columns fit together in a simple data table.

Beginner 9 min read

What You'll Learn

  • Distinguish a variable from one observed value of that variable.
  • Identify a data record and describe how it relates to an individual.
  • Read a table by matching rows to records and columns to variables.
  • Interpret a cell as the value recorded for one variable on one record.
  • Check whether a table’s layout matches the units it is intended to describe.

Introduction

A data table can look self-explanatory: names appear down the left, headings run across the top, and entries fill the cells. But reading it well means understanding what each part represents. A column is not one observation; it records values of a variable across multiple individuals. A single cell is not a whole data record; it is one value within a record.

The earlier material on individuals and observational units established that an investigation describes particular units, such as people, animals, or objects. Here we connect those units to the way information is stored. The main questions are: What characteristic is being recorded? What value was observed for a particular unit? What set of values forms that unit’s record?

Definition: A variable is a characteristic recorded for each individual or observational unit in a data set. An observed value is the recorded result for one variable on one individual. A data record is the collection of recorded values associated with one individual. In a simple rectangular data table, each column represents a variable, each row represents a data record, and each cell contains one observed value.

From Variables to Cells

Consider a table that records a person’s first name, age, and usual travel time to a campus. The column heading “Age” names a variable: age is recorded for every person in the table. An entry such as 19 in one row is an observed value of that variable for one person. That person’s full row, including the entries under all three headings, is their data record.

The heading is not itself an observed value, and an observed value is not the variable. “Age” refers to the characteristic being recorded; 19 is one observation of it. The distinction matters even when a variable has only a few values in a small table: the variable is the characteristic, while its values are the entries recorded for particular individuals.

A useful way to check your reading is to ask three questions about any table entry:

  • Which row? This identifies the individual or data record to which the entry belongs.
  • Which column? This identifies the variable being recorded.
  • Which cell? This gives the observed value for that variable on that record.

Reading a Small Data Table

Suppose a hypothetical campus survey records information for four students. The table below has one row per student and three variables. The names are included to help distinguish the records.

StudentAge (years)Travel time (minutes)Usual arrival time
Amira19248:10 a.m.
Ben21358:25 a.m.
Chen20188:05 a.m.
Dina19428:40 a.m.

The table has four student records. It has three variables named by the substantive column headings: age, travel time, and usual arrival time. For Ben, the observed value for travel time is 35 minutes. Ben’s record consists of all the values in Ben’s row: age 21 years, travel time 35 minutes, and usual arrival time 8:25 a.m. Each one of these values is attached both to a particular variable and to a particular student.

The “Student” column helps readers tell the records apart. When counting the substantive variables in this example, we count age, travel time, and usual arrival time. The student names function as row labels here; they are not one of the characteristics the example is investigating. The important point is to state what a table’s columns record rather than assuming that every visible column has the same role.

Worked Example: Identifying a Variable, Value, and Record

A hypothetical table lists three library books and the number of days each was borrowed:

BookBorrowing period (days)Renewed?
North Woods14No
River Light21Yes
Small Worlds14No

Identify the observational unit, the variables, one observed value, and one complete data record.

Observational unit and records. Each row represents one book, so the table contains three book records.

Variables. The characteristics recorded for each book are borrowing period and whether it was renewed. “Book” supplies the row label, while the two remaining headings name the recorded characteristics.

One observed value. The entry 21 in the “Borrowing period (days)” column is the observed value for River Light. It is not a value for either of the other books.

One complete record. River Light’s record contains a borrowing period of 21 days and a renewal value of Yes. The record is the set of entries on that row, not just the 21 in one cell.

A Precise Way to Describe the Table

For a table with \(n\) rows and \(p\) recorded variables, let \(x_{ij}\) denote the value in row \(i\), column \(j\). Here, \(i\) identifies a data record and \(j\) identifies a variable. Thus \(x_{ij}\) is the observed value of variable \(j\) for the individual in record \(i\). The whole \(i\)th record is the collection of its values across the columns:

$$ (x_{i1}, x_{i2}, \ldots, x_{ip}) $$

This notation makes a simple but useful distinction explicit. Fixing \(j\) and letting \(i\) vary follows one column: it follows one variable across records. Fixing \(i\) and letting \(j\) vary follows one row: it gathers the recorded values for one individual. A cell \(x_{ij}\) is at the intersection of that row and column.

Table-reading rule: In a rectangular data table organized with one individual per row, row \(i\) is the record for individual \(i\), column \(j\) is variable \(j\), and cell \(x_{ij}\) is the observed value of variable \(j\) for individual \(i\). The table therefore has one cell for each row-variable pairing.

The cell count follows directly from the layout. Each of the \(n\) records has one entry for each of the \(p\) variables. Therefore, a complete rectangular table has \(n \times p\) data cells, apart from headings and any separate row labels.

$$ \text{number of data cells} = n p $$

For the campus table, there are \(n=4\) student records and \(p=3\) variables, so there are \(4 \times 3=12\) cells containing recorded values. This count is also a quick way to check that you have not mistaken a heading for a data value or overlooked a column.

Worked Examples in Table Reading

Worked Example: Following One Variable Down a Column

A hypothetical garden log records the number of seedlings in each of four labeled trays on a particular day.

TraySeedlings countedDays since planting
A1210
B1510
C912
D1412

Describe the variable “Seedlings counted,” give its observed values, and interpret the entry in row C.

Variable. “Seedlings counted” is the characteristic recorded for every tray. To follow that variable, read down its column, not across a single row.

Observed values. In row order A through D, the recorded values are 12, 15, 9, and 14 seedlings. There are four observed values because there are four tray records.

Entry in row C. The value 9 means that 9 seedlings were recorded for tray C. It is the value of “Seedlings counted” for that tray; it does not describe the other trays. Tray C’s complete record also includes that 12 days had passed since planting.

Worked Example: Reconstructing a Record Across a Row

A hypothetical equipment inventory lists a piece of equipment on each row and records its location and inspection month.

EquipmentLocationInspection month
Microscope 1Lab AMarch
Microscope 2Lab BApril
Balance 1Lab AApril

What does the record for Balance 1 say? How many records and recorded variables are shown?

Reconstructing the record. Find the row labeled Balance 1, then read across the two variable columns. Its location is Lab A and its inspection month is April. Those two entries together make up the recorded information for that equipment item.

Counting records and variables. There are three equipment rows, so the table shows three records. It records two variables: location and inspection month. There are \(3 \times 2=6\) data cells, matching the six entries in those two columns.

Why the Layout Must Be Read Carefully

The row-and-column rule only works once you know what each row represents. A row is not automatically a person: it could represent a school, a book, a visit, or another observational unit. The table heading, accompanying description, or study question should tell you what one row stands for. If that is unclear, it is not possible to interpret a cell reliably because you do not know whose or what record it belongs to.

Likewise, a column heading gives a name to the recorded characteristic, but the entries are the observed values. If the heading says “Distance (kilometers)” and a cell contains 3.2, the cell says that the value recorded for that row is 3.2 kilometers. The heading alone does not tell you the value for any particular individual.

Worked Example: Finding a Row-and-Column Mismatch

A hypothetical table is described as having one row for each of three students and recording each student’s preferred study location and weekly study hours. A student reads the row for Lee, which contains “Library” and “8,” and says, “The value 8 is Lee’s preferred study location.”

Check the table structure and correct the interpretation.

Match the entry to its column. “Library” belongs under the heading for preferred study location; 8 belongs under the heading for weekly study hours. A value must be read together with its column heading, not just its row label.

State the record in context. Lee’s record says that Lee’s preferred study location is the library and that Lee studies 8 hours per week. The entry 8 is the observed value for weekly study hours, not for study location.

Check the table dimensions. There are three student records and two recorded variables, so the table should contain \(3 \times 2=6\) data cells. Each record contributes one value to each of the two variable columns.

Common Mistakes and a Reliable Check

  • Calling a cell a variable. “8 hours” is one observed value; “weekly study hours” is the variable that is recorded for each student.
  • Calling one cell a complete record. A record usually contains the entries across a row for that individual. One cell tells only about one variable.
  • Reading across when the question asks about a variable. To see how one variable was recorded for different individuals, read down its column.
  • Reading down when the question asks about one individual. To describe one individual’s record, follow that row across the variables.
  • Assuming that a row always means a person. First identify the observational unit; the row represents that unit, whatever it is.

A useful final check is to state a value as a sentence containing both its row and column: “For [individual], the recorded value of [variable] is [value].” If you cannot complete that sentence, check the row label and column heading again.

Key takeaway: A variable is a characteristic recorded across individuals, an observed value is one entry for one variable on one individual, and a data record gathers the values associated with one individual. In a simple data table, columns organize variables and rows organize records.

Check Your Understanding

Use the row, column, and cell distinctions to answer each question.

  1. A table has one row for each of 18 plants and columns for plant label, height, and leaf count. How many plant records are shown, and which columns describe recorded characteristics rather than label the records?
  2. In a table with one row per visitor, the entry in the “Visit length (minutes)” column is 35. What does that cell say, and what additional information is needed to identify whose value it is?
  3. Explain the difference between the variable “number of books borrowed” and the observed value 3 in one borrower’s row.
  4. A table has six records and four recorded variables. How many data cells should it contain, excluding headings and separate row labels? Show the calculation.
  5. What should you check before interpreting the values in a row as the information for one person?