Running variance
Closed this issue · 2 comments
After speaking with @maxentile it seems like it'd be a good idea if we also implement a running variance for the observable classes. It's actually pretty tricky but John Cook describes a clever algorithm:
running variance for the observable classes. It's actually pretty tricky but John Cook describes a clever algorithm:
Another approach would be to save all of the du/dlambda samples collected at each lambda window (storing a matrix of shape (n_lambda_windows, n_samples_per_window)
).
Later analysis steps could then read off mean(du/dlambda), variance(du/dlambda), autocorrelation(du/dlambda), and other quantities as needed.
Motivation: in order to compute an estimate of the overall variance in DeltaF, we want to be able to compute variance(du/dlambda) at each lambda window. For example, the alchemistry wiki includes this (approximate?) expression for the statistical error of a TI simulation: