Statistics
ShippingstatisticsReduce signal to six scalar measures: mean, std, min, max, rms, median
Signature
Inputs
signalSignalrequired
Outputs
meanScalarstdScalarminScalarmaxScalarrmsScalarmedianScalar
Description
Statistics collapses an entire input signal into six scalar summary measures, emitted on independent output ports: mean, std, min, max, rms, and median. It is a pure reduction over all samples currently present on the input, computing each statistic in a single pass (with median requiring an internal sort). Every output is a Scalar, not a signal.
The node is stateless: outputs depend only on the current input buffer, with no running accumulator carried across evaluations. Feeding it a windowed or framed stream therefore yields per-frame statistics; feeding it a complete captured buffer yields whole-record statistics.
All six measures inherit the physical unit of the input samples: mean, std, min, max, rms, and median of a quantity in volts are themselves in volts (variance-like quantities are square-rooted back to the base unit, so the unit is preserved rather than squared). Uncertainty () propagates into mean — averaging independent samples reduces the standard error by — while order statistics (min, max, median) carry the of the selected sample.
Note that std uses the sample standard deviation and is a population/sample dispersion measure, distinct from the input's per-sample measurement uncertainty ; the two describe different things and should not be conflated.
Mathematics
Examples
Characterizing a noisy sensor buffer
Wire a captured accelerometer channel (unit ) into signal. The node reports mean (DC offset / bias), std (dispersion), rms (total signal power including DC), and min/max (peak excursions). Because , comparing rms against mean reveals how much energy is AC versus DC.
Robust vs. mean level
For a signal with occasional spikes, read both mean and median from the same node. A large gap mean - median flags skew or outliers, since the median is insensitive to a few extreme samples while the mean is dragged toward them.
signal -> statistics.mean -> sink # outlier-sensitive
signal -> statistics.median -> sink # robust centerApplications
- Signal quality metrics in test benches: extracting DC bias (mean), noise floor (std), and crest information (max/rms) from a captured waveform.
- RMS-based power and amplitude measurement for AC electrical signals, vibration, and acoustics.
- Automated pass/fail limit checking, feeding min/max/mean scalars into a comparator against specification thresholds.
- Outlier and skew detection by comparing the robust median against the mean of the same buffer.
Neat
The identity $x_{\mathrm{rms}}^2 = \bar{x}^2 + s_{\text{pop}}^2$ ties the three moment-based outputs together: RMS is the quadrature sum of the DC (mean) and AC (population std) components, so any two determine the third.
Because every output is a Scalar rather than a signal, the node acts as a bridge from the streaming/time domain into scalar dashboards, comparators, and limit logic without a separate sampler.
Known issues
`std` uses the $N-1$ (sample) denominator and is therefore undefined for a single-sample input; with $N=1$ the dispersion collapses to zero or NaN depending on the buffer.
For an even number of samples the `median` is the average of the two central order statistics, which for integer-valued or bimodal data can produce a value that never occurs in the input.