+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    07-27-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Plot multiple instances of the same point

    I am trying to "weight" some data I have and then plot it to get a regression line. In the attached file, I want to divide the distance traveled by 5, to give more weight to observations that had a further distance traveled. In other words, an observation over 100 distance would have a higher weight than one over 20, by a factor of 5. Is there a way to have an xy scatter plot that would take this into account and plot 20 observations for the 100 distance and only 4 for the 20 distance?

    Thanks for any help you can offer!
    Attached Files Attached Files

  2. #2
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,042

    Re: Plot multiple instances of the same point

    Hi jabber,

    in order to plot a data point more than once, you will need the data in the table more than once. In a XY chart, that wouldn't make much difference, though, because the points would simply overlay each other and you would not see that there are several of them.

    What you can do, though, is create another column in your data table where you calculate the weighting of each data point, and then produce a bubble chart. The size of the bubble comes from that new column. A bubble chart is essentially a XY chart, but with a size factor added to the data point.

    cheers
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  3. #3
    Registered User
    Join Date
    07-27-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Plot multiple instances of the same point

    Thanks for your reply. I understand that it won't look any different, however it will change the regression line. This is what I'm looking for.

    Is there a way to automate the plotting of multiple points? I know I can simply add all the instances of each data point, but since I have a large dataset I did not really want to do this manually.

    Thanks again!

  4. #4
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Plot multiple instances of the same point

    There are simple ways to do a weighted regression, but your data doesn't make any apparent sense. Got some that does, or can you explain what's there?
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    07-27-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Plot multiple instances of the same point

    The data in the example is fuel consumption data. I have observations taken over various distances. I want to give more weight to observations taken over longer distances as they will be more accurate. I would like to use a distance of 5 to weight the data. Therefore, data taken over 100 km would have a weight of 20, and therefore 20 points on the graph. I will be plotting speed vs fuel consumption. Does this make sense?

  6. #6
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Plot multiple instances of the same point

    You don't need multiple points in order to do a weighted regression.

    What you want makes sense, but the numbers don't, to me. You travel 100 miles (km, whatever) at a speed of 100 and consume 20 gallons, and drive 200 miles and consume 32??
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    07-27-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Plot multiple instances of the same point

    Sorry, it's not consuming 20 gallons, its a fuel consumption rate (ie 20 mpg).

    How does one do a weight regression in Excel?

  8. #8
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Plot multiple instances of the same point

    See attached.

    The larger you make A5, the closer F5 will approximate E5.

    Note that speed is ignored in the regression.
    Attached Files Attached Files
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    07-27-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Plot multiple instances of the same point

    Thanks for your help with this. I don't understand why there is a negative and positive linest (nor do I understand what this is actually providing). If I now wanted to plot this, how would I make sure the fit line includes the weighting?

    Thanks again

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.2.0