Data Structures and Algorithms


Kalman Folding 1.5: Running Statistics

Authors: Brian Beckman

This paper fills in some blanks left between part 1 of this series, Kalman Folding (, and the rest of the papers in the series. In part 1, we present basic Kalman filtering as a functional fold, highlighting the advantages of this form for hardening code in a test environment. In that paper, we motivated the Kalman filter as a natural extension of the running average and variance, writing both as functional folds computed in constant memory. We expressed the running statistics as recurrence relations, where the new statistic is the old statistic plus a correction. We write the correction as a gain factor times some transform of a residual. The residual is the difference between the current (old) statistic and the incoming (new) observation. In both expressions, for brevity, we left derivations to the reader. Here, we present those derivations in full “school-level” detail, along with some basic explanation of the programming language that mechanizes the computations.

Comments: 7 Pages.

Download: PDF

Submission history

[v1] 2016-09-03 16:15:57

Unique-IP document downloads: 374 times is a pre-print repository rather than a journal. Articles hosted may not yet have been verified by peer-review and should be treated as preliminary. In particular, anything that appears to include financial or legal advice or proposed medical treatments should be treated with due caution. will not be responsible for any consequences of actions that result from any form of use of any documents on this website.

Add your own feedback and questions here:
You are equally welcome to be positive or negative about any paper but please be polite. If you are being critical you must mention at least one specific error, otherwise your comment will be deleted as unhelpful.

comments powered by Disqus