Documentation

# Descriptive Statistics

Numerical summaries and associated measures

Compute descriptive statistics from sample data, including measures of central tendency, dispersion, shape, correlation, and covariance. Tabulate and cross-tabulate data, and compute summary statistics for grouped data. If your data contains missing (`NaN`) values, MATLAB® arithmetic operation functions return `NaN`. However, specialized functions available in Statistics and Machine Learning Toolbox™ ignore these missing values and return a numerical value calculated using the remaining values. For more information, see Data with Missing Values.

## Functions

expand all

 `geomean` Geometric mean `harmmean` Harmonic mean `trimmean` Mean, excluding outliers `nanmean` Mean, ignoring NaN values `nanmedian` Median, ignoring NaN values `kurtosis` Kurtosis `moment` Central moment `skewness` Skewness `nanstd` Standard deviation, ignoring NaN values `nanvar` Variance, ignoring NaN values
 `range` Range of values `nanmax` Maximum, ignoring NaN values `nanmin` Minimum, ignoring NaN values `iqr` Interquartile range `mad` Mean or median absolute deviation `prctile` Percentiles of a data set `quantile` Quantiles of a data set `zscore` Standardized z-scores
 `corr` Linear or rank correlation `robustcov` Robust multivariate covariance and mean estimate `cholcov` Cholesky-like covariance decomposition `corrcov` Convert covariance matrix to correlation matrix `partialcorr` Linear or rank partial correlation coefficients `partialcorri` Partial correlation coefficients adjusted for internal variables `nancov` Covariance ignoring NaN values `nearcorr` Compute nearest correlation matrix by minimizing Frobenius distance
 `grpstats` Summary statistics organized by group `tabulate` Frequency table `crosstab` Cross-tabulation `tiedrank` Rank adjusted for ties `nansum` Sum, ignoring NaN values

## Topics

Exploratory Analysis of Data

Explore the distribution of data using descriptive statistics.

Data with Missing Values

Compute descriptive statistics while ignoring missing values.

Measures of Central Tendency

Locate a distribution of data along an appropriate scale.

Measures of Dispersion

Find out how spread out the data values are on the number line.

Quantiles and Percentiles

Learn how the Statistics and Machine Learning Toolbox computes quantiles and percentiles.

Grouping Variables

Grouping variables are utility variables used to group or categorize observations.