Notes

Statistic

Definition

A statistic is any numerical quantity computed from observed data (a sample). It summarizes some aspect of the data—such as location, spread, association, or shape—without requiring knowledge of the full population. Formally, a statistic is a function of the sample values (e.g., the sample mean is a function of all observed points). Because it is computed from data that could have been different, a statistic is typically a random variable with its own sampling distribution.

Why it matters in AI/ML

AI/ML pipelines rely on statistics to turn raw datasets into measurable signals for modeling, optimization, and evaluation. Common uses include:

  • Feature engineering: computing per-user averages, counts, or rates as model inputs.
  • Model fitting: many learned parameters are statistics of the training data (e.g., class-conditional means in Gaussian Naive Bayes).
  • Regularization and normalization: batch normalization uses mini-batch mean/variance statistics; standardization uses training-set mean and standard deviation.
  • Evaluation: accuracy, precision/recall, AUC, and log loss are statistics computed on a test set.
  • Uncertainty and inference: confidence intervals and hypothesis tests are built from statistics (e.g., t-statistics).

Practical examples

  • In A/B testing for a recommender system, the difference in click-through rates between variants is a statistic used to decide whether a change improved engagement.
  • In anomaly detection, the z-score uses the sample mean and sample standard deviation (both statistics) to flag unusually large deviations.
  • In cross-validation, the average validation loss across folds is a statistic used to compare models and tune hyperparameters.

Common statistics you’ll see

  • Sample mean, median, variance, standard deviation
  • Correlation, covariance, contingency-table counts
  • Quantiles (e.g., 95th percentile), skewness, kurtosis

Statistic is any numerical quantity computed from sample data (a function of the observations) that summarizes or captures information about an underlying population or data-generating process. Statistics are central in AI/ML for describing data, estimating model parameters, and evaluating uncertainty and performance. Examples include the sample mean and variance used to standardize features, or accuracy and log-loss computed on a validation set to compare models.

Imagine you’re trying to describe a whole jar of jellybeans, but you only look at a handful. You might say, “Most are red,” or “The average size is small.” Those quick summary numbers are like a statistic.

In statistics and machine learning, a statistic is any number you calculate from your data to describe it. Examples include the average (mean), the middle value (median), or the percent that are “yes” vs. “no.” Models often use statistics to understand patterns in data and to make decisions, like predicting house prices from past sales.