1.2.3-SNAPSHOT Arrow_down_16x16

censored-variance-upper

incanter.censored

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

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:94 top

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

Comments top

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