+ Reply to Thread
Results 1 to 16 of 16

Trendline

  1. #1
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Trendline

    Hi all,

    I am currently analyzing CPU usage for two applications and comparing them based on how linearly they increase there CPU usage as load increases. I plot the average of each minute on a chart and I thought it would be good to create a linear trendline to analyze linearity.

    Now at 0 load the CPU usage is 0 for both applications.
    At 1 user/sec load the CPU usage of the first application is 0 and of the other is 3.6.
    At 40 users/sec ....

    I set the y intercept of the trendline to 0 but for some reason the line still does not pass from 0. Can someone help me with this please? Attached is an image of the actual graph.

    dddd.JPG

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    Can you upload the data you're using instead of just the chart image?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    Thank you. Attached please find the file.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    Your question makes sense now, but the intercept you are setting is the x-intercept, not the y-intercept.

  5. #5
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    So how do I set the y-intercept than? Because I thought that the intercept I was setting was the y-intercept?

  6. #6
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    I think there's a few things to consider before taking this route and using the results for your analysis:

    1) Excel does not natively allow chart trendlines to go through the origin because that inherently takes away the point of a trendline - to match the data given. If your trendline is behaving poorly, this is usually a result of poor data (or rather, poor instrumentation). It is important to note that by altering a trendline to go through the origin fundamentally alters the forecasting capabilities of the trendline, whereby you degrade what the capability is actually used for.

    2) It is not uncommon when testing empirical data that you void the first few samples of data while the test runs. This is to reduce noise and obtain precise results. By inspection, it appears this is what the case is with your data, so I would recommend starting with row 4 data in your sample workbook instead of row 2.

    3) Ultimately, since this is your data and not mine, I can only give recommendations; after all as far as you know, I'm just some schlub on the internet. If you are truly set on creating a trendline through the origin, I know LINEST can be used, albeit through some manipulation. This link describes a similar process I have used: http://www.oooforum.org/forum/viewto...ight=trendline

    Hope this helps!

  7. #7
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    Hi thanks for the reply. My idea is to determine which set of points is closest to linear. Do you recommend another method rather than this method to determine which setup scales linearly with increasing load? I mean does for example the R^2 value show me how close to linear my points are?

    Thank you

  8. #8
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    The R2 value shows you how close to the trendline value your data is. The closer to 1.00, the more accurate your data is to the linear trendline fit. However, this is your data. I don't know how it was collected, manipulated, or what it even pertains to. That said, I can only comment on how the data should look, given that you said it should have a linear relationship.
    Last edited by mcmahobt; 03-13-2015 at 11:25 AM.

  9. #9
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    Just for a bit of background. My hypothesis is that as the load (x-axis value) increase the cpu usage (y-value) increases in a linear fashion. Now the data I have is the CPU usage as the load increases. Now I have to find a way to determine which series is the most close to linear (the blue or the red). Is the trendline and R^2 value the way to go?

    Thanks a lot and I really appreciate your time.

  10. #10
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    Because your data ranges are different sizes (based on your sample workbook), I'd be cautious in using R2 values. Upon inspection, it looks as though Node.js CPU Average should follow the linear trend better than Eriang CPU Average. However, when starting the data values at 40 target users / second, the R2 values respectively are 0.9714 and 0.9989.

    Even though the margin of difference between the two is ~0.02, it's still counter intuitive to think that Eriang CPU has a more linear trend than Node.js CPU...until you realize that the data ranges are different, and the population size of Node.js is bigger than Eriang, meaning more possibility for deviations in data.

    I know it's a mouthful, but what I'm trying to say is statistics can be skewed all different kinds of ways to get the results people are after. This is a main reason the scientific method is so stringent on its statistical analysis policies; to avoid potential bias and misinformation.

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,373

    Re: Trendline

    Here's the real problem that I see (and it is one of the most common mistakes I see in spreadsheet charting) -- you are using a line chart (which means a category x axis) rather than a scatter/XY chart. Excel is not seeing your x values as number, but it is seeing them as "category1", "category2", "category3" and so on, and it is using those count numbers (1,2,3,...) as the x values in the trendline regression. Thus x=0 is one category to the left of your chart and not the actual 0 value at all. I think this problem resolves itself quickly and easily if you will change your chart type from line to XY scatter, so that Excel will see your x values as actual numbers and use them in the regression.

    You might review this for a discussion of the differences between line and XY scatter chart types: http://peltiertech.com/Excel/ChartsH...ValueAxis.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  12. #12
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    The data range is different because Erlang server has been overloaded before Node.js did. In fact I am only considering the usage results upto the point the servers are not overloaded. If I want I have the data for the whole 20 minutes of the test at my disposal but at some point both servers keep using the same amount of CPU (obviously because there is a finite CPU available on a system).

    So isn't it valid to say that, "When considering both setups before the overload stage, Node.js provide a more linear increase in CPU usage as load increase"?

    Thanks a lot I really appreciate

  13. #13
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    Quote Originally Posted by MrShorty View Post
    Here's the real problem that I see (and it is one of the most common mistakes I see in spreadsheet charting) -- you are using a line chart (which means a category x axis) rather than a scatter/XY chart. [/url]
    Note to self: Check chart type first. Save the headache.

  14. #14
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    I changed the type to Scatter with Straight lines and markers. And the result is as follows:

    So is it now valid to say that, "When considering both setups before the overload stage, Node.js provide a more linear increase in CPU usage as load increase"?

    Thanks a lot

    NoteToSelf.JPG

  15. #15
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Trendline

    That looks to be correct.

  16. #16
    Registered User
    Join Date
    03-13-2015
    Location
    Malta
    MS-Off Ver
    2007
    Posts
    17

    Re: Trendline

    Thanks a lot I really appreciate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel 2010 Trendline With Data labels or number on forward forecast trendline
    By camelight in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 10-15-2015, 08:35 AM
  2. Replies: 0
    Last Post: 10-11-2011, 03:22 PM
  3. Trendline - Which one to use
    By tyb in forum Excel General
    Replies: 4
    Last Post: 02-08-2011, 09:23 AM
  4. [SOLVED] trendline
    By PB in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-21-2006, 10:25 AM
  5. Trendline
    By Carter in forum Excel General
    Replies: 0
    Last Post: 01-20-2006, 08:50 AM

Tags for this Thread

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