# Thoughts on Numerical Integration (Part 23): The normalcdf function on TI calculators

I end this series about numerical integration by returning to the most common (if hidden) application of numerical integration in the secondary mathematics curriculum: finding the area under the normal curve. This is a critically important tool for problems in both probability and statistics; however, the antiderivative of $\displaystyle \frac{1}{\sqrt{2\pi}} e^{-x^2/2}$ cannot be expressed using finitely many elementary functions. Therefore, we must resort to numerical methods instead.

In days of old, of course, students relied on tables in the back of the textbook to find areas under the bell curve, and I suppose that such tables are still being printed. For students with access to modern scientific calculators, of course, there’s no need for tables because this is a built-in function on many calculators. For the line of TI calculators, the command is normalcdf.

Unfortunately, it’s a sad (but not well-known) fact of life that the TI-83 and TI-84 calculators are not terribly accurate at computing these areas. For example:

TI-84: $\displaystyle \int_0^1 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 0.3413447\underline{399}$

Correct answer, with Mathematica: $0.3413447\underline{467}\dots$

TI-84: $\displaystyle \int_1^2 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 0.1359051\underline{975}$

Correct answer, with Mathematica: $0.1359051\underline{219}\dots$

TI-84: $\displaystyle \int_2^3 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 0.021400\underline{0948}$

Correct answer, with Mathematica: $0.021400\underline{2339}\dots$

TI-84: $\displaystyle \int_3^4 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 0.0013182\underline{812}$

Correct answer, with Mathematica: $0.0013182\underline{267}\dots$

TI-84: $\displaystyle \int_4^5 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 0.0000313\underline{9892959}$

Correct answer, with Mathematica: $0.0000313\underline{84590261}\dots$

TI-84: $\displaystyle \int_5^6 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx \approx 2.8\underline{61148776} \times 10^{-7}$

Correct answer, with Mathematica: $2.8\underline{56649842}\dots \times 10^{-7}$

I don’t presume to know the proprietary algorithm used to implement normalcdf on TI-83 and TI-84 calculators. My honest if brutal assessment is that it’s probably not worth knowing: in the best case (when the endpoints are close to 0), the calculator provides an answer that is accurate to only 7 significant digits while presenting the illusion of a higher degree of accuracy. I can say that Simpson’s Rule with only $n = 26$ subintervals provides a better approximation to $\displaystyle \int_0^1 \frac{e^{-x^2/2}}{\sqrt{2\pi}} \, dx$ than the normalcdf function.

For what it’s worth, I also looked at the accuracy of the NORMSDIST function in Microsoft Excel. This is much better, almost always producing answers that are accurate to 11 or 12 significant digits, which is all that can be realistically expected in floating-point double-precision arithmetic (in which numbers are usually stored accurate to 13 significant digits prior to any computations).

## 3 thoughts on “Thoughts on Numerical Integration (Part 23): The normalcdf function on TI calculators”

This site uses Akismet to reduce spam. Learn how your comment data is processed.