
# Variance

Compute the variance of the data, i.e. the mean distance to the mean.

For given data $f\in\M^N$ let $\hat f$ denote the Riemannian center of mass. Then the variance is given by

Note that $n$ is the dimension of the manifold $\M$.

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
% var(f) computes the empirical variance
%       1/(numel(f)-1) * sum (f-mean(f))^2
% of f
% INPUT
% f      : manifold valued Set
% OUTPUT
% v      : variance of the set (scalar)
% mean_f : mean value of the set
%
% ---
% Manifold-valued Image Restoration Toolbox 1.2
% J. Persch, R. bergmann, 2017-01-06