January 2013

You are currently browsing the monthly archive for January 2013.

histogram of simonDist The categorical distribution is the main distribution for handling discrete data. I like to think of it as a histogram.  For example, let’s say Simon has a bag full of marbles.  There are four “categories” of marbles—red, green, blue, and white.  Now, if Simon reaches into the bag and randomly selects a marble, what’s the probability it will be green?  We would use the categorical distribution to find out.

In this article, we’ll go over the math behind the categorical distribution, the algebraic structure of the distribution, and how to manipulate it within Haskell’s HLearn library.  We’ll also see some examples of how this focus on algebra makes HLearn’s interface more powerful than other common statistical packages.  Everything that we’re going to see is in a certain sense very “obvious” to a statistician, but this algebraic framework also makes it convenient.  And since programmers are inherently lazy, this is a Very Good Thing.

Before delving into the “cool stuff,” we have to look at some of the mechanics of the HLearn library.

Read the rest of this entry »

The Bulletin of the Atomic Scientists tracks the nuclear capabilities of every country. We’re going to use their data to demonstrate Haskell’s HLearn library and the usefulness of abstract algebra to statistics. Specifically, we’ll see that the categorical distribution and kernel density estimates have monoid, group, and module algebraic structures.  We’ll explain what this crazy lingo even means, then take advantage of these structures to efficiently answer real-world statistical questions about nuclear war. It’ll be a WOPR!

Read the rest of this entry »

We don’t know what God wants, and we wouldn’t know how to do it even if we did.  Therefore (as Gandhi put it) we must “experiment with truth.”  We must discover truth for ourselves, and how to achieve it.

These are my experiments from 2012.  I didn’t try these experiments because they are somehow the “most Christ-like” thing to do.  I tried them because I don’t know what the most Christ-like thing is, but I want to learn.  I want to train myself to do it at all times.  Some of these experiments succeeded and some failed.  But all of them made me a better Christian.

Read the rest of this entry »