Skip to content

Instantly share code, notes, and snippets.

@w01fe
Created September 28, 2012 23:27
Show Gist options
  • Save w01fe/3802590 to your computer and use it in GitHub Desktop.
Save w01fe/3802590 to your computer and use it in GitHub Desktop.
Univariate stats as Graph: first attempt
(def almost-stats-graph
{:n (fn [xs] (count xs))
:m (fn [xs n] (/ (sum identity xs) n))
:m2 (fn [xs n] (/ (sum #(* % %) xs) n))
:v (fn [m m2] (- m2 (* m m)))})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment