October 17, 2006

statistical graphics 101: Histograms

It's been too long since the last posting (on barcharts) in the teaching corner. This one will be on histograms.

Histograms are often mistaken with barcharts. The fundamental distinction between the two is

  • Barcharts show counts (or weights) for the discrete axis of a categorical variable
  • Histograms show an approximation of the density function (if scaled accordingly) of a countinuous variable.
As a consequence, the only thing that can be quantified in a barchart is the bar height (better length, which makes it independent from their orientation). On the other hand, in a histogram, the area of the boxes is proportional to the density approximation. If all bars have the same width in a barcharts, or gaps are drawn in a histogram (which is complete nonsense), the two plots can get mixed up.

(% votes for Kerry in the 2004 presidential election)

Much has been written about optimal bin width for histograms - almost nothing about the choice of the anchor point. Changing the latter often changes the shape of the histogram more dramatic than choosing between 8, 9 or 10 bins.
Setting the anchor point from 0 to -2.4 yields:


(changing the anchor point to -2.4)

In most applications, there are sensible breaks which can be chosen. Since we look at 3,111 voting districts, we can use far more bins and start at 0 with bin width of 5.


(using meaningful parameters (0, 5) - density estimate added)

If we link a second attribute into the histogram, the whole thing gets more exiting!


(all districts where more than 15% have a college degree selected)

We don't really can see what is going on here (although we might guess, that there is a slightly higher proportion of highlighting towards the higher votes for Kerry).

When we use the same normalization trick as for Spineplots (see previous post), we get the clearer picture of the Spinogram:


(highlighting in a Spinogram)

Well, that's what we would have expected, probably except for the increase at the left end of the scale.

The problem with the histograms used so far is that we looked at voting districts, and not at voters! This will distort the impression if the districts are not of equal size. Weighting above histogram will move the mode further to the right.


(the weighted histogram represents voters not districts)

Finally we get the weighted spinogram, which probably supports more the hypothesis ... of the selected group.


(the weighted spinogram)

(Sorry for the lengthy post ... but concepts get a bit more complex)

Posted by Martin at 19:59:55 | Permanent Link | Comments (3) |
Comments
1 - Hi Martin,

You have a very cool blog here…loved the content.
U know there is an awesome opportunity for people like you who have ur own blogs n sites…I came across this site called Myndnet.com…it’s a platform for people to buy and sell IT related information. and everytime you sell some information you get paid for it…Good money for people like us in the IT domain. Here the link http://www.myndnet.com/login.jsp?referral=alpa83&channel=al557

Sign up is free…check it out…
You can contact me at my id here for more questions : barot.alpa@gmail.com

Cheers
Alpa
 (Comment this)

Written by: Alpa at 2007/05/02 - 09:17:58
2 - Hell! Great site!
animal stuffed webkinz
http://cheat-code-webkinz.awardspace.com/
animal stuffed webkinz
animal webkinz
animal code webkinz
webkinz dogs and more
free webkinz dog
free webkinz panda
webkinz
cheat code webkinz
cheat code pet webkinz
cheat code secret webkinz
cheat code webkinz world
cheat code money webkinz
webkinz world
cheat webkinz
code webkinz
webkinz welcome world
code secret webkinz
love puppy webkinz
child webkinz welcome world
recipe webkinz
webkinz world.com
cheeky dog webkinz
black lab webkinz
ganz webkinz world
ganz site web webkinz
ganz site web webkinz welcome
ganz webkinz welcome world
new webkinz
webkinz welcome
ganz webkinz
pet play webkinz world
code free secret webkinz
bear polar webkinz
game webkinz
code free webkinz
recipe secret super webkinz
toy webkinz
bunny sherbert webkinz
game pet play webkinz world
code secret webkins webkinz
web webkinz
cat cheeky webkinz
recipe secret webkinz
store webkinz
cat webkinz
code secret toy webkinz
panda webkinz
google webkinz
code pet plush secret webkinz
kinz lil webkinz
pug webkinz
googles webkinz
lil webkinz
monkey webkinz
ganz pet play webkinz world
clothes webkinz
search webkinz
leopard webkinz
valentine webkinz
picture webkinz
rabbit webkinz
cheat money webkinz
bullfrog webkinz
hippo webkinz
chihuahua webkinz
new recipe webkinz
pet webkinz
frog webkinz
koala webkinz
password webkinz
cheeky monkey webkinz
plush toy webkinz
dog webkinz
retired webkinz
cheap webkinz
bunny sherbet webkinz
horse webkinz
bulldog webkinz
com webkins webkinz
tiger webkinz
ca webkinz
gorilla webkinz
golden retriever webkinz
collection webkinz
cat persian webkinz
accessory webkinz
unicorn webkinz
cow webkinz
frog tree webkinz
webkins webkinz
free webkinz
locator store webkinz
cheeky webkinz
bull dog webkinz
find webkinz where
bear black webkinz
shop webkinz
penguin webkinz
webkinz yorkie
pig webkinz
cheat webkinz world
ganz site web webkinz world
recipe webkinz world
code secret webkinz world
recipe secret webkinz world
game webkinz world
play webkinz world
pet webkinz world
web webkinz world
cheat kinzcash webkinz
cheat tamagotchi webkinz
cheat ganz site web webkinz
cheat kincash webkinz
cheat secret webkinz
cheat game webkinz
cheat recipe webkinz
any cheat there webkinz
cheat tamagotchi toy webkinz
code unused webkinz
code com secret webkinz
code tag webkinz
buy code secret webkinz where
cheeky code dog secret webkinz
code webkinz xom
code pet secret webkinz
code free new pet webkinz
code pet webkinz
code friend webkinz
code secret tag webkinz
code love puppy secret webkinz
new pet recipe webkinz
food recipe webkinz
book recipe unofficial webkinz
banana dome recipe webkinz
recipe stove webkinz
holiday new recipe webkinz
ganz recipe webkinz
blender recipe webkinz
book recipe webkinz
cookie recipe tornado webkinz
recipe sandwich webkinz
rare recipe webkinz
webkinz welcome world.com
black lab new webkinz
game ganz site web webkinz world (Comment this)

Written by: Anonymous at 2007/06/15 - 15:01:49
3 - Cool.......... Nice blog!

Regards,
image clipping
 (Comment this)

Written by: sblgraphics at 2008/09/26 - 06:38:38
Write a comment