datascience.tables.Table
Table.
var
Finds variance of distribution
Variance
Examples
>>> dist = Table().values([1, 2, 4]).probability([0.5, 0.4, 0.1]) >>> dist.var() 0.81 >>> (1 * 0.5 + 4 * 0.4 + 16 * 0.1) - (1.7) ** 2 0.81