$$stddev
Returns the standard deviation for the values in an array
Usage​
{
"$$stddev": /* Array to calculate standard deviation for */,
"default": 0 /* BigDecimal */,
"by": "##current" /* Transformer(##current) */,
"population": false /* boolean */
}
"$$stddev([default],[by],[population]):{input}"
note
Concrete values in the usage example are default values.
Returns​
number (BigDecimal)
Arguments​
| Argument | Type | Values | Required / Default Value | Description |
|---|---|---|---|---|
| Input | array | Yes | Array to calculate standard deviation for | |
default | BigDecimal | 0 | The default value to use for empty values | |
by | Transformer(##current) | ##current | A transformer to extract a property to get value by (using ##current to refer to the current item)
| |
population | boolean | false/true | false | Whether the input is the entire population or a sample (it will affect the calculation of variance; "n-1" for sample and "N" for population) |
Examples​
Input
Definition
Output
[
1345,
1301,
1368,
1322,
1310,
1370,
1318,
1350,
1303,
1299
]
"$$stddev:$"
27.463915719843496
[
1345,
1301,
1368,
1322,
1310,
1370,
1318,
1350,
1303,
1299
]
"$$stddev:$"
27.463915719843496
[
{
"value": 1345
},
{
"value": 1301
},
{
"value": 1368
},
{
"value": 1322
},
{
"value": 1310
},
{
"value": 1370
},
{
"value": 1318
},
{
"value": 1350
},
{
"value": 1303
},
{
"value": 1299
}
]
{
"$$stddev": "$",
"by": "##current.value"
}
27.463915719843496
[
{
"value": 1345
},
{
"value": 1301
},
{
"value": 1368
},
{
"value": 1322
},
{
"value": 1310
},
{
"value": 1370
},
{
"value": 1318
},
{
"value": 1350
},
{
"value": 1303
},
{
"value": 1299
}
]
{
"$$stddev": "$",
"by": "##current.value",
"population": true
}
26.054558142482478