varSamp
varSamp
Introduced in: v1.1
Calculate the sample variance of a data set.
The sample variance is calculated using the formula:
ここで:
- はデータセット内の各データポイント
- はデータセットの算術平均
- はデータセット内のデータポイント数
この関数は、入力データセットがより大きな母集団からの標本であることを前提としています。母集団全体の分散を計算する場合(完全なデータセットがある場合)は、代わりにvarPopを使用してください。
注記
This function uses a numerically unstable algorithm. If you need numerical stability in calculations, use the varSampStable function. It works slower but provides a lower computational error.
Syntax
Aliases: VAR_SAMP
Arguments
x— The population for which you want to calculate the sample variance.(U)Int*orFloat*orDecimal*
Returned value
Returns the sample variance of the input data set x. Float64
Examples
Computing sample variance