1.2.3-SNAPSHOT Arrow_down_16x16

censored-variance-lower

incanter.censored

  • (censored-variance-lower a mu sigma)
Returns the variance of a normal distribution (with mean mu and standard
deviation sigma) with the lower tail censored at 'a'

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/censored.clj:67 top

(defn censored-variance-lower
" Returns the variance of a normal distribution (with mean mu and standard
  deviation sigma) with the lower tail censored at 'a'
"
  ([a mu sigma]
   (let [a-std (psi a mu sigma)
         cdf-a (cdf-normal a-std)
         sigma-sq (* sigma sigma)
         Ey (censored-mean-lower a mu sigma)]
     (+ (* cdf-a (* a a))
        (* (- 1 cdf-a)
           (+ sigma-sq (* mu mu) (* 2 mu sigma (lambda-lower a-std))))
        (* sigma-sq a-std (pdf-normal a-std))
        (- (* Ey Ey))))))
Vars in incanter.censored/censored-variance-lower: * + - defn let
Used in 0 other vars

Comments top

No comments for censored-variance-lower. Log in to add a comment.