May 26, 2012

Visual Probability

Binomial Probability Density Function
The color of each rectangular cell is determined by the probability of an event being "successful" x out of n trials with each event having probability p. Each column is a different probability (p = cell x / total horizontal cells). The number of trials n is represented by the total number of cells vertically (30), and the number of successes per n trials (x) is represented by the y position of the cell divided by the total number of cells vertically.

The probability of each position is then transformed into a color by multiplying it by 960 to get a value for hue, then truncated to a maximum value of 240. 960 is used due to the fact that the highest value for any given cell is roughly 0.25, and I wanted to use the full range of hues.

I created this as I saw the way the numbers on a binomial distribution table moved smoothly from 0+ (very small numbers, but larger than zero) to ~0.25 in a line from upper left to lower right, and wanted to duplicate the appearance with color.

A few more images of varying n and p sizes after the break.



n = 15
n = 120


No comments:

Post a Comment