variance

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
variance(<numbersList>)
Synonymssampvariance
Summary

Returns the sample variance of a list of numbers.

Introduced6.1
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
numbersList

A comma-separated list of numbers, or an expression that evaluates to such a list, or an array containing only numbers.

Example
variance(8,10,12) -- returns 4
put variance(studentScores) into field "Sample Variance"
Values
NameTypeDescription
return

The variance function returns a number.

RelatedControl Structure: function
Glossary: return, math operation
Function: populationVariance, averageDeviation, variance, average, median, populationStandardDeviation, sum, standardDeviation
Description

Use the variance function to analyze the amount of spread in a list of numbers.

The variance function was added in version 6.1 to complement the standardDeviation function. The variance is a measure of how widely distributed the numbers in the numbersList are.

If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.

Tagsmath