Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Event Modeler | Using Standard Blocks | General analytic blocks | Statistics Calculator v1.0

Statistics Calculator v1.0
The Statistics Calculator block calculates running statistics from a set of samples. Like the correlation block, the set of samples may be unlimited in size, or constrained by a maximum number of samples or a maximum age of samples. The Statistics Calculator block performs a subset of the processing performed by the Data Distribution Calculator block. Consequently, execution of the Statistics Calculator block is considerably faster than execution of the Data Distribution Calculator block.
Parameters
 Parameter Description period The maximum age of any sample that is used in the calculations, in seconds. Any samples older than this will be discarded before performing the calculation. size The maximum number of samples that are used in the calculation. The oldest sample is replaced by the newest sample when the total number of samples has reached this limit.
One or both of the above parameters must be 0, in which case that limit is not imposed. It is not possible to restrict the number of samples by both age and number of samples, but it is possible to not impose any limit on the number of samples (thus an infinite set of samples is kept).
Operations
 Operation Description start Starts the calculation of statistics. Must be called before the calculator will generate any statistics. stop Stops the calculation of further statistics. Any subsequent input feeds are ignored. clear Discards all current data.
Input feeds
 Feed Fields Description data value The feed of values. The time of a value is taken to be the correlator's current time.
Output feeds
 Feed Fields Description statistics value The most recent value received on the input feed. mean The arithmetic mean of the data set. standard deviation Standard deviation of the data set. variance Variance of the data set. skew Degree of skewed-ness of the data set. kurtosis Kurtosis measure of the data set. samples The number of samples used for this calculation.