DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: How to calculate the area of a graph?  (Read 5,645 times)

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
How to calculate the area of a graph?
« on: March 05, 2019, 11:51 PM »
Hello

I have this graph and I want to calculate the amount in grams of glucose that is above the straight line of 100mg/dl for the whole period of about 5h.

https://img.medscapestatic.com/slide/migrated/editorial/cmecircle/2004/3036/images/gavin/slide021.gif

I think I need to calculate the area of the triangle, but this will give me a unit of mg/dL x hours which does not make sense.

Can anyone advise me please?

Thanks!

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 626
    • Participated in NANY Challenge Once
Re: How to calculate the area of a graph?
« Reply #1 on: March 06, 2019, 01:52 PM »
I'm not sure I could do the math on this.  Also though, I'm not sure I understand the question.  When you say the "straight" line, do you mean the Normoglyc one?  And you want to extrapolate out to hour 5?  To get an exact number, I think you'd have to have the math of the curve.  Visually I'd say it levels out at 105 mg per dl. 

You title says "area," but I'm not sure that it makes sense to calculate area of this type of graph.  It's not like a normal bell curve, were the x-axis represents members of a population.  The graph is three different groups of people over time. 

Again, not sure I understand.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: How to calculate the area of a graph?
« Reply #3 on: March 06, 2019, 09:42 PM »
http://www.mathwords.com/a/area_under_a_curve.htm

Bearing in mind it's been 40+ years since I had to stare cross-eyed at this stuff I would have thought that since the graph was seemingly created using sampled data rather than a formula that you would have had to use the age old method of slicing and dicing the area into trapezoids, calculating their area, and then adding them together?

Or given the data you could probably just stick it into Excel and have it do it.
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: How to calculate the area of a graph?
« Reply #4 on: March 06, 2019, 09:57 PM »
http://www.mathwords.com/a/area_under_a_curve.htm

Bearing in mind it's been 40+ years since I had to stare cross-eyed at this stuff I would have thought that since the graph was seemingly created using sampled data rather than a formula that you would have had to use the age old method of slicing and dicing the area into trapezoids, calculating their area, and then adding them together?

Or given the data you could probably just stick it into Excel and have it do it.

That's a possible way of doing it- that way just requires geometry and basic math, not calculus.  The equation given there is just the easier way to calculate it from the formula of the graph.

Original address: https://www.donationcoder.com/forum/index.php?topic=47262.0