NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Compute running sample mean and sample variance in a single pass using Welfords algorithm.
Implement streaming_moving_variance(stream): for each incoming float, maintain running count n, mean, and sum of squared differences M2 via Welfords algorithm. Sample variance is M2 / (n - 1) for n >= 2 (and 0.0 for n <= 1). Return list of dicts with "count", "mean", and "variance", rounded to 4 decimal places.
streaming_moving_variance(stream: list[float]) -> list[dict]