All formulas

Statistics and uncertainty

Standard deviation - formula in LaTeX

A measure of how far the results scatter around the mean. Dividing by n − 1 rather than n is the correction used when you have a sample, not the whole population. The root stretches over the whole expression by itself, as long as it sits inside \sqrt{...}.

s=1n−1∑i=1n(xi−xˉ)2s = \sqrt{\dfrac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2}

LaTeX code

$$
s = \sqrt{\dfrac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2}
$$

Working this out from your own measurements? The calculator gives the result with its uncertainty and ready LaTeX, no account needed. Type A, type B and expanded uncertainty calculator

What the symbols mean

ss
standard deviation of a single measurement
nn
number of measurements
xix_i
result of the i-th measurement
xˉ\bar{x}
arithmetic mean

Worked example

Three readings: 1, 3 and 5, with a mean of 3. The squared deviations add up to 8, divided by n − 1 = 2. The fraction under the root uses \dfrac so it does not shrink to subscript size.

s=(1−3)2+(3−3)2+(5−3)23−1=82=2s = \sqrt{\dfrac{(1-3)^2 + (3-3)^2 + (5-3)^2}{3-1}} = \sqrt{\dfrac{8}{2}} = 2

Result: s = 2

Try it with your own values

Edit the code and the preview updates as you type.

s=(1−3)2+(3−3)2+(5−3)23−1=82=2s = \sqrt{\dfrac{(1-3)^2 + (3-3)^2 + (5-3)^2}{3-1}} = \sqrt{\dfrac{8}{2}} = 2

Common mistakes

Other ways to write it

LaTeX commands in this formula

\sqrt
square root
\dfrac
fraction (display)
\sum
sum
x_{0}
subscript; wrap several characters in braces
x^{2}
superscript (power); wrap several characters in braces
\bar
bar over a symbol (e.g. a mean)

How to use this formula in LaTeX?

  1. Copy the code with the button above: $$…$$ is centered display math in the CamteX editor and in Markdown; in a .tex file use \[…\].
  2. Paste it into the CamteX editor, Overleaf or any LaTeX document.
  3. Inside a sentence, use single $…$ instead of double.
  4. The formula needs the amsmath package - CamteX templates include it in the preamble.

Related formulas - Statistics and uncertainty

Drawing formulas is faster than typing them.

Draw a formula, table or chart - CamteX AI turns it into ready LaTeX and inserts it into your document.

Try it free