stdev

Synopsis

double avg(NodeSet)
double avg(TupleSet, col)

Description

In its first form, stdev computes the standard deviation of all numbers in a given set, and returns it as a double. Only numbers or strings that can be interpreted as numbers are counted; strings that cannot be parsed as a number are treated as having the value zero.

The second form of is command allows it to be applied to one column of an edge set or a tuple set. In this case, the first parameter specifies the data to work on, and the second parameter specifies the number of the column of interest (the numbering is zero-based).

Example

>> ints = {1,2,3,4}
>> stdev(ints)
1.118033988749895