# Statistics Formulas

CalculatorSoup uses the following formulas throughout our statistics calculators.

## Mean Formula (Arithmetic Mean)

The sum of all of the data divided by the count. The mean is also known as the average. Add up all the data values then divide by the number of data values. The only difference between the population and the sample is the symbol used to express the mean; μ and x respectively.

Population

\[ \mu = \dfrac{\sum_{i=1}^{n}x_i}{n} = \dfrac{x_{1}+x_{2}+x_{3}+\cdots+x_{n}}{n}\]Sample

\[ \overline{x} = \dfrac{\sum_{i=1}^{n}x_i}{n} = \dfrac{x_{1}+x_{2}+x_{3}+\cdots+x_{n}}{n}\]CalculatorSoup uses the formula for mean in these calculators: Average Calculator, Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Standard Deviation Calculator, Stem and Leaf Plot Generator, Variance Calculator, Z-Score Calculator.

## Geometric Mean Formula

The product of all of the data raised to the power of the reciprocal of the count n. Multiply all the data values together then raise to the power of 1/n. Stated differently, the n^{th} root of the product of the data.

## Harmonic Mean Formula

The count n times the reciprocal of the sum of the reciprocals of the data. Or, the reciprocal of the arithmetic mean of the reciprocals of a set of data. Sum the reciprocals of the data then divide that result into count n.

\[ HM = \dfrac{n}{\sum_{i=1}^{n}\dfrac{1}{x_{i}}} = \dfrac{n}{\dfrac{1}{x_{1}}+\dfrac{1}{x_{2}}+\dfrac{1}{x_{3}}+\cdots+\dfrac{1}{x_{n}} } \]## Median Formula

Ordering a data set from lowest to highest value, x_{1} ≤ x_{2} ≤ x_{3} ≤ ... ≤ x_{n}, the median is the numeric value separating the upper half of the ordered sample data from the lower half. If n is an odd number the median is the center value. If n is an even number the median is the average of the 2 center values.

If n is odd the median is the value at middle position p where

\[ p = \dfrac{n + 1}{2} \] \[ \widetilde{x} = x_p \]If n is even the median is the average of the values at middle positions p and p + 1 where

\[ p = \dfrac{n}{2} \] \[ \widetilde{x} = \dfrac{x_{p} + x_{p+1}}{2} \]CalculatorSoup uses the formula for median in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Quartile Calculator, Stem and Leaf Plot Generator.

## Mode Formula

The value or values that occur most frequently in the data set. Tally a count for each value in a data set, and the mode is the data value with the largest count.

CalculatorSoup uses the formula for mode in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Stem and Leaf Plot Generator.

## Weighted Mean Formula | Weighted Average Formula

The sum of weights w times means x for each group of data, divided by the sum of the weights w.

If weights are the counts n of each group of data, then the weighted average is the sum of the counts n times the means x divided by the sum of the counts n.

\[ \overline{x} = \dfrac{\sum_{i=1}^{n}w_i\overline{x}_i}{\sum_{i=1}^{n}w_i} \]## Minimum Formula

Ordering a data set from lowest to highest value, the minimum is the smallest value, x_{1}.

x_{1} ≤ x_{2} ≤ x_{3} ≤ ... ≤ x_{n}

CalculatorSoup uses the formula for the minimum in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Quartile Calculator.

## Maximum Formula

Ordering a data set from lowest to highest value, the maximum is the largest value, x_{n}.

x_{1} ≤ x_{2} ≤ x_{3} ≤ ... ≤ x_{n}

CalculatorSoup uses the formula for the maximum in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Quartile Calculator.

## Range Formula

The range of a data set is the difference between the minimum and maximum. To find the range, calculate x_{n} minus x_{1}.

CalculatorSoup uses the formula for range in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator.

## Midrange Formula

Midrange is the average of the minimum and maximum values of a data set.

\[ \text{MR} = \dfrac{x_{min} + x_{max}}{2} \]## Count Formula

The count is the total number of data values in a data set. This is also known as the size of a data set.

\[ \text{Count} = n = \text{count}(x_i)_{i=1}^{n} \]CalculatorSoup uses the formula for midrange in these calculators: Basic Statistics Calculator, Descriptive Statistics Calculator.

CalculatorSoup uses the formula for midrange in the Descriptive Statistics Calculator.

## Frequency

The number of occurrences for each data value in the data set.

CalculatorSoup uses the formula for frequency in these calculators: Descriptive Statistics Calculator, Variance Calculator.

## Sum Formula

The sum is the total of all data values added together. Sum = x_{1} + x_{2} + x_{3} + ... + x_{n}

CalculatorSoup uses the formula for the sum in these calculators: Average Calculator, Basic Statistics Calculator, Descriptive Statistics Calculator, Mean Median Mode Calculator, Standard Deviation Calculator, Stem and Leaf Plot Generator, Variance Calculator, Z-Score Calculator.

## Percentile Formula

- Arrange
*n*number of data points in ascending order: x_{1}, x_{2}, x_{3}, ... x_{n} - Calculate the rank
*r*for the percentile*p*you want to find: r = (p/100) * (n - 1) + 1 - If
*r*is an integer then the data value at location r, x_{r}, is the percentile*p*: p = x_{r} - If
*r*is not an integer,*p*is interpolated using*ri*, the integer part of*r*, and*rf*, the fractional part of*r:*

p = x_{ri}+ r_{f}* (x_{ri+1}- x_{ri})

As a single equation for either case you can say

\[ p = x_{ri} + r_{f} * (x_{ri+1} - x_{ri}) \]since if *ri* = *r* and is an integer then *r _{f}* does not exist or

*r*= 0 and the equation reduces to

_{f}CalculatorSoup uses the formula for percentiles in the Percentile Calculator.

## Quartiles Formula

Quartiles are used to divide data sets into four equal groups of data points. The median is the second quartile Q_{2}. It divides an ordered data set into upper and lower halves. The first quartile Q_{1} is the median of the lower half not including Q_{2}. The third quartile Q_{3} is the median of the upper half not including Q_{2}. There are also other
methods for calculating the quartiles.

CalculatorSoup uses the formula for quartiles in the Quartile Calculator, Descriptive Statistics Calculator.

## Interquartile Range Formula

The range from Q_{1} to Q_{3} is the interquartile range IQR.

CalculatorSoup uses the formula for interquartile range in the Quartile Calculator, Descriptive Statistics Calculator.

## Outliers Formula

Outliers are values that lie above the upper fence or below the lower fence of a sample set. The outliers formulas are used to find potential outliers within a sample data set.

\[ \text{Upper Fence} = Q_3 + 1.5 \times IQR \] \[ \text{Lower Fence} = Q_1 - 1.5 \times IQR \]CalculatorSoup uses the formula for outliers in the Descriptive Statistics Calculator.

## Sum of Squares Formula

Sum of squares is the sum of the squared differences between data values and the mean.

Population

\[ SS = \sum_{i=1}^{n}(x_i - \mu)^{2} \]Sample

\[ SS = \sum_{i=1}^{n}(x_i - \overline{x})^{2} \]CalculatorSoup uses the formula for sum of squares in these calculators: Descriptive Statistics Calculator, Standard Deviation Calculator, Stem and Leaf Plot Generator, Variance Calculator.

## Standard Deviation Formula

Standard deviation is a measure of the dispersion of data points from the mean of a data set.

A lower standard deviation means the data points are distributed close to the mean. A higher standard deviation means the data points are spread out over a greater range.

Population

\[ \sigma = \sqrt{\dfrac{\sum_{i=1}^{n}(x_i - \mu)^{2}}{n}} \]Sample

\[ s = \sqrt{\dfrac{\sum_{i=1}^{n}(x_i - \overline{x})^{2}}{n - 1}} \]CalculatorSoup uses the formula for standard deviation in these calculators: Descriptive Statistics Calculator, Standard Deviation Calculator, Stem and Leaf Plot Generator, Variance Calculator.

## Variance Formula

Variance in statistics is a measure of dispersion of data points from the mean. Variance is calculated as the sum of squared deviations of each data point from the mean, divided by the size of the data set.

Population

\[ \sigma^{2} = \dfrac{\sum_{i=1}^{n}(x_i - \mu)^{2}}{n} \]Sample

\[ s^{2} = \dfrac{\sum_{i=1}^{n}(x_i - \overline{x})^{2}}{n - 1} \]CalculatorSoup uses the formula for variance in these calculators: Descriptive Statistics Calculator, Standard Deviation Calculator, Stem and Leaf Plot Generator, Variance Calculator.

## Relative Standard Deviation Formula (expressed as a percentage)

Relative standard deviation is 100 times the standard deviation divided by the mean. The result is a percentage.

Population

\[ RSD = \left[ \dfrac{100 \times \sigma}{\mu} \right] \% \]Sample

\[ RSD = \left[ \dfrac{100 \times s}{\overline{x}} \right] \% \]CalculatorSoup uses the formula for relative standard deviation in the Descriptive Statistics Calculator.

## Z-Score Formula

A z-score is a measure of how many standard deviations a data value is above or below the mean of a data set.

When calculating the z-score of a single data point x

\[ z = \dfrac{x - \mu}{\sigma} \]When calculating the z-score of the average of a sample data set

\[ z = \dfrac{\overline{x} - \mu}{\dfrac{\sigma}{\sqrt{n}}} \]CalculatorSoup uses the formula for Z score in the Z-Score Calculator.

## Mean Deviation Formula (Mean Absolute Deviation MAD)

The mean deviation is the sum of the absolute values of the differences between data values and the mean, divided by the sample size.

Population

\[ MAD = \dfrac{\sum_{i=1}^{n}|x_i - \mu|}{n} \]Sample

\[ MAD = \dfrac{\sum_{i=1}^{n}|x_i - \overline{x}|}{n} \]CalculatorSoup uses the formula for mean absolute deviation in the Descriptive Statistics Calculator.

## Root Mean Square (RMS) Formula

The root mean square is the square root of the sum of the squared data values divided by n.

\[ RMS = \sqrt{\dfrac{\sum_{i=1}^{n}x_i^{2}}{n}} \]CalculatorSoup uses the formula for root mean square in the Descriptive Statistics Calculator.

## Standard Error of the Mean Formula

Standard error of the mean is the standard deviation divided by the square root of the population or sample size size n.

Population

\[ {SE}_{\mu} = \dfrac{\sigma}{\sqrt{n}} \]Sample

\[ {SE}_{\overline{x}} = \dfrac{s}{\sqrt{n}} \]CalculatorSoup uses the formula for standard error of the mean in the Descriptive Statistics Calculator.

## Coefficient of Variation Formula

The coefficient of variation is the standard deviation divided by the mean.

Population

\[ CV = \dfrac{\sigma}{\mu} \]Sample

\[ CV = \dfrac{s}{\overline{x}} \]CalculatorSoup uses the formula for coefficient of variation in the Descriptive Statistics Calculator.

## Skewness Formula

Population

\[ \gamma_{1} = \dfrac{\sum_{i=1}^{n}(x_i - \mu)^{3}}{n\sigma^{3}} \]Sample

\[ \gamma_{1} = \dfrac{n}{(n-1)(n-2)} \sum_{i=1}^{n} \left(\dfrac{x_i - \overline{x}}{s}\right)^{3} \]CalculatorSoup uses the formula for skewness in the Descriptive Statistics Calculator.

## Kurtosis Formula

Population

\[ \beta_{2} = \dfrac{\sum_{i=1}^{n}(x_i - \mu)^{4}}{n\sigma^{4}} \]Sample

\[ \beta_{2} = \dfrac{n(n+1)}{(n-1)(n-2)(n-3)} \sum_{i=1}^{n} \left(\dfrac{x_i - \overline{x}}{s}\right)^{4} \]CalculatorSoup uses the formula for kurtosis in the Descriptive Statistics Calculator.

## Kurtosis Excess Formula

Population

\[ \alpha_{4} = \dfrac{\sum_{i=1}^{n}(x_i - \mu)^{4}}{n\sigma^{4}} - 3 \]Sample (MS Excel and Google Sheets Kurtosis)

\[ \alpha_{4} = \dfrac{n(n+1)}{(n-1)(n-2)(n-3)} \sum_{i=1}^{n} \left(\dfrac{x_i - \overline{x}}{s}\right)^{4} - \dfrac{3(n-1)^{2}}{(n-2)(n-3)} \]CalculatorSoup uses the formula for kurtosis excess in the Descriptive Statistics Calculator. The Kurtosis Excess Formula for a sample set of data is equivalent to the formula used for Kurtosis in both Microsoft Excel and Google Sheets.

**Cite this content, page or calculator as:**

Furey, Edward "Statistics Formulas"; CalculatorSoup,
*https://www.calculatorsoup.com* - Online Calculators