6.1 Data, variables, populations, and samples
Statistical work begins by deciding what each row represents, what has been measured, and which larger group the study is intended to describe.
6.1.1 Data matrices and variable types
Data matrix. A rectangular arrangement in which rows represent cases and columns represent variables.
Variable. A recorded characteristic that can differ from one case to another.
Numerical variables arise from measurement or counting, so arithmetic such as differences and averages can be meaningful. Categorical variables place cases into groups or labels. Numerical variables may be continuous, such as flow, or discrete, such as the number of pump failures.
Worked Example: Reading a water-quality data matrix
Suppose each row represents a sampling date and columns record site, turbidity, temperature, and alarm status. Sampling date is the case identifier, site and alarm status are categorical variables, and turbidity and temperature are numerical variables.
Check Your Work
Material is categorical, diameter is numerical continuous, and break count is numerical discrete.Worked Example: Identifying cases and variables
A table contains 60 rows, each representing one filter run, and columns for run time, terminal head loss, and media type. There are 60 cases and three measured variables.
Check Your Work
The 24 wells are cases. Depth and yield are numerical; aquifer class is categorical.6.1.2 Populations, samples, parameters, and statistics
Population. The complete collection of cases about which a study seeks information.
Sample. The subset of the population from which data are collected.
A parameter describes a population, while a statistic is calculated from a sample. The sample mean \(\bar x\) estimates the population mean \(\mu\). A useful research question identifies the target population, variables, and time or setting of interest.
Worked Example: Identifying a target population
To estimate average summer turbidity in a watershed, technicians collect weekly samples at selected sites. The population is all relevant summer turbidity measurements in the watershed, and the collected readings form the sample.
Check Your Work
The 600 connections form the population; the 40 tested connections form the sample.Worked Example: Distinguishing a statistic from a parameter
The mean of 30 sampled chlorine residuals is 0.72 mg/L. This value is a statistic. The unknown mean residual across all relevant times and locations is a parameter.
Check Your Work
It is a parameter for that complete facility pump population.Check Your Work
The 12 dates are cases. Source and alarm status are categorical. Both turbidity measurements and temperature are numerical continuous variables.6.1.3 Practice Problems
- Define a case in a data matrix.
Check Your Work
The observational unit represented by one row. - Classify colour as numerical or categorical.
Check Your Work
Categorical. - Classify the number of valve failures.
Check Your Work
Numerical discrete. - Distinguish \(\bar x\) from \(\mu\).
Check Your Work
\(\bar x\) is a sample mean; \(\mu\) is a population mean. - Why is a sample used?
Check Your Work
Measuring an entire population may be impractical, costly, destructive, or impossible. - A sample contains 25 daily flow values from a year. Identify population and sample.
Check Your Work
Population: all daily flows in the year; sample: the 25 selected days. - Classify pH, treatment plant, and complaint count.
Check Your Work
pH numerical continuous; plant categorical; complaint count numerical discrete. - The mean pressure of every hydrant in a network is calculated. Is it a statistic or parameter?
Check Your Work
A parameter for that network.