apoc.coll.stdev
Syntax |
|
||
Description |
Returns sample or population standard deviation with |
||
Arguments |
Name |
Type |
Description |
|
|
A list to collect the standard deviation from. |
|
|
|
Will perform a sample standard deviation if |
|
Returns |
|
Usage examples
The following examples compute the standard deviation of values in a list using both APOC and Cypher:
apoc.coll.stdev
WITH [1,2,3,4,5] AS list
RETURN apoc.coll.stdev(list) AS output
Using Cypher’s UNWIND and stDev()
UNWIND [1,2,3,4,5] AS x
RETURN stDev(x) AS output
output |
---|
1.5811388300841898 |
The following examples compute the standard deviation of values over an entire population in a list using both APOC and Cypher:
apoc.coll.stdev
WITH [1,2,3,4,5] AS list
RETURN apoc.coll.stdev(list, false) AS output
Using Cypher’s UNWIND and stDevP()
UNWIND [1,2,3,4,5] AS x
RETURN stDevP(x) AS output
output |
---|
1.4142135623730951 |