[TOC]

var

Variance

Introduction

For a given vector , let be the mean of all elements in . Then, the variance can be computed by one of the following formulas:

If contains NaN, the variance will be NaN.

Usages

v = var(A)

s = var(A, w)

s = var(A, w, k)