Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

stddev()

Returns the standard deviation of the values in a field. Accepts measure fields (but not expressions) as input.

Example - Look at Variability in Amount

Use stddev() to get a feel for the amount of spread, or dispersion, in the size of your deals.

1q = load "DTCOpps";
2q = group q by all;
3q = foreach q generate stddev('Amount') as 'stddev_Amount';

Should I Use stddev() or stddevp()?

Use stddev() when the values in your field are a partial sample of the entire set of values (that is, a partial sampling of the whole population). Use stddevp() when your field contains the complete set of values (that is, the entire population of values).