Created
September 28, 2012 23:28
-
-
Save w01fe/3802595 to your computer and use it in GitHub Desktop.
Univariate stats as Graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def stats-graph | |
{:n (fnk [xs] (count xs)) | |
:m (fnk [xs n] (/ (sum identity xs) n)) | |
:m2 (fnk [xs n] (/ (sum #(* % %) xs) n)) | |
:v (fnk [m m2] (- m2 (* m m)))}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment