+ Reply to Thread
Results 1 to 12 of 12

Chart and statistics

  1. #1
    Registered User
    Join Date
    11-21-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    40

    Chart and statistics

    Hi, I am looking to draw the following graph in my attachment (please see attached PDF).

    I tried converting them into histogram and then into a bell curve, but couldn't get it to work,
    because I don't understand terms such as "bin range". Can someone enlighten me on whether I need to convert the data into a histogram first then into a separate bell curve? If so, could someone show me how I should do it? Many thanks

    PS - I understand that the graph I am looking for should be a normal distribution (I'm guessing it's not a standard normal distribution graph as the graph I am looking for is not one with 0 in the middle). Please kindly advise me... Thank you very much!
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help needed in chart and statistics

    When you plot population data, you have to group the data into "bins". For example, suppose to have data for how much people weigh. Depending on the size of the sample, you will have to group the data. Suppose you group the data by people weighing 80-85 (lbs), then 85-90, and so on, so each bin has a range of 5 pounds. So each point on the plot is the number of people who fall into that range.

    Are the data points in your PDF file all the samples, or have they already been grouped into bins? For example, for the value 10, does that mean that you have a single member of the population with a value of 10, or that you have 10 members of the population within some range of values (a bin)?

    If the latter, then all you have to do is plot your data on a line chart.

    Would be helpful if you provided additional information about what data you are dealing with.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-21-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Help needed in chart and statistics

    Hi.. Thanks, my data is raw data, the actual one has 5000+ values. However I do not know how to sort them into bins using excel as I'm not sure what range to use, and I also don't know whether there are any rules to follow for a meaningful graph (<15 classes, etc), or how to derive the frequency (using excel). Please advice what bin size to use, whether there's a formula or whether excel will automatically calculate it... Thanks!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help needed in chart and statistics

    You were on the right track with creating a histogram. If you create the histogram data and chart, you can simply change the format of the bar chart to a line graph. To create a histogram, add a column with your bin breakpoints. I have attached an example showing a few thousand random numbers (so you don't get a bell curve), and a column of bins using an interval of 0.01. The columns and graph to the right were generated by Excel. Then I modified the graph to be a line graph.

    As far as the bin size, there may be some heuristics for this but my statistics background is rather weak so I can't give you a method for selecting a bin size. Personally I would iterate different sizes to get one that is as small an interval as possible that still yields a bell-shaped curve. What is the range of your data?

    Edit: See for example this site
    Last edited by 6StringJazzer; 11-22-2010 at 03:53 PM.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help needed in chart and statistics

    Forgot attachment
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Help needed in chart and statistics

    A quick way is to calculate the Standard Deviation of your data and the mean

    =stdev(data)
    =average(data)

    now creat a new row

    c1: =averagecell-6*stdevcell
    c2: = c1+stdevcell
    ..
    c13

    now in d1 type =frequency(data,c1:c12)
    now highlight d1:d13 and press f2, now CTRL-SHIFT-ENTER

    you now have your data for the histogram!

    see if that helps!
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  7. #7
    Registered User
    Join Date
    11-21-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Help needed in chart and statistics

    Wow I'm so eager to try it out! I'm on my way to office now my sample data ranges from $2 to $650,000.. Do I manually decide the bin range? Or do i use a formula for it?

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help needed in chart and statistics

    Quote Originally Posted by joelhuang View Post
    Wow I'm so eager to try it out! I'm on my way to office now my sample data ranges from $2 to $650,000.. Do I manually decide the bin range? Or do i use a formula for it?
    Which solution are you responding to?

    For mine, using the built-in capability to produce histograms, you create the bin range manually. If you look at the link I provided you can get some idea of the thinking in the field about selecting bin ranges. You might want to experiment because the nature of the data will make a difference.

    For squiggler47's, the bin range is the standard deviation. However, that solution appears to plot only from the mean ± 6 standard deviations. If you have data outside 6 standard deviations then it won't be included.

  9. #9
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Chart and statistics

    Here is 3 examples of different methods of creating histogram bins, take your pick!
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Help needed in chart and statistics


    For squiggler47's, the bin range is the standard deviation. However, that solution appears to plot only from the mean ± 6 standard deviations. If you have data outside 6 standard deviations then it won't be included.
    the six standard deviations should take care of 99.999% of all the data, and assuming a normal distribution shouldnt make much difference to the graph! if there was a large grouping at either end of the scale the standard deviation would be larger, therefore still covering the outlying data!

    here is a coverage table :-


    _______________________Size
    StdDevs___% of data_____ 5000
    ±0________0%_____________0
    ±1________68.3%________3,413
    ±2________95.45%________4,772
    ±3________99.73%________4,987
    ±4________99.994%_______5,000
    ±5________99.99994%_____5,000
    ±6________99.9999998%___ 5,000
    ±7________99.9999999997%_5,000
    Last edited by squiggler47; 11-22-2010 at 11:42 PM. Reason: Added Table

  11. #11
    Registered User
    Join Date
    08-31-2012
    Location
    Albany, New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Chart and statistics

    Quote Originally Posted by squiggler47 View Post
    Here is 3 examples of different methods of creating histogram bins, take your pick!
    Hello,

    This table is very helpful!! Although I keep on getting an error that I can't seem to fix. When I scroll over to the first graph the following error pops up : " A formula in this worksheet contains one or more invalid references. Verify that your formuls contain a valid path, workbook, range name, and cell reference"

    I tried fixing it but I keep on getting this error even after I save the file. I have data information on cost that is about 4000 records, and I would love to replace your data in Coloum B with mine to see how the distribution changes, but I am not sure if this is working because of the error.

    Another question I have is, that when I add my data that is 2000 lines more than your example, Do I have to change anything else? Do I have to extend the number of lines in the Bins coloum unitil it get the "more" range?

    Thanks your help is greatly appreciated

    SadafSh

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Chart and statistics

    Hello sadafsh, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1