Referencevariance

<variance>

<variance> is a Math Operator component that renders the variance of a list of enclosed data values according to the equation:

Var(x)=i=1n(xixˉ)2n1\mathbf{Var}(x) = \frac{\sum_{i=1}^n (x_{i} - \bar x)^2}{n-1}

In this equation, xˉ\bar x represents the <mean> of the sample and nn the number of data points. By default, the sample variance is calculated. If instead, the population attribute is specified as “true”, the equation becomes:

Var(x)=i=1n(xixˉ)2n\mathbf{Var}(x) = \frac{\sum_{i=1}^n (x_{i} - \bar x)^2}{n}

Attributes and Properties

Attributes for <variance>
AttributeTypeValues
anchor = "…"point
createIntervals = "…"boolean"true" "false"
createVectors = "…"boolean"true" "false"
displayBlanks = "…"boolean"true" "false"
displayDecimals = "…"integer
displayDigits = "…"integer
displaySmallAsZero = "…"number
draggable = "…"boolean"true" "false"
expand = "…"boolean"true" "false"
forceNumeric = "…"boolean"true" "false"
forceSymbolic = "…"boolean"true" "false"
format = "…"text"text" "latex"
functionSymbols = "…"textList
layer = "…"number
padZeros = "…"boolean"true" "false"
parseScientificNotation = "…"boolean"true" "false"
population = "…"boolean"true" "false"
positionFromAnchor = "…"text"upperright" "upperleft" "lowerright" "lowerleft" "top" "bottom" "left" "right" "center"
referencesAreFunctionSymbols = "…"
renderMode = "…"text
simplify = "…"text"none" "full" "numbers" "numberspreserveorder"
splitSymbols = "…"boolean"true" "false"
unordered = "…"boolean"true" "false"
Props for <variance name="v">
PropertyType
$v.anchorpoint
$v.backgroundColortext
$v.createIntervalsboolean
$v.createVectorsboolean
$v.disabledboolean
$v.displayBlanksboolean
$v.displayDecimalsinteger
$v.displayDigitsinteger
$v.displaySmallAsZeronumber
$v.draggableboolean
$v.expandboolean
$v.fixedboolean
$v.fixLocationboolean
$v.forceNumericboolean
$v.forceSymbolicboolean
$v.formattext
$v.functionSymbolstextList
$v.hiddenboolean
$v.isNumberboolean
$v.isNumericboolean
$v.latexlatex
$v.layernumber
$v.list[ math ]
$v.matrix[ math ]
$v.matrixSizenumberList
$v.numbernumber
$v.numColumnsinteger
$v.numDimensionsinteger
$v.numListItemsinteger
$v.numRowsinteger
$v.padZerosboolean
$v.parseScientificNotationboolean
$v.populationboolean
$v.positionFromAnchortext
$v.renderModetext
$v.simplifytext
$v.splitSymbolsboolean
$v.texttext
$v.textColortext
$v.textStyleDescriptiontext
$v.unorderedboolean
$v.valuevariance
$v.vector[ math ]
$v.xmath
$v.ymath
$v.zmath

Example: <variance> of a nested list of numbers

The <variance> component renders the variance of a list of numbers separated by spaces.


Example: <variance> of a named list

The <variance> component renders the variance of a named <numberList>.


Example: <variance> of a user-input list

Since there is no numberInput component, the <mathInput> is used to store a user’s numerical list. This must then be defined as a <numberList>. The named <numberList> is then referenced by the <variance> component to compute the numerical variance.