Variance Calculations: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 28: Line 28:
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:Variance Calculations - Time.png|1000px]]
[[File:Variance Calculations - Time.png|1000px]]


== Space Complexity graph ==  
== Space Complexity Graph ==  


[[File:Variance Calculations - Space.png|1000px]]
[[File:Variance Calculations - Space.png|1000px]]


== Pareto Decades graph ==  
== Pareto Frontier Improvements Graph ==  


[[File:Variance Calculations - Pareto Frontier.png|1000px]]
[[File:Variance Calculations - Pareto Frontier.png|1000px]]

Revision as of 13:04, 15 February 2023

Description

Given a set of n (real/integer) numbers, compute the variance (sample or population). Of interest is streaming algorithms and numerical stability.

Parameters

n: number of values

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Naïve algorithm 1940 $O(n)$ $O({1})$ auxiliary Exact Deterministic
Two-pass algorithm 1940 $O(n)$ $O({1})$ auxiliary Exact Deterministic
Welford's Online algorithm 1962 $O(n)$ $O({1})$ auxiliary Exact Deterministic Time
Weighted incremental algorithm 1979 $O(n)$ $O({1})$ auxiliary Exact Deterministic Time
Chan's algorithm Parallel Implementation 1979 $O(log n)$ $O({1})$ per processor Exact Parallel Time

Time Complexity Graph

Variance Calculations - Time.png

Space Complexity Graph

Variance Calculations - Space.png

Pareto Frontier Improvements Graph

Variance Calculations - Pareto Frontier.png