Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Excel Histogram How does it calculate bin width

  1. Feb 6, 2010 #1
    Hey people,

    I am trying to write my own histogram making code since the Excel one sucks IMO. I am having some trouble thinking the whole bin 'width' thing through though.
    I plan on using the formula

    number of bins = k = 1.87(N - 1)0.40 + 1 ​

    Then I was going to figure out the bin width as

    [tex]\frac{[MAX(data ) - MIN(data )]}{k}[/tex]​

    This will get me in the ball park, but it will result in bin widths that are sloppy like 1.111 - 2.222 and the like. They should be sensible intervals like: 0 - 10, 10 - 20... etc or 0.10 - 0.12, 0.12 - 0.14...etc
    Anyone care to brainstorm on me with this? I was thinking I could do some sort of test on the data set to determine what decimal place the bin width needs to go out to.

    Hopefully someone can decipher what I am talking about here and wants to jump on board! :smile:
    Last edited: Feb 6, 2010
  2. jcsd
  3. Feb 10, 2010 #2
    Any thoughts :smile:
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Excel Histogram How does it calculate bin width
  1. Excel - (Replies: 2)

  2. Histogram in EXCEL (Replies: 3)