For a project I needed to visualize different probability density functions and the CDFs.
I used following code to calculate the y-values:
(defn generate-destribution-data-points [df-fn start end steps]
(map #(vector %1 (df-fn %1)) (range start end steps)))
The result of these calculation is a collection of 2D vectors, where the first entry is the x-value and the second the y-value.
If I want, for example, to create the datapoints for a beta distribution with alpha = 5 and beta = 1, I used following call:
(generate-destribution-data-points #(cdf-beta %1 :alpha 5 :beta 1) 0 1 0.01)
I wonder now, if I had done a mistake, which results in the different CDF chart or if there is a bug in the calculation of the beta-CDF in Incanter.
If it helps, here are the dependencies I have in my project:
{:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.memoize "0.5.8"]
[org.clojure/clojurescript "0.0-3211"]
;; Data Dependencies
[clj-pdf "2.0.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/data.csv "0.1.2"]
[clojure-csv/clojure-csv "2.0.1"]
[clj-time "0.13.0"]
;; Math dependencies
[org.clojure/math.numeric-tower "0.0.4"]
[org.clojure/data.priority-map "0.0.5"]
[org.clojure/math.combinatorics "0.1.1"]
[incanter/incanter-core "1.9.1"]
[incanter/incanter-charts "1.9.1"]
;; Chart dependencies
[quil "2.3.0"]
[com.google.code.gson/gson "2.5"]
[net.sourceforge.htmlunit/htmlunit "2.19"]
[cheshire "5.3.1"]
[junit/junit "4.12"]
;; DB dependencies
[com.novemberain/monger "3.1.0"]
[korma "0.4.2"]
[org.clojure/java.jdbc "0.3.7"]
[org.postgresql/postgresql "9.3-1100-jdbc41"]
[com.google.guava/guava "19.0"]
[org.clojure/tools.logging "0.2.4"]
[org.slf4j/slf4j-api "1.7.12"]
[pddl-clojure-interface "1.0.4"]
[log4j "1.2.15" :exclusions [javax.mail/mail
javax.jms/jms
com.sun.jdmk/jmxtools
com.sun.jmx/jmxri]]]
}