Click or drag to resize
sqx

ROBVAR Structure

Aggregate [float] ROBVAR([float] X, [float] MeanX, [bit] Population)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
[SerializableAttribute]
public struct ROBVAR
Remarks
Robuste Variance aggregate funtion.

NOTE: All parameters except X must remain constant within the GROUP BY.

Attributes

Format.Native, IsInvariantToDuplicates = false, IsInvariantToNulls = true, IsInvariantToOrder = true, IsNullIfEmpty = true
Examples
SQL
declare @Va sqx.Vector = sqx.RandomVector(10,1)
;with sample_data as (
select a.ID, a.Value X
from sqx.VectorTable(@Va) a
)
select sqx.ROBVAR(X,MX,1) VarianceP, VARP(X) VARP
, sqx.ROBVAR(X,MX,0) Variance, VAR(X) VAR
from (select sqx.MEAN(X) MX from sample_data) m
cross apply sample_data
/*
VarianceP            VARP                 Variance             VAR
-------------------- -------------------- -------------------- ------------------
0.0709172334310987   0.0709172334310986   0.0787969260345541   0.078796926034554*/
See Also