Histogram Bin Sizing Methodology


by cmmcnamara
Tags: histogram, methodology, sizing
cmmcnamara
cmmcnamara is offline
#1
Feb19-13, 06:34 PM
P: 122
Hey all I have what I assume to be a fairly vague question. I'm taking a programming class right now for MATLAB and the current project we are working on is a simple histogram display from reading an excel data file. The coding is extremely easy however, having never taken a statistics course and having a very vague understanding of the subject I am a bit stumped on how to properly choose bin size which specifies the number of bins for MATLAB to draw the histogram. I have been reading a bit on the topic on Wikipedia, however the methodology for choosing a bin size seems highly subjective to me and dependent on the nature of the collected data.

For my project the professor chose that the data to be analyzed was to be the height of our class. My rationale and selection for methodology goes as follows. I chose the Freedman-Diaconis bin sizing which specifies that the bin size is equivalent to twice the interquartile range divided by the number of data points to the one-third power (see http://en.wikipedia.org/wiki/Histogr...bins_and_width). Based on Wikipedia's description it tends to be less sensitive to extreme data points than the standard deviation rule. I thought that given my class's small size (32 people) that this method was the best because with such a small sample size I figured that the histogram function would be highly sensitive to extreme values and therefore not be as representative as a method which is more sensitive to extreme values. Would this be a correct reasoning for selecting bin size by this method? There are quite a few other methods listed but some such as the square root method don't seem to have any useful description. Could someone validate my reasoning here? I realize that this topic seems to have "no right answer" but I at least want to believe my logic is sound. Thanks in advance!
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
ImaLooser
ImaLooser is offline
#2
Feb20-13, 01:57 AM
P: 571
Quote Quote by cmmcnamara View Post
Hey all I have what I assume to be a fairly vague question. I'm taking a programming class right now for MATLAB and the current project we are working on is a simple histogram display from reading an excel data file. The coding is extremely easy however, having never taken a statistics course and having a very vague understanding of the subject I am a bit stumped on how to properly choose bin size which specifies the number of bins for MATLAB to draw the histogram. I have been reading a bit on the topic on Wikipedia, however the methodology for choosing a bin size seems highly subjective to me and dependent on the nature of the collected data.

For my project the professor chose that the data to be analyzed was to be the height of our class. My rationale and selection for methodology goes as follows. I chose the Freedman-Diaconis bin sizing which specifies that the bin size is equivalent to twice the interquartile range divided by the number of data points to the one-third power (see http://en.wikipedia.org/wiki/Histogr...bins_and_width). Based on Wikipedia's description it tends to be less sensitive to extreme data points than the standard deviation rule. I thought that given my class's small size (32 people) that this method was the best because with such a small sample size I figured that the histogram function would be highly sensitive to extreme values and therefore not be as representative as a method which is more sensitive to extreme values. Would this be a correct reasoning for selecting bin size by this method? There are quite a few other methods listed but some such as the square root method don't seem to have any useful description. Could someone validate my reasoning here? I realize that this topic seems to have "no right answer" but I at least want to believe my logic is sound. Thanks in advance!
Your logic seems OK to me. Maybe I'm being a wet blanket but histograms are a rather crude technique and I think it doesn't really matter. It depends on what you want to know. Just try something and decide whether it looks alright. There are more important things to worry about. This attitude might get you a bad grade on a test, though.
CompuChip
CompuChip is offline
#3
Feb20-13, 04:32 AM
Sci Advisor
HW Helper
P: 4,301
What will get you a good (or at least, better) grade is motivating the choice you have made. In this case I would agree with ImaLooser that it probably doesn't matter that much but even if it did, I would give partial credit to a well-motivated (but incorrect) choice but none to an unmotivated correct choice (because for all I know, that could have been a lucky guess).


Register to reply

Related Discussions
Experimental methodology Introductory Physics Homework 14
methodology to done my project Mechanical Engineering 2
methodology Introductory Physics Homework 3
Quantitative methodology Biology 16
Symbolic Methodology... Calculus 4