Stddev in sparql query

hi,

currently AVG, SUM functions works fine in sparql queries
with GROUP BY in virtuoso7-opensource.

Is it possible to use STDDEV for standard deviation of set of numbers ?
default it not worked…what could be way to enable it ? please suggest

also need Variance and Volatility aggregate functions ? if they can also be enabled ?

Thanks
nyadav

Usage example via SPARQL:

SELECT sql:STDDEV(?s) where { VALUES ?s {1 10 20 30 40 50 60 }} 

thanks for quick reply… variance also working fine same way…

Is volatility function also there or some workaround possible ?
Only difference from standard deviation will be
divide by n -1…
rest formula same as standard deviation

please suggest

Virtuoso also has STDDEV_SAMP and STDDEV_POP functions do either of these provide the volatility functionality being sought.

Usage example via SPARQL:

SELECT sql:STDDEV_SAMP(?s) where { VALUES ?s {1 10 20 30 40 50 60 }}

SELECT sql:STDDEV_POP(?s) where { VALUES ?s {1 10 20 30 40 50 60 }}

Note the function links above also provide links to other related functions you might want to review as well …

Live Examples using a publicly accessible Virtuoso instance

  1. STDDEV_SAMP
  2. STDDEV_POP

thanks much for quick answers

one observation >

EXCEL :
A
5
20
50
80
90
=STDEV(A1:A5) = 36.81032464
=STDEV.S(A1:A5) = 36.81032464
=STDEV.P(A1:A5) = 32.92415527

VIRTUOSO:
SPARQL SELECT sql:STDDEV(?s) where { VALUES ?s {5 20 50 80 90}}
36.81
SPARQL SELECT sql:STDDEV_SAMP(?s) where { VALUES ?s {5 20 50 80 90}}
36.81032463861192
SPARQL SELECT sql:STDDEV_POP(?s) where { VALUES ?s {5 20 50 80 90}}
32.92415526630866

getting same results as excel, thanks…no further questions