Results 1 to 4 of 4

Math Help - Area under the curve

  1. #1
    Newbie
    Joined
    Mar 2014
    From
    Canada
    Posts
    2

    Area under the curve

    Hello,

    I have been asked by a user of some software I have created if I can add a calculation for Area Under The Curve...

    From what I understand, I need to use Calculus to do this ... not my area of expertise

    I need to add some code to figure this out but have no idea where to even start.

    Here is a screen shot of the type of data that I need to work with:


    This is an expanded view:


    Data is collected every 4 seconds usually over an 8 to 12 hour period.

    Can anyone help point me in the right direction or is this not possible with this type of graph?

    Thanks,
    Jeff
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,598
    Thanks
    1421

    Re: Area under the curve

    If "Data is collected every 4 seconds usually over an 8 to 12 hour period", then the simplest and most reasonable thing to do is to add all data points and multiply by 4 seconds. If the function value is in "beats per second" then that will give "total beats".
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2014
    From
    Canada
    Posts
    2

    Re: Area under the curve

    Thanks for the quick reply....
    I have the values for Total Beats and Total SPO2 points ... I need to calculate the Area Under The Curve.
    I just spoke with the user, and they tell me that they only want to calculate the Area Under The Curve for any SPO2 points that are under a value of 89.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Feb 2014
    From
    United States
    Posts
    549
    Thanks
    255

    Re: Area under the curve

    Quote Originally Posted by Jeff141 View Post
    Hello,

    I have been asked by a user of some software I have created if I can add a calculation for Area Under The Curve...

    From what I understand, I need to use Calculus to do this ... not my area of expertise

    I need to add some code to figure this out but have no idea where to even start.

    Data is collected every 4 seconds usually over an 8 to 12 hour period.

    Can anyone help point me in the right direction or is this not possible with this type of graph?

    Thanks,
    Jeff
    Actually you do not need calculus. In fact, calculus might well balk at dealing with such a curve. You need to use numerical integration, which is a set of methods for estimating the area under curves when calculus will not work.

    The basic idea is to break the area into many small pieces. It makes things easier (though not necessarily more exact) to divide the horizontal axis into N pieces of equal length. If your readings are at 4 second intervals, 4 seconds is an intuitively appealing length to choose along the x axis. Call that length L. And suppose you have N such intervals. (It is important that N be a relatively large number to get relatively exact results.) Having done so, one way to proceed is to find the vertical value at the beginning and end of each interval. Let's call those values for the $i^{th}$ interval $B_i$ and $E_i$.

    Then the area $\approx \displaystyle \dfrac{L}{2N} * \sum_{i = 1}^N(B_i + E_i).$

    This just requires a loop for doing each sum and accumulating those sums building with a final multiplication and division. Not hard at all.

    If you want a more complete and rigorous explanation look at Numerical integration - Wikipedia, the free encyclopedia
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Area under a curve?
    Posted in the Calculus Forum
    Replies: 3
    Last Post: June 30th 2011, 10:03 PM
  2. Area under a curve
    Posted in the Calculus Forum
    Replies: 25
    Last Post: August 7th 2010, 04:48 PM
  3. Area under the curve
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 5th 2009, 09:57 PM
  4. Area Under a Curve
    Posted in the Calculus Forum
    Replies: 3
    Last Post: September 2nd 2009, 11:11 PM
  5. area under the curve
    Posted in the Calculus Forum
    Replies: 1
    Last Post: June 24th 2008, 05:32 AM

Search Tags


/mathhelpforum @mathhelpforum