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