SStDev (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 2 minute read
- PI System
- PI Server 2023
- PI Server
Return the sample standard deviation for two or more arguments that are a sample of a larger population. The standard deviation of a sample x1...xn is equal to
Where
is the sample mean; that is,
Syntax
SStDev(x1, x2, ..., xn)
Arguments
x1...xn
May be numbers or time expressions, but all must be the same.
Returns
The sample standard deviation of the arguments. If the arguments are numbers, the result is a number; if they are times or time periods, the result is a time period (number of seconds).
Exceptions
Arguments whose run-time values are digital states are ignored. If there are not at least two numeric values, SStDev returns a zero.
Notes
In the rare case where you have the entire population, rather than a sample, you might use the function PstDev, rather than SStDev.
Example
SStDev('tag1', 'tag2', TagVal('tag1', 'y'))
SStDev('y', 't', '14-Dec-97')
SStDev(1, 2, 1.1)