1.2.3-SNAPSHOT Arrow_down_16x16

censored-mean-two-sided

incanter.censored

  • (censored-mean-two-sided a b mu sigma)
Returns the mean of a normal distribution (with mean mu and standard
deviation sigma) with the lower tail censored at 'a' and 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:21 top

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

Comments top

No comments for censored-mean-two-sided. Log in to add a comment.