Why does absolute error not decrease at the inflection points with trapezoidal rule used on standard normal distribution curve?

130 Views Asked by At

If I use the trapezoidal rule to work out the area under a normal distribution curve from $x=0$ to $x=b$ where $b>0$, surely I expect the error value to begin to decrease past the inflection point (i.e. x = $+\sigma$) as the concavity has begun to change here and therefore trapezii have gone from overestimating on the concave down part of the curve (from x=0 to x=$\sigma$) to underestimating on the concave up part (x > $\sigma$).

I cannot understand why the absolute value of percentage error (and absolute error) begins to decrease a little after this point. I have attached a graph from a simulation I ran in C++, I also checked it using a tedious method in Excel (so I am certain no error in my coding).

Thank you to anyone that can shed light on this bizarre result!

Edit: For this graph $\sigma = 1$ and the number of trapezii used is fixed.

Graph showing percentage error in using trapezoidal rule to evaluate area under Standard Normal Distribution curve from 0 to upper limit b.

2

There are 2 best solutions below

0
On

The trapezoidal approximation will underestimate an integral calculated within the domain of concavity of a function, and overestimate an integral within its domain of convexity. This is because where the function is concave the diagonal edge of any trapezoid will be located below the actual arc of the curve, and thus the area of the trapezoid will be less than the area under that arc of the curve. The reverse happens in the convex region (take a look at this gif of the trapezoidal approximation in action for an integral of a curve in its region of convexity).

So if you are integrating the normal curve from $0$ to $b < \sigma$, a trapezoidal approximation return a value that is smaller than the actual value of the integral, accumulating more and more negative error the closer $b$ gets to $\sigma$, up until the upper limit of integration becomes greater than $\sigma$. At that point, the trapezoids will start overestimating and the error will start to get closer to zero as shown in your graph.

0
On

I have a reponse to my own questions finally. Firstly I should clarify that $\sigma = 1$ in my graph, as I used the standard normal distirbution.

The reason, for a fixed number of strips, the absolute error does not begin to decrease immediately at x=1 can be explained by thinking about the following example:

Let's take n=110 strips for ease and say I use this to approximate the area from 0 to 1, then I have 110 strips in the underestimating section. Now imagine I use 110 strips again to go from 0 to 1.1, this implies I have only 100 strips from 0 to 1 and 10 strips from 1 to 1.1 now. The fact that I have only 100 strips in the underestimating part now, compared to 110 previously, has a bigger effect on the error than the fact that there are now an extra 10 strips overestimating from 1 to 1.1. Hence the error is actually more negative from 0 to 1.1 than from 0 to 1 for a fixed number of strips.

Not immediately obvious at all, but this explains why the graph doesn't turn at x = 1, but rather a little afterwards.