My Digital Garden

Mean and Variance

Mean and Variance

Basics

Given n values of x

X={x1,x2,...xn}

Mean of x:

μx=1ni=1nxi

Variance of x:

σx2=1n[i=1n(xiμx)2]

Standard Deviation of x:

σx=1n[i=1n(xiμx)2]

Mean centring

Example

Given this set of values:

Z={1,5,12}μz=6σz2=13(25+1+36)=20.667

Now subtract the mean from each value:

Z={16,56,126}={5,1,6}μz=0σz2=13(25+1+36)=20.667

So mean-centring shifts the data horizontally along \R but doesn't change the variance

Based on course material by Paul Bendich and Daniel Egger from Data Science Maths Skills