Statistics is the science of learning from data. It provides methods for collecting, summarizing, analyzing, and interpreting observations so that we can describe patterns, quantify uncertainty, and make informed decisions.
This guide introduces the main ideas used throughout statistical analysis.
Descriptive statistics tell us what the observed data look like, while inferential methods help us reason beyond the observed sample.
Statistics does not make decisions automatically. It provides evidence and measures of uncertainty that can support better decisions.
# @ * ! % * # ! @
* ! % # @ ! % @ *
@ # ! % * @ # % #
! % @ * # ! @ * !
% * # @ ! % @ * #
@ !
* %
Researchers often study a sample because collecting data from the entire population may be too expensive, slow, or impractical.
The goal is usually to use information from the sample to learn about the population.
In a poll of 1,200 registered voters, 45% prefer candidate A over candidate B.
The population is the group of registered voters that the poll is intended to represent.
The observed 45% is a sample statistic used to estimate the corresponding population proportion.
An educational researcher surveys 100 teachers across 20 schools to study remote learning.
The population is the broader group of teachers the researcher wants to draw conclusions about.
The sample consists of the 100 teachers who were surveyed.
Researchers interview 250 gym members to study how often gym members in a city use gym facilities.
The population is the relevant population of gym members in that city.
Notice that the population is determined by the research question. A sample cannot reliably support conclusions about a broader population than the one it was designed to represent.
Representativeness is not achieved simply by making every demographic percentage in the sample identical to the population. The sampling method matters because hidden differences between sampled and unsampled individuals can still introduce bias.
Suppose a population contains equal numbers of individuals in two categories, F and M:
| F | F | M | M | F | M |
A sample with the same overall balance might look like:
| F | M | F | M |
Matching the population proportions can be desirable, but representativeness also depends on how the sample was selected.
Bias refers to a systematic tendency for a measurement, estimate, or study design to favor certain outcomes.
Different biases arise at different stages of a study, so no single procedure eliminates all forms of bias.
Sampling determines who enters the study; random assignment determines which treatment they receive. These ideas serve different purposes.
A statistic can be used to estimate a parameter, but the two are not the same.
Imagine a group of individuals:
O O O O O
/|\ /|\ /|\ /|\ /|\
/ \ / \ / \ / \ / \
Each person may have several measured characteristics, such as height or weight, as well as recorded categorical characteristics.
A possible data table is:
| Name | Gender | Weight | Height |
| Alice | Female | 135 | 5'6" |
| Bob | Male | 180 | 6'0" |
| Carol | Female | 140 | 5'5" |
| David | Male | 175 | 5'11" |
| Eve | Female | 150 | 5'7" |
Here, each row represents an observational unit, while each column represents a recorded variable.
Name may function mainly as an identifier rather than as a variable of statistical interest. Gender is categorical, while weight and height are numerical.
The notation helps distinguish population quantities from sample quantities:
| Population | Sample |
| Mean: $\mu$ | Mean: $\bar{x}$ |
| Standard deviation: $\sigma$ | Standard deviation: $s$ |
| Proportion: $p$ | Proportion: $\hat p$ |
Researchers want to estimate the average income of all adults in a city. The population consists of the adults included in the target population, and the population mean income is the parameter of interest.
Because measuring every adult may be impractical, the researchers collect a sample of 500 adults.
They calculate the sample mean income:
``math id="xk2hnc"
\bar{x}
=
\frac{1}{n}\sum_{i=1}^{n}x_i.
``
This sample mean is a statistic.
Using sample statistics to learn about unknown population parameters is one of the central ideas of inferential statistics.
Variables are commonly divided into numerical and categorical types:
All Variables
/ \
Numerical Categorical
/ \ / \
Discrete Continuous Nominal Ordinal
This classification is useful because the type of variable affects which summaries, visualizations, and statistical methods are appropriate.
Numerical variables take numerical values for which arithmetic operations can be meaningful.
A discrete numerical variable takes values from a countable set. Counts are common examples. The number of children in a family might take values $0,1,2,\ldots$.
A continuous numerical variable is modeled as being able to take any value within an interval. Measurements such as exact height, mass, or temperature are commonly treated as continuous.
Whether a recorded variable appears discrete can depend on measurement precision. For example, age recorded only in completed years takes integer values, while exact age is naturally modeled as continuous.
Categorical variables place observations into groups or categories rather than measuring quantities on a numerical scale.
A nominal variable has categories with no natural ranking. Examples include blood type, animal species, or car manufacturer.
An ordinal variable has categories with a meaningful order, but the distances between categories are not necessarily equal. Examples include satisfaction levels such as poor, fair, good, and excellent, or education levels.
A variable can sometimes be encoded with numbers without becoming numerical. For example, assigning 1 = poor, 2 = fair, and 3 = good does not imply that the difference between poor and fair is quantitatively equal to the difference between fair and good.
| Name | Age | Height (inches) | Income ($) | Education Level | Marital Status |
| Alice | 28 | 64 | 50000 | High School | Married |
| Bob | 35 | 70 | 75000 | Bachelor's | Single |
| Carol | 42 | 62 | 60000 | Master's | Married |
| David | 31 | 68 | 80000 | Ph.D. | Single |
| Eve | 26 | 66 | 45000 | Associate's | Married |
Explanation of Variables in the Table:
The distinction between the underlying variable and the way it is recorded is important. Rounding a continuous measurement does not necessarily change the conceptual type of the variable.
Explanatory Variable:
For example, when studying the relationship between study time and exam performance, study time may be treated as the explanatory variable.
Response Variable:
The terms independent variable and dependent variable are also widely used, but explanatory and response are often clearer because they do not imply statistical independence.
Practical Illustration:
If the researchers only observe existing study habits, the study can identify an association between study time and exam performance.
If they randomly assign students to different study-duration conditions under an appropriate experimental design, they have a stronger basis for investigating a causal effect.
Observational studies and experiments differ mainly in whether researchers assign or manipulate the explanatory variable.
| Aspect | Observational Studies | Experiments |
| Purpose | Study variables as they naturally occur. | Study responses to deliberately assigned interventions or conditions. |
| Control | Researchers do not assign the exposure or treatment; control over confounding is therefore more limited. | Researchers assign treatments and can often use randomization, control groups, and blinding. |
| Causation | Can provide strong evidence of association, but causal interpretation requires additional assumptions and careful design. | Well-designed randomized experiments can provide strong evidence for causal effects because random assignment helps control confounding. |
| Examples | Cross-sectional studies, cohort studies, case-control studies, surveys. | Randomized clinical trials, laboratory experiments, field experiments. |
| Ethics | Ethical requirements depend on the type of data and study design. Observational research involving people may still require consent and ethical review. | Interventions involving human or animal participants may require informed consent, risk assessment, and formal ethical oversight. |
The distinction between association and causation is important.
If an observational study finds that people who study longer tend to receive higher exam scores, several explanations are possible. Study time may affect performance, but other variables—such as prior preparation, motivation, or course difficulty—may influence both.
These additional variables are called confounders.
A randomized experiment helps address this problem by assigning treatments independently of participants' pre-existing characteristics. When randomization is successful and the study is otherwise well designed, differences between treatment groups can more credibly be attributed to the treatment itself.
Even randomized experiments do not establish causation automatically. Poor adherence, missing data, measurement problems, inappropriate analysis, or lack of external validity can still limit the conclusions.
Statistics therefore depends not only on calculations, but also on how the data were collected, what population they represent, and what assumptions are required to interpret them.