Standard Deviation

apama.analyticskit.blocks.core.StandardDeviation

Calculates the standard deviation and variance of the values over time.

This block is suitable for continuous values, even if they are irregularly sampled. The time between inputs or samples is significant, while the number of samples is not. Use this block, for example, if the input is a physical property, such as temperature, that is sampled either regularly or irregularly (for example, only generating measurement values on a change in temperature). Use the Discrete Statistics block instead of the Standard Deviation block for independent measurements, such as ticket sales, where the number of measurements is significant, but the time between measurements is not.

Standard deviation is a measure that is used to quantify the amount of variation or dispersion of a set of data values. A low standard deviation indicates that the data points tend to be close to the mean of the set, while a high standard deviation indicates that the data points are spread out over a wider range of values.

The block can operate over a time-bounded window that is specified with the Window Duration parameter. If this parameter is not specified, the block uses an unbounded window. The Reset input port clears the window contents. The Sample input port can be used to force re-evaluation and generate the latest value. Output is generated on any new input or, if the Window Duration parameter is set, output is generated periodically on every new bucket that is added to the window.

If a window is configured, the block uses a set of 20 buckets, so the time of expired values is an approximation to the nearest bucket interval.

Note: The Standard Deviation block generates the standard deviation and variance for an individual device. If the input comes from a device group, these values are generated separately for each device in that group. To calculate and generate aggregate values for the group as a whole (not for individual devices), use the Group Statistics block.

Parameters

Name | Description | Type | Notes |

Window Duration (secs) | If present, the amount of time (in seconds) for which values are to be kept in the window. This must be a finite and positive number. | float | Optional |

Input Port Details

Name | Description | Type |

Value | Input for which the standard deviation and variance is to be calculated. | float |

Reset | Clears the content of the window. | pulse |

Sample | Forces re-evaluation of the current value and sends the output. | pulse |

Output Port Details

Name | Description | Type |

Standard Deviation | The standard deviation of the input values. | float |

Variance | The variance of the input values. | float |