Free lesson · Math & notation
Read sums, indices, averages and squared deviations
Open interactive lessonPractice calculationsExplore labs
Start with the idea
Expand a compact sum into a short list before generalising. The notation saves space, but every term still describes an ordinary arithmetic operation.
Symbols, units & horizon
- xᵢ: observation i in the chosen units
- n: count of observations, at least 2 for sample variance
- x̄: arithmetic sample average
- Σ with limits: sum over the specified indices
- s²: sample variance in squared units
- s: sample standard deviation in the units of x
When and why to use this
Use this when hand-checking statistics computed by a spreadsheet or a Python function.
The summation symbol Σ means “add these terms.” The index i tells you which observation to use; the lower and upper limits tell you where to start and stop. A bar above x means its arithmetic average. The notation xᵢ is the i-th value; it does not mean x raised to i.
Expand the mean and variance sums
- For n=3, . Divide by 3 to obtain the mean.
- For x=(1,2,3), mean=2. The variance numerator expands to . Divide by n−1=2.
Sample variance=1; sample SD=√1=1 in the units of x.
Subtracting the mean centres observations. Squaring makes negative and positive deviations contribute positively. Variance has squared units; taking its square root gives standard deviation in the original units. The sample variance uses n−1 when estimating a population variance under the usual assumptions.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
from statistics import mean, variance, stdev
def sample_summary(values):
if len(values) < 2:
raise ValueError("At least two observations required")
return mean(values), variance(values), stdev(values)
print(sample_summary([1, 2, 3]))Continue learning
Math & Notation Essentials — all lessons- Start with numbers, variables and an equals sign
- Percentages, basis points and units
- Rearrange an equation without changing its meaning
- Powers, square roots, exponentials and logarithms
- Read sums, indices, averages and squared deviations
- Probability, expectation and conditioning
- Vectors, matrices and transpose notation
- Derivatives, integrals and approximations
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations