Covar_Samp





This function calculates the sample variance of a set of numbers after discarding NULL values from this set. It uses the following formula: (Sum(Y * X) - Sum(Y) * Sum(X)/n)/(n-1), where n stands for the number of pairs (Y, X) where neither Y nor X is NULL.

Syntax:

Covar_Samp(Y, X)

Parameters:

  • Y. Type: Number.
  • X. Type: Number.

Example:

X

Y

1

7

2

1

3

2

4

5

5

7

6

34

7

32

8

43

9

87

SELECT Covar_Samp(Y, X) FROM Table

Result:

66.875


Comments
0
Add comment