# Mean, variance and standard deviation from ordinary arithmetic

Subject: Deep Learning

Exam: MT2

Reader: https://deep-learning-study-room.vercel.app/#mt2/read/3/mt2-c3-s10

Canonical: https://deep-learning-study-room.vercel.app/read/dl/mt2/section/mt2-c3-s10/

**Definition.** The arithmetic mean measures the centre of a numerical dataset. Variance measures the average squared deviation from that mean, and standard deviation expresses dispersion in the original units.



$$
\mu=\frac{1}{N}\sum_{i=1}^{N}x_i,\qquad \sigma^2=\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2,\qquad \sigma=\sqrt{\sigma^2}
$$



These are population formulas, or empirical moments treating the supplied dataset as the complete reference set. An unbiased sample-variance estimate instead divides the squared-deviation sum by N−1. Use the convention specified by the question; the two denominators are not interchangeable.

**Question. Find the population mean, variance and standard deviation of [3, 3, 7, 7].**

### Given

Observations = [3,3,7,7]; N = 4.

Use population variance (divide by N).

### To find

Find the population mean μ, variance σ² and standard deviation σ.

### Formula — which one and why

**Mean and spread.** The mean is the sum divided by the number of values. Population variance averages squared distances from that mean; standard deviation is its square root.

N = number of values; xᵢ = value i; μ = mean; σ² = variance; σ = standard deviation. Σ means add the indicated terms.



$$
\mu=\frac{1}{N}\sum_{i=1}^{N}x_i
$$





$$
\sigma^2=\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2
$$





$$
\sigma=\sqrt{\sigma^2}
$$



**Yaad rakhne ka cue:** Mean = sabka total ÷ count; variance = squared distances ka mean.

### Solution — step by step

**Step 1: add all four observations.**



$$
3+3+7+7=20
$$



**Step 2: divide by the count to obtain the mean.**



$$
\mu=\frac{20}{4}=5
$$



**Step 3: subtract the mean from each observation.**



$$
[3-5,3-5,7-5,7-5]=[-2,-2,2,2]
$$



**Step 4: square each deviation.**



$$
[(-2)^2,(-2)^2,2^2,2^2]=[4,4,4,4]
$$



**Step 5: add the squared deviations.**



$$
4+4+4+4=16
$$



**Step 6: divide by four for population variance.**



$$
\sigma^2=\frac{16}{4}=4
$$



**Step 7: take the nonnegative square root.**



$$
\sigma=\sqrt4=2
$$



**Answer:** mean = 5, population variance = 4 and population standard deviation = 2. Variance has squared units; standard deviation has the same units as the observations. With the sample convention, the variance would instead be 16/3.
