1  Descriptive Stats I

Understanding the nature and classification of data is crucial for effective analysis and decision-making. Data are the building blocks of insights, providing a foundation for businesses, researchers, and policymakers to make informed choices. How we collect and categorize data significantly impacts how it is analyzed and interpreted. Below I highlight key types of data and their unique characteristics to help you get started with data analysis. In the arc of this book, this is where learning from data begins: before we can summarize what we have observed or infer what it means for the world, we first have to understand the raw material itself: what kind of data we have collected and how it is organized.

1.1 Data and Types of Data

Let’s start by defining data and the types of data structures that you might encounter when conducting analysis. Data are facts and figures collected, analyzed and summarized for presentation and interpretation. Data can be classified as:

  • Cross Sectional Data refers to data collected at the same (or approximately the same) point in time. Ex: NFL standings in 1980 or Country GDP in 2015.

  • Time Series Data refers to data collected over several time periods. Ex: U.S. inflation rate from 2000-2010 or Tesla deliveries from 2016-2022.

  • Structured Data resides in a predefined row-column format (tidy). Ex: spreadsheet data.

  • Unstructured Data does not conform to a pre-defined row-column format. Ex: Text, video, and other multimedia.

Example: Consider a retail store analyzing its sales performance. If the store collects data on the total revenue generated by each location on Black Friday, it is cross-sectional data. On the other hand, if the store tracks weekly sales for the past year to observe trends, it is time series data. Structured data, like sales figures stored in spreadsheets, allows for easy comparison and analysis. Meanwhile, customer feedback gathered from social media posts and video reviews represents unstructured data, requiring advanced tools to extract meaningful insights.

1.2 Data Sets

A data set contains all data collected for a particular study. Understanding the structure the data set aids in communicating findings to stakeholders clearly and effectively. Data sets are composed of:

  • Elements are the entities on which data are collected. Ex: Football teams, countries, and individuals.

  • Variables are a set of characteristics collected for each element. Ex: Goals scored, GDP, weight.

  • Observations are the set of measurements obtained for a particular element. Ex: Salah, 20 (goals), 15 (assists). US, 2.3 (inflation), 4.5% (federal interest rate).

Elements Variable 1 Variable 2
Element 1 # #
Element 2 # #
Element 3 # #
… … …

Example: Consider the dataset on electric vehicles (EVs) displayed below:

Make Model Range_km TopSpeed_kmh Price_pounds Charge_kmh
Tesla Model 3 415 201 39,990 690
Tesla Model S 652 250 79,990 750
Nissan Leaf 270 144 26,995 100
BMW i3 260 150 37,955 100
Audi e-tron 400 200 60,000 470
Ford Mustang 483 180 42,995 750
… … … … … …

In this data set, each row represents an electric vehicle model, making the elements the specific EV models rather than the manufacturers. The variables collected for each model include:

  • Make: The manufacturer of the EV.
  • Model: The specific name of the EV model.
  • Range_km: Driving range in kilometers on a full charge.
  • TopSpeed_kmh: Maximum speed in km/h.
  • Price_pounds: Price in pounds (£).
  • Charge_kmh: Charging speed in kilometers per hour.

An example observation is “Tesla Model 3,” with the following data: Make: Tesla, Model: Model 3, Range_km: 415, TopSpeed_kmh: 201, Price_pounds: 39,990, Charge_kmh: 690.

1.3 Scales of Measurement

Understanding scales of measurement is crucial for analyzing and interpreting data effectively in business. By distinguishing between categorical (e.g., marital status, satisfaction ratings) and numerical data (e.g., profits, prices), you’ll know what methods to use for analysis. Knowing whether data is nominal, ordinal, interval, or ratio ensures your analysis and conclusions are accurate and relevant.

The scales of measurements determine the amount and type of information contained in each variable. In general, variables can be classified as categorical or numerical.

  • Categorical (qualitative) data includes labels or names to identify an attribute of each element. Categorical data can be nominal or ordinal.

    • With nominal data, the order of the categories is arbitrary. Numbers (if used) serve only as identifiers. Common statistics used are based on counting frequencies and the mode (most common category) Ex: Marital Status, Race/Ethnicity, or NFL division.

    • With ordinal data, the order or rank of the categories is meaningful, but intervals between ranks are not necessarily equal or quantifiable. Common statistics are based on median, percentiles, or rank-order correlations. Ex: Rating, Difficulty Level, or Spice Level.

  • Numerical (quantitative) include numerical values that indicate how many (discrete) or how much (continuous). The data can be either interval or ratio.

    • With interval data, the distance between values is expressed in terms of a fixed unit of measure. The zero value is arbitrary and does not represent the absence of the characteristic. Ratios are not meaningful. Common statistics are the arithmetic mean, standard deviation, or the Pearson correlation, Ex: Temperature or Dates.

    • With ratio data, the ratio between values is meaningful. The zero value is not arbitrary and represents the absence of the characteristic. All statistics are permissable including geometric mean, and the coefficient of variation. Ex: Prices, Profits, Wins.

Example: Let’s keep using the EV example. Consider the new data set below:

Car Brand Range Rating Year
Model 3 Tesla 415 4 2021
Model S Tesla 652 5 2021
Leaf Nissan 270 3 2021
i3 BMW 260 3 2021
e-tron Audi 400 4 2021
Mustang Ford 483 4 2021
… … … … …

The variables can be classified as follows:

  • Car (Categorical - Nominal), consists of names of cars, which are labels used to identify each row. The order of these names does not matter, making it nominal data.

  • Brand (Categorical - Nominal) represents the manufacturer of the car (e.g., Ford, Audi). These are labels with no inherent order, making it nominal data.

  • Range (Numerical - Ratio), refers to the car’s driving range in miles. It is numerical and ratio because it has a meaningful zero (a car with zero range cannot move), and ratios are meaningful (e.g., a car with 250 miles range has double the range of one with 125 miles).

  • Rating (Categorical - Ordinal) represents a rank or score (e.g., 4, 3, 2). The order matters, as higher ratings indicate better performance. However, the intervals between ratings are not consistent, so it is ordinal data.

  • Year (Numerical - Interval) represents a point in time. While numerical, it is interval data because the zero point is arbitrary (e.g., year 0 does not indicate the “absence” of time), and ratios are not meaningful (e.g., 2020 is not “twice as late” as 1010).

1.4 Chapter Summary Cheat Sheet

Quick reference
Types of Data
01 · Categorical
Nominal
labels with no order

Names or categories with no ranking. Summarized by counts and the mode. Ex: brand, gender, division.

Excel=COUNTIF · PivotTable
02 · Categorical
Ordinal
ranked, unequal gaps

Ordered categories, but the gaps between ranks are not equal. Use the median and percentiles. Ex: satisfaction 1–5.

Excel=MEDIAN · =QUARTILE.INC
03 · Numerical
Interval
equal gaps, no true zero

Differences are meaningful but ratios are not (zero is arbitrary). Use the mean and standard deviation. Ex: temperature, year.

Excel=AVERAGE · =STDEV.S
04 · Numerical
Ratio
true zero, ratios valid

The strongest scale: a meaningful zero makes ratios valid, so every statistic applies. Ex: price, weight, sales.

Excel=GEOMEAN · all functions
05 · Structure
Cross-Section vs Time Series
when it is collected

Cross-sectional data is captured at one point in time; time-series data is tracked over many periods.

Example2015 GDP vs 2000–2010 inflation
06 · Anatomy
Elements, Variables, Observations
how a data set is built

Elements are the entities (rows); variables are the characteristics collected (columns); an observation is one element's values.

Example1 row = 1 element
Key Terms
Categorical
Labels / qualitative
Numerical
Quantities / quantitative
Nominal
Unordered labels
Ordinal
Ordered ranks
Interval
Equal gaps, arbitrary 0
Ratio
True zero, ratios valid
Element
An entity (row)
Variable
A characteristic (column)
Key Facts
Order matters?
Ordinal, interval, ratio
Meaningful zero?
Ratio only
Ratios valid?
Ratio only
Mode works on?
Any scale
Mean works on?
Interval and ratio
Temperature is?
Interval
No row-column format?
Unstructured data

1.5 Check Your Understanding

Test the main ideas of the chapter before moving on to the exercises. Pick an answer to see whether you are right and why.

A retailer records the total revenue of each of its \(50\) stores on Black Friday 2025. What kind of data is this?

The data cover many stores at a single point in time. If the retailer tracked one store’s revenue week after week, it would be time series data.

A company collects thousands of customer reviews written on social media. How would you classify this data?

Free text does not fit a predefined row-and-column format, so it is unstructured. It must be processed (for example, turned into ratings or word counts) before it can be analyzed like a spreadsheet.

In the electric vehicle data set, each row is a car model and one of the columns is Range_km. What is Range_km?

Variables are the characteristics measured for every element, and they appear as columns. The elements are the car models (the rows), and an observation is one car’s full set of values.

Customers rate their satisfaction from 1 (very poor) to 5 (excellent). Which scale of measurement is this?

The order is meaningful (a 4 is better than a 3), but the gaps between ratings are not guaranteed to be equal, so the data are ordinal even though they are written as numbers.

The players on a soccer team wear jersey numbers. Which scale of measurement are the jersey numbers?

The numbers are only labels that identify each player. Number 10 is not “more” than number 5, and averaging jersey numbers would be meaningless.

Why is temperature in degrees Fahrenheit measured on an interval scale and not a ratio scale?

On an interval scale the zero is arbitrary. Since \(0^\circ\)F is not the absence of heat, \(80^\circ\)F is not “twice as hot” as \(40^\circ\)F, even though the \(40\)-degree difference is meaningful.

Which summary statistic makes sense for a nominal variable such as car Brand?

With nominal data we can only count how often each category appears, so the most common category (the mode) is the natural summary. The median needs an order and the mean needs numbers with equal gaps.

Which statement can only be made about data measured on a ratio scale?

Ratios need a true zero. A price of $20 is twice a price of $10, but the year 2020 is not twice the year 1010. Ordering works from the ordinal scale up, and differences work from the interval scale up.

1.6 Exercises

The following exercises will help you test your knowledge on the Scales of Measurement. In these exercises you will:

  • Identify numerical and categorical data.

  • Classify data according to their scale of measurement.

Answers are provided below. Try not to peek until you formulate your own answer and double checked your work for any mistakes. You can also find every answer on the Answers to Exercises page.

Exercise 1

A bookstore has compiled data set on their current inventory. A portion of the data is shown below:

Title Price Year Published Rating
Frankenstein 5.49 1818 4.2
Dracula 7.60 1897 4.0
… … … …
Sleepy Hollow 6.95 1820 3.8
  1. Which of the above variables are categorical and which are numerical?
Answer
  • The “Title” variable represents the names of books. Therefore, this is a categorical variable.

  • “Price” represents the cost of each book in a numeric format, making it a numerical variable.

  • “Year Published” indicates the publication year of each book. It is numerical.

  • If “Rating” represents a numerical score based on a continuous scale (e.g., average user ratings on a platform like Goodreads), it is numerical because arithmetic operations like averaging or comparing differences are meaningful. If “Rating” represents predefined categories (e.g., “Excellent,” “Good,” “Fair,” “Poor”) or is interpreted as ranks without meaningful differences between values, it would be categorical.

  1. What is the measurement scale of each of the above variable?
Answer
  • The measurement scale is nominal for “Title” since these are labels used to identify each book and do not have a numerical meaning or order.

  • If “Rating” represents a score (e.g., 4.2, 4.0) given to each book, it is numerical and could be considered interval data because the scale represents a meaningful difference, but it may not have an absolute zero or meaningful ratios (e.g., a book rated 4.0 is not “twice as good” as one rated 2.0).

  • “Price” is a measurable quantity with a meaningful zero (e.g., a book priced at $0 means it is free), making it ratio data.

  • “Year” is interval data because the zero point is arbitrary (year 0 does not represent the absence of time) and differences between years are meaningful (e.g., 1897 - 1818 = 79 years).

Exercise 2

A car company tracks the number of deliveries every quarter. A portion of the data is shown below:

Year Quarter Deliveries
2016 1 14800
2016 2 14400
… … …
2022 3 343840
  1. What is the measurement scale of the Year variable? What are the strengths and weaknesses of this type of measurement scale?
Answer

The variable Year is measured on the interval scale because the observations can be ranked, categorized and measured when using this kind of scale. However, there is no true zero point so we cannot calculate meaningful ratios between years.

  1. What is the measurement scale for the Quarter variable? What is the weakness of this type of measurement scale?
Answer

The variable Quarter is measured on the ordinal scale, even though it contains numbers.

  1. What is the measurement scale for the Deliveries variable? What are the strengths of this type of measurement scale?
Answer

The variable Deliveries is measured on the ratio scale. It is the strongest level of measurement because it allows us to categorize and rank the data as well as find meaningful differences between observations. Also, with a true zero point, we can interpret the ratios between observations.

Exercise 3

A coffee shop chain collects customer feedback data for analysis. For each visit/transaction recorded in their database, the following variables are stored:

  • Customer ID: A unique identifier assigned to each registered customer (e.g., C001234, C005678).
  • Satisfaction Level: Customers rate their overall experience as 1 (Very Dissatisfied), 2 (Dissatisfied), 3 (Neutral), 4 (Satisfied), or 5 (Very Satisfied).
  • Visit Duration: The time spent in the store in minutes (e.g., 15, 42, 8).
  • Beverage Type: The main drink ordered (e.g., Latte, Cappuccino, Americano, Tea, Other).
Answer
  • Customer ID: Categorical, Nominal. These are arbitrary labels used only for identification. There is no order or numerical meaning; you can only determine if two IDs are the same or different.
  • Satisfaction Level: Categorical, Ordinal. The ratings have a clear order (higher numbers indicate greater satisfaction), but the intervals between levels are not necessarily equal (the difference between 4 and 5 may not be perceived the same as between 1 and 2). Ratios are not meaningful.
  • Visit Duration: Numerical, Ratio. Time in minutes has a true zero (0 minutes means no time spent), equal intervals, and meaningful ratios (e.g., 60 minutes is twice as long as 30 minutes). All arithmetic operations are valid.
  • Beverage Type: Categorical, Nominal. These are unordered categories/labels for different drinks. You can group or count them, but there is no natural order or numerical relationship between categories like “Latte” and “Tea”.