PStDev (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 2 minute read
- PI System
- PI Server 2023
- PI Server
Returns the population standard deviation for a population of two or more values.
Syntax
PStDev(x1, x2, ..., xn)
Arguments
x1...xn
May be numbers or time expressions, but all must be the same.
Returns
The population standard deviation for the arguments. For numerical arguments the result is a number. For arguments that are time expressions (absolute times or time periods), the result is a number indicating a time period expressed in seconds.
The population standard deviation of a population x1...xn is
where
is the mean of the arguments; that is,
Exceptions
Arguments whose run-time values are digital states are ignored. If all values are digital states, an error value is returned.
Notes
PStDev uses every value in a population to calculate the population standard deviation. However, it is common, especially for a large population, to estimate standard deviation from a sample of the population. SStDev uses a set of sample values to calculate sample standard deviation, which approximates the population standard deviation.
Example
PStDev('att1', 'att2')
PStDev('*','14-Dec-97', 'y')
PStDev('*'-'y','14-Dec-97'-'*', '-1h')