2 Replies Latest reply on Oct 2, 2018 5:20 AM by Gheorghie Lang

    How to define the area under a curve

    Ian  Wynne


      I am running an experiment tracking the overnight activity subjects Vagal Tone, this is a powerful indicator of health, recovery and well being.  The output is a single unit per heartbeat, which can be easily graphed by time.

      You will see in the various vis (attached) that you can see some significant differences between each nights profile. I have aggregated the graphs for ease of viewing to approximately 20 min rolling avg or 2 min rolling avg, with some other additional exploratory analysis tabs. 


      What I need to do is summaries each night into one single value output of 'Recovery capacity'  My thoughts are to produce a value for the area under the graph, which should demonstrate the total volume of vagal activity? An avg nightly score would miss to much detail I feel?


      Can you help work out how to do this, please bear in mind that I have no mathematical or stats training to speak of, so I might be able to understand the concepts but the application may be limited to my skill level.


      I appreciate your wisdom and direction

        • 1. Re: How to define the area under a curve
          Jim Dehner

          Hi Ian

          Interesting - the way to calculate the area under the curve is to take the interval on the time axis times the average of the readings at the start of the interval and the end - Just think like a bar an you are taking the bas (interval) x height


          in your case the interval on the time access is actually in seconds 

          so the value of the interval is

          and the area of each "bar" is

          and the total area is


          in text chart form the Tuesday looks like this

          and wednesday looks like this



          the dimensions on the area in seconds X your test reading - you can convert to minutes by dividing by 60


          because the interval on the time line is seconds and there is a reading every second (well almost - there is some time rounding going on here) the numerical solution is equivalent to taking the window sum of the average readings but that would not be the case of you change the interval to say every 5 seconds



          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: How to define the area under a curve
            Gheorghie Lang

            Hi Ian


            You just need a simple LoD of {EXCLUDE [TIME] : SUM(CVT)}


            You can check by highlighting all points and checking if the number displayed at the bottom is the same as the number in the view. They will be different as you've applied a moving average, but the difference is quite small.



            Kind Regards