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.
q = load "DTCOpps";
q = group q by all;
q = 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).