# 22. Virtuoso Functions Guide - VAR_SAMP

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
corr
covar_pop
covar_samp
regr_avgx
regr_avgy
regr_count
regr_intercept
regr_r2
regr_slope
regr_sxx
regr_sxy
regr_syy
stddev
stddev_pop
stddev_samp
var
var_pop
var_samp
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## VAR_SAMP

Returns the sample variance.
numeric VAR_SAMP (in expr any);
Description

VAR_SAMP returns the sample variance of a set of numbers after discarding the nulls in this set. The expr is a numeric expression, and the function returns a value of type NUMERIC. If the function is applied to an empty set, then it returns null. The function makes the following calculation:

    (SUM(expr2) - SUM(expr)2 / COUNT(expr)) / (COUNT(expr) - 1)

This function is similar to VAR, except that given an input set of one element, VAR returns 0 and VAR_SAMP returns null.

Parameters
expr – Number expression.
Return Types

The function returns a value of type NUMERIC. If the function is applied to an empty set, then it returns null.

See Also

VAR()

VAR_SAMP()

VAR_POP()

STDDEV()

STDDEV_SAMP()

STDDEV_POP()

REGR_SYY()

REGR_SXX()

REGR_SXY()

REGR_AVGX()

REGR_AVGY()

REGR_R2()

REGR_COUNT()

REGR_INTERCEPT()

REGR_SLOPE()

COVAR_SAMP()

COVAR_POP()

CORR()