Calculate variance without calculating the mean Can we calculate the variance without using the mean as the 'base' point? 
 A: There is already a solution for this question on Math.stackexchange:
I summarize the answers:


*

*You can use that the variance is $\overline{x^2} - \overline {x}^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.





*How about sum of squared pairwise differences ? Indeed, you can check by direct computation that


$$
2v_X = \frac{1}{n(n-1)}\sum_{1 \le i < j \le n}(x_i  - x_j)^2.
$$



*The sample variance without mean is calculated as:
$$ v_{X}=\frac{1}{n-1}\left [ \sum_{i=1}^{n}x_{i}^{2}-\frac{1}{n}\left ( \sum_{i=1}^{n}x_{i} \right ) ^{2}\right ] $$
A: The median absolute deviation is defined as 
$$\text{MAD}(X) = \text{median} |X-\text{median}(X)|$$
and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
$$\underbrace{\Bbb P(|X-0|<1)}_\text{0 is the median}=\arctan(1)/\pi-\arctan(-1)/\pi=\frac{1}{2}$$
