KNOWLEDGEBASE - ARTICLE #1546

How does Prism interpolate standard curves generated by nonlinear regression? How accurate are the results?

Interpolating Y from X

If you ask Prism to compute Y for a given X, it does so by evaluating the equation that defines the curve. That is very straightforward.

Interpolating X from Y (Prism 5 and later)

Determining a X value that corresponds to a given Y is more complicated. Prism does not try to solve the equation algebraically but rather does the interpolation numerically. The results are accurate to at least 6-7 decimal places. If you are interested in the details, read on:

Prism decides on the range of X values to consider. To allow for extrapolation a bit beyond the range of the data, Prism creates an interpolation/extrapolation range that includes the range of the data, and extends in each direction by a distance equal to half the difference between Xmax and Xmin. There are two special cases. When all the data are positive (or zero), that range is clipped to exclude negative numbers. Similarly, when the data are all negative (or zero), the interpolation/extrapolation range is clipped to exclude positive numbers.

Prism then divides that interpolation/extrapolation range into 1000 line segments. That number (1000) is arbitrary but works well. 

For each value to be interpolated or extrapolated:

  1. Prism finds which of the 1000 line segments includes the Y value. It starts with the lowest X value (scans from left to right on the graph). If more than one line segment includes the Y value, Prism only finds the first (lowest X value).
  2. Prism then interpolates within that line segment to determine X as accurately as possible. In most cases, it does this by binary bisection. It divides the segment in half and figures out which contains Y. Then it divides that half in half again. And again. This continues until X is determined as accurately as possible given the numerical precision of the computer. In rare cases, it is possible that Y is not monotonic within the range determined in step 1. In this case, Prism uses linear interpolation rather than binary bisection.

 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.