stdevw
This page explains how to use the stdevw aggregation function in APL.
stdevw calculates the weighted sample standard deviation when each row represents multiple observations. The weight gives the number of observations the row represents.
Usage
Syntax
APL
Parameters
expr: The numeric expression to evaluate.weight: An integer expression representing the frequency weight for each record. Records with a weight less than or equal to0are skipped. Records with anullweight are counted once (weight1).GroupingColumn(optional): A column to group the results by.
Returns
Returns a real value representing the weighted standard deviation of expr across the group. By default, the output column is named stdevw_<expr>.
Use case examples
Weighted standard deviation of latency
This example computes the weighted standard deviation across pre-aggregated request latency buckets.
Query
APL
Output
| stdevw_latency |
|---|
| 9.235481467932196 |