Showing posts with label histogram. Show all posts
Showing posts with label histogram. Show all posts

Monday, December 1, 2014

Pianogram

From the site JoeyCloud here is a histogram on a piano keyboard where the histogram bars are drawn with their length corresponding to "how often each key gets pressed relative to the rest." This example is Flight of the Bumble Bee by Rimsky-Korsakov. You can select others from a short menu of classical works or from your own uploaded MIDI file.Via Flowing Data.

Monday, October 20, 2014

Are You Un-fashionably Late?

Here is a histogram of when people showed up to a party. From FiveThirtyEight, begun by Walt Hickey, but then crowdsourced from readers. Of 803 guest times submitted, the median guest arrived almost an hour after the party's start time. Four guests showed up over 3 hours late. How fashionable is that?
They also looked at a scatterplot of arrival time against number of party guests.  They fit a regression, with only a 5%  R2, and the following interpretation: as host you should expect the mean guest to arrive 42 minutes after the party's start plus 4 minutes for every additional 10 guests. So comparing parties that differed by 10 guests, on average, the guests to the larger party arrived 4 minutes later.

Monday, February 3, 2014

A Real Stem and Leaf Display

Here is a real stem-and-leaf display from a collection of deconstructions and re-organizations in the book Art of Clean Up by artist/designer Ursus Wehrli. Many more here.

Monday, January 6, 2014

Snow Nose


The Washington, DC area was spared from the worst of the big snow storm this week. At home we got only about 4 inches of snow. The video is of the window that our cat frequents. She walks back and forth along the narrow window sill and touches her nose on the window panes. This is likely cage behavior of her indoor life. She leaves behind a grease spot on the panes with each nose touch. The marks are faint and hard to see, with fewer marks on the left-most pane, many more on the center pane, and fewer on the right-most pane. This is a pattern we have seen often. If this was one complete pane of glass, rather than three individual panes, we could see the continuous frequency distribution of her nose touches, likely following a bell-shaped frequency distribution curve. As it is, we see this continuous distribution divided up into three disjoint regions. The individual touches have been placed into the three bins of a histogram of this continuous distribution of nose touches. Overall, if she touched the panes n times, the counts of the touches that fall on the three panes would have a multinomial distribution, with a higher probability of touching in the middle and lower probabilities on either side.

Monday, December 16, 2013

Scatterplot Waldo

Slate.com staff writer Ben Blatt has examined the wide range of Where's Waldo picture books,
looking for a useful search strategy to find Martin Handford's elusive cartoon character. Blatt plotted the horizontal and vertical page location of Waldo in 68 pictures in, what he calls, the seven "primary" Where's Waldo books. He claims to have sat for three hours with a tape measure in a Barnes & Noble bookstore and measured Waldo's location on each 20" X 12.5" two-page spread. The image above shows these locations and two horizontal bands of 1.5" each: one three inches from the bottom of the page and the other seven inches from the bottom. Blatt found that Waldo can be found in these bands in 53% (36) of the 68 images.

We can see the higher frequency of occurrence in bands by finding the marginal histograms from digitized locations in Blatt's scatterplot (data shown below). Here is the marginal histogram of the vertical locations of Waldo. The regions found by Blatt stand our prominently in the two modal peaks in the histogram.
Horizontally there is a less prominent patten of the locations across the two-page spread.
Perhaps we could improve on the two-vertical-strips strategy by concentrating on the far left and far right of the two-page spread with then a glance just left of center?
Here are the data:
horizontal vertical horizontal vertical horizontal vertical horizontal vertical
1.02 11.97 9.52 7.21 11.79 6.22 8.8 2.95
7.78 10.22 10.51 7.71 14.78 5.72 12.57 3.71
8.51 9.99 11.52 7.97 14.51 4.96 17.76 3.97
9.26 9.46 11.29 6.95 18.03 5.43 18.03 4.21
10.77 10.48 12.19 7.77 18.75 5.43 19.01 4.47
11.99 11.48 12.51 8.24 1.8 3.97 16.81 2.95
13.27 10.48 12.51 7.48 1.31 3.45 1.04 2.72
16.26 11.21 14.51 8.21 2.26 3.18 1.54 1.93
19.48 12 14.25 7.21 3.77 4.21 1.54 1.43
16.26 9.99 15.62 7.48 3.51 3.45 3.28 1.2
17.5 9.99 17.24 7.48 3.8 3.45 7.29 1.93
17.74 9.46 18.49 7.21 5.31 3.97 8.27 1.2
15.5 8.97 19.25 7.48 4.79 2.98 8.53 0.44
5.78 8.24 2.76 6.75 5.54 3.21 10.54 2.45
6.76 7.97 3.8 6.98 6.76 4.44 17.5 2.69
7.52 8.47 3.28 5.96 8.27 4.21 19.48 2.45
8.51 8.47 5.54 6.72 9.03 3.45 18.98 1.93




Monday, August 5, 2013

Earliest Living Histogram Revisited (and Reversed)

While preparing for my talk at the Joint Statistical Meetings in Montreal this week, I had the occasion to consider again the Earliest Living Histogram that I posted in 2008. This image appeared on page 450 of Popular Science Monthly, September 1901 in a paper "The Statistical Study of Evolution," by C.B. Davenport. Forty University of Chicago students are arranged by height in bins of two inch width. When viewed from above we see what was much later called a "living histogram" of the heights of this sample of men.  It is described in more detail in Graphical Methods for Presenting Facts (1914) (Figure 141) by W.C. Brinton where, on page 165, he writes:
In Fig. 141 a group of men have been arranged in different rows. There is only one man in the shortest class at the left, and only one man in each of the tallest two classes at the right. Most of the men are of that height shown by the row to the right of the center of the diagram. A glance at the photograph taken looking down on this group of men shows that there are more men shorter than the most frequent height than there are men taller.
Davenport's original publication of this photograph also contains another image of the forty students:
Davenport says they are "arranged (approximately) in order of height." Examine the tallest few students shown here:
Note the shading of the hats that the tallest five men are holding: Gray, White, Black, White, and Black, reading from tallest downward (right to left). Now consider their arrangement in classes by height in the image above. Note that the five men on the far left are now wearing hats with shading Gray, White, Black, White, and Black.

The histogram image is reversed!

The taller men are shown on the left and the shorter on the right. This is exactly the reverse of the description given by Brinton and it reverses his reasoning and conclusions about the frequency of tall and short men in this sample. But there is more evidence. Reversing this image along a properly oriented and indicated number line we get the image below along with counts of the men standing in two of the histogram classes.
The five numbered men in dark hats, on the right, stand in a row of about the same extent as the seven numbered, smaller men in the row on the left. The men on the right are not just taller but also broader, and the smaller men on the left take up much less space in this regard. Another indication that this is the proper view of this histogram. The original published histogram should be reversed.
The correctly oriented Earliest Living Histogram is shown below:




Monday, June 24, 2013

Counting Gym Freqs

So let's measure the amount of wear on Jon Purdy's image of exercise weights from a previous post.  Here is a Photoshop image of the weights modified by rotation and perspective correction. Unfortunately, the weight selection plug (in red) has hidden the amount of wear at 30lbs/14kgs. Its coiled cord has only partially hidden the full wear pattern at 45lbs/20kgs and at 60lbs/27kgs. We can attempt to impute these last two. The amount of wear behind the coiled cord at 45lbs/20kgs appears to be about the same as at 135lbs/61kgs. We will replicate the 150lbs/68kgs pattern over the top of the image of the coiled cord at 45lbs/20kgs. In this image, the cord also obscures the upper portion of the wear pattern at 60lbs/27kgs. We will replicate only the upper portion of this wear pattern with with upper portion from its neighbor 75lbs/34kgs resulting in the image below.
We then convert the selected wear region to black and weight and increase the contrast. A portion of this is shown below.
Notice that, as a result of our imputation, the first panel of this sequence (30lbs/14kgs) is a duplicate of the eighth panel (150lbs/68kgs) and the upper half of the second panel is a duplicate of the upper half of the third panel. The overall balance of dark and light pixels can be seen with the Photoshop histogram option that displays lines whose height represents the count of pixels corresponding to total black (a level of 0, on the left) to total white (a level of 255, on the right), as shown below.
We see peaks of predominately dark pixels levels (on the left) and light pixels (on the right). On this histogram I have selected the approximate midpoint between the two peaks (level 133) and shaded in all the pixels that are lighter (levels 133...255). Of the 106512 pixels in this image, 44443 were thus selected. For each weight, a region of the same size size was placed around the panel and the number of light pixels (above 133) was computed, as shown below for panel 6 (120lbs/55kgs).
Of the 7504 pixels commonly selected from each panel, this panel had a count of 4781 light pixels (those with levels 133...255). Repeating this for all the panels (1 through 14), the total number of light pixels is 33651, so that panel 6 accounts for 4781/33651 or 14% of the light colored wear. The other panels can be similarly computed finally resulting in the rounded wear percentages shown in the bar chart below.




Monday, March 25, 2013

Age of the Oldest Person You Know


From a Prudential TV commercial that has people place large, round stickers on a number line to represent the age of the oldest person they know. This forms a histogram or dotplot. The message is to have Prudential prepare you to have adequate money for all these years. You can add your own sticker at the Prudential website. Here is a video behind the scenes.

Monday, March 4, 2013

Market Price

Market Price (getmarketprice.com) collects the current prices of items (over $100) selling on e-bay. It provides summary statistics (min, max, median, mean, and standard deviation) along with a histogram of prices and a scatterplot of  time left to bid against price. They also include a list of the raw data with links.

Monday, February 18, 2013

Wear Fountain

 
A water fountain at the Smithsonian American Art museum, submitted by Eric Lawrence of George Washington University. The many hands of museum visitors have pressed on the lever for a drink and worn away the metal luster to produce the dark pattern of a histogram revealing a bell-shaped distribution of wear and use. Good eye, thanks Eric.

Monday, January 7, 2013

Happy New.....Car

Over the holidays I saw a normal curve on a TV commercial. We've seen histograms in a TV role before. The new car site TRUEcar.com contains three versions of their TV commercials displaying normal curves representing the distribution prices of chosen car models. The screenshot from one of their commercials, shown above, displays car prices as a normal distribution. The distribution shows the Manufacturer's Suggested Retail Price (MSRP) sitting about two standard deviations above the Average Paid price and, predictably, the TRUECar price about one standard deviation below the Average. This is repeated in another normal curve show above.
This is nice to see, but I have a problem with it. For what are undoubtedly graphic designer concerns, the prices are shown as points on the normal curve itself, but they should be more properly represented on a number line that tracks along under the curve. We've also seen this problem illustrated before in this blog: here and also here. The difficulty is in confusing the height of the curve with the size of the price. True, a careful look would show this is not the case, but I wonder how many people still misinterpret this placement, thinking of one price sitting at the top of a heap, and that price is the mean!

TRUEcar improves this somewhat on their website where you can select a given make, model, and year of a car and they will display a histogram of either the national or local comparison distributions of prices paid, as shown below. National comparison prices are much closer to bell-shaped than the smaller sample of local prices.
The horizontal extent of each histogram bar represents a small range of prices paid by a number buyers. This number determines the height of the bar. You can slide your cursor to highlight the histogram bars as they range from Below Market (under the 15th percentile), to Great prices (between the 15th and 45th percentiles), to Good prices (between the 45th and 70th percentiles, finally up to prices that are Above Market (here above the 70th percentile, not as extreme as they showed previously).

Here again is the potentially confusing placement of reference prices on the curve rather than on the number line of prices below the curve.

Still, it's good to see normal curves on national TV.

Happy New Year to all.


Sunday, December 2, 2012

This is Not a Normal Distribution

This is a display in the Anthropologie store in Georgetown, DC earlier this year. Ceramic cups are suspended from a shelf by ribbons. The length of the ribbons are generally arranged to produce a bell-shaped curve: shorter ribbons on each end and generally longer ones in the middle. But, no, this is not a normal distribution. The cups are not arranged or ordered by size, volume, weight, or price etc. There is no number line to represent some measurement. The is no frequency distribution showing few small, many average, and few large aspects of the cups. There are different size ribbons, but these do not represent a frequency count of how many instances of some aspect of a cup are accounted for. It does make a nice curving display suggestive only of a bell-shaped curve, but it is not even a rough representation of a normal distribution.

Monday, August 6, 2012

Climate Dice Back in the Day

There's been much on blogs about "Climate Dice" and how humans are perhaps loading them. See the article by Andrew Revkin (New York Times) and more recently by Paul Krugman (New York Times) discussing the findings by James Hansen et al. on public perceptions of climate change, these links via Andrew Gelman. Basically, the data show that hotter extremes are becoming more likely.

Investigating the variability in climate, with analogies to random tosses of dice, has a long history, and not always considered in the correct way. C. F. Marvin, former chief of the US Weather Bureau, can be seen using such random methods in this article from Popular Science 1932 page 46.  Describing this methods a bit more, this newspaper article from 1931 begins with an especially lyrical view of his work :
Common dice, inventions of the ancients and purveyors of financial distress to unlucky moderns, have risen to a new dignity. After having been rolled in many places, ranging from the cobblestones of side streets to the green covered tables in palaces of chance, they are now being tossed with analytical earnestness by the hands of science.
In this new field the "galloping dominoes" are being used as a means of increasing man's working knowledge of the weather and its pranks. The greenback and silver involved when glassy eyed gamblers seek to get something for nothing are supplanted by graphs and slide rules in this new environment, where scientists seek the answer to the high sounding question, "Are meteorological sequences fortuitous?"
I think here one should read "random" for "fortuitous". The article's final question is the title of a paper by Marvin the appeared in December 1930 Monthly Weather Review (pdf). In that paper he uses such random methods to simulate graphs of precipitation and compares the results to actual records questioning "who could pick out the natural from the chance order"?

He does complicate things by confusing a sample and a population. He marvels at the fact that the products of the results on four tossed dice produces a histogram of measurements that is  sparse and skewed to the right, resembling a sample record of actual precipitation. Of course, this is a population of all the possible products and its sparseness will always be present. As he notes, there is no way to fill in between the products that can only be produced with four dice. This has no relation to the sampling variability and sparse histograms, of many shapes, that could result come from a skewed but continuous population of measurements. Of course, it was 1931!

Tuesday, June 19, 2012

NO, NO, NO. The wrong idea.

Found on Flickr here with the caption "normal distribution class photo".

A bell-shaped normal curve is not the normal distribution. The curve only describes the distribution. A normal distribution is a particular arrangement of measurements on a number line.

This photo seems to want to depict a normal distribution of the heights of students. If height is the variable of interest, the horizontal axis should be a number line with all the smallest students on the left and those taller would be placed further to the right. If the heights of the students had a bell-shaped histogram we would expect to see very few short students, very few tall students, and most of the students would have heights that fall between those extremes. This photo puts the tall students in the middle and shorter ones on the extremes. Maybe they have illustrated a bell-curve, but no number line is used, so no distribution (normal or otherwise) could be represented.

Monday, May 23, 2011

Automated Histograms c. 1962


This is a device, from Nature in 1962, to construct a histogram during an experiment of stimulus-response times. The histogram forms by the careful timing of the release of ball-bearings into plastic bins. As a stimulus is given to a subject, the machine comes to life, starting a motor and engaging an electro-magnet. The motor hums, driving a treadmill-type belt at a constant rate. A ball-bearing is then projected onto the underside of the belt by a solenoid. The ball-bearing is held fixed at a point along the moving belt by the magnet. Once the subject responds to the stimulus, the electro-magnet is switched off, and the ball-bearing drops into the appropriate bin indicating the response time. The histogram grows as more response times are measured. It is suggested that the mean can then be found by balancing the display, and the variance by finding its moment of interia.

Sunday, February 27, 2011

Musical Stacked Histograms

This graphic has gotten a lot of play in the past few weeks. It purports to show the collapse of the global music industry. The image is discussed on Junk Charts where attention is directed at the mystery of the decline in CD sales around 2001. An interesting image, but as Michael DeGusta of Business Insider shows not all is what it seems. He details the graphic's recent history and notes several problems: It's really only US sales figures and it's not adjusted for inflation, among other problems. He provides other images of music sales data and this correction of the chart in 2011 dollars:
Here we see a problem with interpreting such an image. One commenter on Junk Charts notes:

"We might be able to tell if the Digital Sales area was not hidden behind the CD Sales area. Hence the problem with area charts."

To which another responds with the correct answer:

"Digital sales isn't hidden behind the CD sales - its stacked on top. I know it looks like a range of mountains, but it isn't. I think. That's the perceptual problem with charts stacked like this."

Yes, it is not one curve sitting behind another, like a range of mountains. The histogram information is stacked on top of the other curves. Stacked histograms are often used when displaying time dependent data, like for following. But not always.
Here is an image of a "living histogram" that organizes men and women of different heights into frequency classes. The men's histogram is easily seen. The women (dressed in white) are added or stacked onto the men's histogram classes. It does give an indication of the population heights for both, but it's more difficult to view the women's histogram alone. The same holds for the graphic of music sales. But I want to see the time axis extended further into the past, showing sales of 45s, 78s, and then even Edison wax cylinders!

Tuesday, July 27, 2010

Interactive Age Distributions


Great interactive histograms of the age distributions in selected countries since 1950 and projected out to 2050. From GE via information aesthetics

Tuesday, October 21, 2008

Bivariate Histogram from Maya Lin


From Maya Lin, the designer of the Viet Nam Veterans Memorial, a sculpture in wood called 2X4 Landscape. It looks like a bivariate histogram. It is showing now at the de Young museum in San Francisco until mid January 2009. After that it is coming to the Corcoran in Washington, DC according to this site.

Thursday, May 1, 2008

Earliest Living Histogram


Here is the earliest "living histogram" picture that I have found. It is from a paper by C.B. Davenport in The Popular Science Monthly, September 1901. It is more easily found on-line at Google books in the text Graphical Methods for Presenting Facts by Brinton(1914) on page 165. Davenport placed forty University of Chicago students into columns according to different height classes. What we see are the top of their heads or rather their hats!
My previous earliest finding of a living histograms occurred in a paper by Blakeslee(1914). A link to it is available in the references of a genetics review paper by Crow.
The term "living histogram" was coined by Joiner(1975) in the International Statistical Review. Joiner's image, Blakeslee's image, and an update by Strausbaugh(1996) can also be seen in a paper by Schilling, Watkins, and Watkins "Is Human Height Bimodal?" from The American Statistician.

Monday, September 24, 2007

World's Income Distribution


An interactive Flash demonstration showing the distribution of the world's income and the percentage of the world's population that falls under the poverty line of $1 a day and how it changes over time and by region.
From www.gapminder.org