[R] Equation of a curve
Greg Snow
538280 at gmail.com
Thu Apr 3 23:22:18 CEST 2014
The mean value theorem of integration (I have a cross-stitch of this
theorem hanging on my wall (between cross-stitches of the central
limit theorem and Bayes theorem)) tells us that the area under a curve
is equal to the width of the area of interest times the average height
of the curve. Often when we want to use the area under a curve in
statistics we can just use the average of the y-values generating the
curve and it is much simpler.
If the x-coordinates of your points are evenly spaced or are random
with a fairly uniform distribution then the mean height of the points
will probably be as useful as any curve that you computed and then
integrated.
If the x-coordinates are not uniformly spread then you may benefit
from a weighted average. One option for estimating the integral is to
use the trapezoidal rule or Simpson's rule, but if you look at those
formulas, they are just a weighted average of the heights again.
So, while Yes, R can estimate curves and compute numerical integrals
of the curves, there is a good chance that you don't really need to do
either.
On Thu, Apr 3, 2014 at 9:26 AM, Frances Cheesman <fcheesman.fc at gmail.com> wrote:
> Hi all,
>
> I have a number of bacterial growth curves I would like to find the
> equations for these and then integrate them to find the area under the
> curves for me to do stats on later.
>
> Is there any way I can do this in R?
>
> Thanks,
>
> Frances
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com
More information about the R-help
mailing list