Comparative visualizations
Q-Q plots provide a great way to compare a measured, empirical distribution to a theoretical normal distribution. If we'd like to compare two or more empirical distributions with each other, we can't use Incanter's Q-Q plot charts. We have a variety of other options, though, as shown in the next two sections.
Box plots
Box plots, or box and whisker plots, are a way to visualize the descriptive statistics of median and variance visually. We can generate them using the following code:
(defn ex-1-22 [] (-> (c/box-plot (->> (honest-baker 1000 30) (take 10000)) :legend true :y-label "Loaf weight (g)" :series-label "Honest baker") (c/add-box-plot (->> (dishonest-baker 950 30) (take 10000)) :series-label "Dishonest baker") (i/view))) ...
Get Clojure for Data Science now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.