takes either a sample or a sample and a precalculated mean.
returns the sum of the squares of the difference between each observation and the sample mean.
(defn sum-of-square-devs-from-mean "takes either a sample or a sample and a precalculated mean. returns the sum of the squares of the difference between each observation and the sample mean." ([x] (sum-of-square-devs-from-mean x (mean x))) ([x m] (apply + (square-devs-from-mean x m))))
Comments top
No comments for sum-of-square-devs-from-mean. Log in to add a comment.