• (cond-prob pred dist)
Returns the conditional probability for the values in dist that satisfy
the predicate pred.

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 clojure/contrib/probabilities/finite_distributions.clj:160 top

(with-monad cond-dist-m
  (defn cond-prob
    "Returns the conditional probability for the values in dist that satisfy
     the predicate pred."
    [pred dist]
    (normalize-cond
      (domonad
        [v dist
	 :when (pred v)]
	v))))
Vars in clojure.contrib.probabilities.finite-distributions/cond-prob: defn
Used in 0 other vars

Comments top

No comments for cond-prob. Log in to add a comment.