Statistical and machine-learning notation describes data, uncertainty, relationships, model structure, and learning procedures. A dataset is commonly represented as a collection of observations, often arranged in a matrix with rows representing observations and columns representing features. Individual observations may be represented by vectors, while model parameters may be represented by vectors or matrices. Random variables are commonly written using uppercase letters, while realized values are written using lowercase letters. Probability notation distinguishes joint, marginal, and conditional probabilities. Statistical summaries include the sample mean, variance, standard deviation, covariance, correlation, quantiles, and confidence intervals. Estimator notation often uses a hat, such as θ̂, to distinguish an estimated quantity from an unknown population parameter θ. Machine-learning notation represents a model as a function mapping input features to predictions. Training involves selecting parameters that minimize or otherwise optimize an objective function, often called a loss or cost function. Regularization terms penalize model complexity or parameter magnitude. Classification models may output class probabilities or predicted labels, while regression models predict numerical values. Evaluation notation includes accuracy, precision, recall, F₁ score, mean squared error, root mean squared error, and coefficient of determination. Different fields and textbooks use different conventions for vectors, matrices, transposes, indexing, and probability distributions. Every model description should define its dataset dimensions, feature indexing, target variable, parameter symbols, and evaluation metrics.
Data Science, Statistics and Machine Learning Notation
Data science, statistics, and machine learning use mathematical notation to represent datasets, random variables, probability distributions, statistical estimators, model parameters, vectors, matrices, optimization objectives, and predictive relationships. Consistent notation is essential for interpreting statistical analyses, machine-learning algorithms, and scientific data models.
Sample mean: x̄ = (1/n)∑ᵢ₌₁ⁿxᵢ. Sample variance: s² = (1/(n−1))∑ᵢ₌₁ⁿ(xᵢ−x̄)². Bayes' theorem: P(A|B) = P(B|A)P(A)/P(B), for P(B)>0. A general empirical-risk objective is θ̂ = argmin_θ[(1/n)∑ᵢ₌₁ⁿL(f_θ(xᵢ), yᵢ) + λΩ(θ)].
Explanation
Variables
| Symbol | Meaning | Unit |
|---|---|---|
n | Number of observations in a sample or dataset. | Count |
p | Number of features or predictors in a dataset. | Count |
xᵢ | The observed value or feature vector for observation i. | Depends on the feature. |
yᵢ | Observed target or response value for observation i. | Depends on the target. |
x̄ | Sample mean. | Same as the measured variable. |
s² | Sample variance. | Squared units of the measured variable. |
s | Sample standard deviation. | Same as the measured variable. |
μ | Population mean or a distribution parameter. | Same as the measured variable. |
σ² | Population variance. | Squared units of the measured variable. |
θ | Model or statistical parameter. | Model-dependent. |
θ̂ | An estimate of parameter θ. | Same as θ. |
λ | Regularization coefficient or another model-specific parameter. | Depends on the objective-function definition. |
L | Loss function. | Depends on the loss definition. |
P(A) | Probability of event A. | Dimensionless, between 0 and 1. |
Example or application
A worked example has not yet been added.
Definition
Data science, statistical, and machine-learning notation is the mathematical language used to represent data observations, variables, probability models, statistical quantities, model parameters, learning objectives, predictions, and evaluation measures.
Purpose
To define datasets, quantify uncertainty, express statistical relationships, specify machine-learning models, formulate optimization objectives, and evaluate predictive performance.
Importance
Statistical and machine-learning notation provides a precise framework for data analysis, scientific inference, model development, reproducibility, and interpretation of uncertainty. Understanding the symbols helps prevent confusion between samples and populations, observed values and estimates, model predictions and actual outcomes, and correlation and causation.
Dataset And Matrix Notation
| Notation | Meaning | Dimensions |
|---|---|---|
X | A data matrix, commonly with n rows and p columns. | n × p. |
xᵢ | The feature vector for observation i. | Often p × 1. |
xᵢⱼ | The value of feature j for observation i. | Scalar. |
y | A target or response vector. | Often n × 1. |
β | A coefficient vector in a regression model. | Depends on the number of predictors. |
Xᵀ | Transpose of matrix X. | p × n when X is n × p. |
I | Identity matrix. | Square matrix. |
‖x‖₂ | Euclidean norm of vector x. | Scalar magnitude. |
x·y | Dot product of vectors x and y. | Scalar. |
Probability And Distribution Notation
| Notation | Meaning |
|---|---|
P(A) | Probability of event A. |
P(A|B) | Conditional probability of A given B. |
P(A ∩ B) | Joint probability that both A and B occur. |
P(A ∪ B) | Probability that at least one of A or B occurs. |
X ∼ D | Random variable X follows distribution D. |
X ∼ N(μ, σ²) | X follows a normal distribution with mean μ and variance σ². |
E[X] | Expected value of random variable X. |
Var(X) | Variance of random variable X. |
Cov(X, Y) | Covariance between random variables X and Y. |
ρ(X, Y) | Population correlation coefficient between X and Y. |
X ⫫ Y | X and Y are independent, when this notation is adopted. |
Statistical Estimation Notation
| Notation | Meaning |
|---|---|
μ | Population mean. |
x̄ | Sample mean. |
σ² | Population variance. |
s² | Sample variance. |
σ | Population standard deviation. |
s | Sample standard deviation. |
θ̂ | Estimator or estimated value of parameter θ. |
SE | Standard error of an estimator or statistic. |
CI | Confidence interval. |
H₀ | Null hypothesis. |
H₁ or Hₐ | Alternative hypothesis. |
p-value | Probability, under the null model and test assumptions, of obtaining a test statistic at least as extreme as the observed statistic. |
α | Significance level or another specified parameter. |
Machine Learning Notation
| Notation | Meaning |
|---|---|
f_θ(x) | Model prediction produced from input x using parameters θ. |
ŷ | Predicted target value. |
L(y, ŷ) | Loss associated with the true target y and prediction ŷ. |
J(θ) | Objective or cost function to be optimized. |
∇_θJ(θ) | Gradient of the objective function with respect to parameters θ. |
η | Learning rate or step-size parameter in many optimization algorithms. |
λ | Regularization strength in a regularized objective. |
argmin | Argument or parameter value that minimizes a function. |
argmax | Argument or parameter value that maximizes a function. |
D_train | Training dataset. |
D_valid | Validation dataset. |
D_test | Test dataset. |
Model Evaluation Symbols
| Metric | Notation | Meaning |
|---|---|---|
Accuracy | (TP + TN)/(TP + TN + FP + FN) | Fraction of all evaluated predictions that are correct. |
Precision | TP/(TP + FP) | Fraction of predicted positive cases that are true positives. |
Recall | TP/(TP + FN) | Fraction of actual positive cases that are identified. |
F₁ score | 2PR/(P + R) | Harmonic mean of precision P and recall R when their sum is nonzero. |
Mean squared error | MSE = (1/n)∑(yᵢ − ŷᵢ)² | Average squared prediction error. |
Root mean squared error | RMSE = √MSE | Square root of mean squared error, expressed in the target's units. |
Coefficient of determination | R² = 1 − SS_res/SS_tot | A measure of explained variation relative to a specified baseline in the standard regression setting. |
Worked Examples
| Example | Given | Calculation | Result |
|---|---|---|---|
Sample mean | A sample contains values 2, 4, 6, 8, and 10. | x̄ = (2 + 4 + 6 + 8 + 10)/5 | Sample mean = 6. |
Conditional probability | P(A ∩ B) = 0.2 and P(B) = 0.5. | P(A|B) = P(A ∩ B)/P(B) = 0.2/0.5 | P(A|B) = 0.4. |
Prediction error | The actual value is 10 and the predicted value is 8. | Error = y − ŷ = 10 − 8 | Prediction error = 2; squared error = 4. |
Precision | A classifier produces 40 true positives and 10 false positives. | Precision = 40/(40 + 10) | Precision = 0.8 or 80%. |
Interpretation Rules
Distinguish a random variable from an observed realization of that variable.
Distinguish population parameters from sample statistics and their estimates.
Check whether a vector is represented as a row vector or column vector.
Identify the dimensions of matrices before performing matrix operations.
Do not interpret correlation as proof of causation.
Check whether an evaluation metric is defined for binary, multiclass, or multilabel classification.
Identify the data split used when reporting model performance.
State whether variance uses a population denominator or the sample correction.
Reference
Wasserman, All of Statistics
James, Witten, Hastie and Tibshirani, An Introduction to Statistical Learning
Bishop, Pattern Recognition and Machine Learning
Murphy, Probabilistic Machine Learning
Hastie, Tibshirani and Friedman, The Elements of Statistical Learning
Related Topic
SCI-REF-006-097
SCI-REF-006-098
SCI-REF-006-100
Sources and verification
Sources are shown as provided in the project data. Not every source has yet been independently verified. Please report errors or missing citations.
- Source verification pending; check an authoritative textbook, university, standards body, or peer-reviewed source.
Suggest a correction or source · More in Scientific Symbols & Notation