From Measured Stocks to Rates
A stock records an amount at a particular time: inventory, reservoir volume, or material in a storage system are examples. Its instantaneous rate of change describes how quickly that amount is increasing or decreasing at one moment. In a model, that rate is the derivative of the stock. In practice, however, measurements usually provide stock values at separated times, and each measurement may contain error.
Finite differences turn those separated values into rate estimates. Their interpretation depends on where the estimate is assigned, how far apart the observations are, and how large the measurement errors might be. A difference quotient is not automatically the true instantaneous rate; it is an estimate whose limitations should be made explicit.
One-Sided Finite Differences
For measurements at times \(t_i\) and \(t_{i+1}\), the forward difference is the change in measured stock divided by the elapsed time. It estimates the average rate over the interval \([t_i,t_{i+1}]\). When the stock is differentiable, the Mean Value Theorem says this average equals \(S'(c)\) for at least one time \(c\) strictly between the endpoints. It does not generally say that the average is the instantaneous rate at either endpoint.
The backward difference at \(t_i\) uses the observation immediately before it. Like the forward difference, it is an interval average; it is often used as an estimate of the rate at the later endpoint when no future observation is available. If observations are equally spaced by \(h\), the one-sided formulas become:
For a smooth stock, a forward difference assigned to its left endpoint has an error that is typically proportional to \(h\); the backward difference has a similar first-order error at its right endpoint. “Typically” matters: the size and direction of the error depend on how the rate itself is changing.
Centered Differences at Interior Times
When observations are available on both sides of \(t_i\), a centered difference estimates the rate at \(t_i\) using the change across the full interval from \(t_i-h\) to \(t_i+h\). The elapsed time across that interval is \(2h\), not \(h\).
Centering has an important accuracy advantage: if \(S\) has three continuous derivatives near \(t_i\), the leading error from curvature cancels. More precisely, if \(|S'''(t)|\leq M\) throughout the interval \([t_i-h,t_i+h]\), then using exact, error-free stock values gives:
This bound concerns approximation error from using observations at a nonzero distance. It does not include measurement noise. A centered estimate also requires observations on both sides of the time of interest, so it cannot be used at an endpoint unless additional data are available.
Why Centering Improves the Approximation
The reason for the improved accuracy is visible by expanding the stock around \(t_i\). Taylor’s theorem, with a remainder bounded using \(M\), gives:
Subtract the second expansion from the first. The common stock value cancels, as do the two terms involving \(S''(t_i)\). The remaining leading term is \(2hS'(t_i)\):
Divide by \(2h\). The triangle inequality gives \(|R_+-R_-|\leq |R_+|+|R_-|\leq Mh^3/3\). Therefore the error after division is at most \(Mh^2/6\), as claimed. This cancellation explains why the centered difference has an error of order \(h^2\), rather than order \(h\), for sufficiently smooth stocks.
Worked Example: Estimate a Reservoir’s Rate
Worked Example: Estimate a Reservoir’s Rate
Suppose reservoir measurements are \(51.2\) thousand cubic metres at day 2, \(55.1\) thousand cubic metres at day 4, and \(60.0\) thousand cubic metres at day 6. Estimate the instantaneous rate at day 4 using a centered difference.
The observations are two days apart on either side of day 4, so \(h=2\) days. The total time between the outer observations is \(2h=4\) days. Substitute the measured values:
The estimate is positive, indicating an increase in reservoir storage near day 4. As a check on the arithmetic, \(4\) days multiplied by the estimated average rate \(2.2\) thousand cubic metres per day gives \(8.8\) thousand cubic metres, the measured change between days 2 and 6. This check confirms the quotient calculation; it does not establish that the true instantaneous rate is exactly \(2.2\).
How Measurement Noise Enters the Estimate
Suppose each measurement error is bounded in magnitude by \(\delta\), so \(|\varepsilon_i|\leq\delta\). In a forward difference, the noise contribution is \((\varepsilon_{i+1}-\varepsilon_i)/h\). Its magnitude is at most \(2\delta/h\), since neither error can exceed \(\delta\) in magnitude. In a centered difference, the contribution is \((\varepsilon_{i+1}-\varepsilon_{i-1})/(2h)\), with magnitude at most \(\delta/h\).
These are worst-case bounds; actual errors may partly cancel. They show, however, that dividing by a smaller time spacing can magnify the effect of the same measurement uncertainty. For centered differences, the total error has two competing parts: approximation error grows with \(h^2\), while the worst-case noise contribution grows like \(1/h\).
Worked Example: Shorter Spacing Can Increase Noise
Worked Example: Shorter Spacing Can Increase Noise
Suppose the true stock is \(S(t)=100+3t\), in units of stock, with time measured in days. Its true rate is \(S'(t)=3\) stock units per day at every time. Consider a centered estimate at \(t=0\), with measured errors \(\varepsilon(-h)=-0.4\) and \(\varepsilon(h)=+0.4\) stock units.
The true endpoint difference is \(S(h)-S(-h)=(100+3h)-(100-3h)=6h\). The measured difference adds \(0.4-(-0.4)=0.8\). Thus the estimate is \( (6h+0.8)/(2h)=3+0.4/h\).
For \(h=1\) day, the estimate is \(3+0.4/1=3.4\) stock units per day. For \(h=0.25\) day, it is \(3+0.4/0.25=3+1.6=4.6\) stock units per day. In both calculations, the true stock change contributes exactly \(3\); the extra amount comes from measurement error. The smaller spacing produces the larger noise effect, as the \(\delta/h\) bound predicts. The calculation is checked by noting that the noise difference is \(0.8\), which contributes \(0.8/2=0.4\) at \(h=1\) and \(0.8/0.5=1.6\) at \(h=0.25\).
Choosing Spacing: A Tradeoff, Not a Rule to Use the Smallest Interval
With the assumptions in the error bound, the total guaranteed error is at most \(Mh^2/6+\delta/h\). Taking \(h\) very large reduces the relative effect of bounded noise but worsens the approximation to the instantaneous rate. Taking \(h\) very small improves the smooth-stock approximation but can amplify measurement noise. The spacing that is best in a particular application depends on both the noise level and how rapidly the stock’s rate changes.
Worked Example: Compare Spacing Choices with an Error Bound
Suppose \(\delta=0.02\) stock units and \(M=0.12\) stock units per day cubed. For a centered estimate, the bound is \(0.12h^2/6+0.02/h=0.02h^2+0.02/h\), in stock units per day.
For \(h=0.5\) day, the approximation part is \(0.02(0.5)^2=0.005\), and the noise part is \(0.02/0.5=0.04\). The total bound is \(0.005+0.04=0.045\) stock units per day.
For \(h=1\) day, the two parts are \(0.02(1)^2=0.02\) and \(0.02/1=0.02\). The total bound is \(0.04\) stock units per day.
The bound can be minimized over positive \(h\): differentiating \(0.02h^2+0.02/h\) gives \(0.04h-0.02/h^2\). Setting this derivative to zero yields \(0.04h^3=0.02\), or \(h^3=0.5\), so \(h\approx0.794\) day. At \(h=0.8\) day, the two parts are \(0.02(0.8)^2=0.0128\) and \(0.02/0.8=0.025\); the total is \(0.0378\) stock units per day. This is a bound-based comparison, not a guarantee that measurements at that spacing are available or that all modelling assumptions hold.
Unequal Observation Times
Measurements are not always equally spaced. For two observations at \(t_a\) and \(t_b\), the secant slope \((Y_b-Y_a)/(t_b-t_a)\) still estimates the average rate across that actual interval; the denominator must be the actual elapsed time. For an interior observation \(t_i\) with unequal spacings \(h_-=t_i-t_{i-1}\) and \(h_+=t_{i+1}-t_i\), simply applying the equal-spacing centered formula with one of those gaps is not justified.
One option that uses both neighboring secant slopes is the derivative of the quadratic interpolating the three measured values. Its estimate at \(t_i\) is:
When \(h_-=h_+=h\), the coefficient of \(Y_i\) becomes zero, and the other two coefficients become \(-1/(2h)\) and \(1/(2h)\), recovering the centered difference. For uneven data, spacing affects the weights as well as the time intervals used. Large weights can make measurement errors more influential, so the estimate should be interpreted alongside the actual gaps and the measurement precision.
A Common Mistake: Divide by the Wrong Time Span
In the reservoir example, the outer observations were four days apart. A common error is to divide their stock difference by the two-day gap from the center to either endpoint:
This treats the change between day 2 and day 6 as if it occurred over two days. The correct elapsed time is \(6-2=4\) days, so the centered estimate is \(8.8/4=2.2\) thousand cubic metres per day. Always match the denominator to the time span between the two observations in the numerator.
Interpreting an Estimated Rate
A finite-difference estimate is evidence about a rate, not a noise-free measurement of the derivative. When reporting one, identify the stock units and time units, the observation times used, and whether the estimate is one-sided or centered. If the measurements have known uncertainty, describe how that uncertainty affects the quotient. If the observations are far apart, remember that a secant slope averages behavior across the interval and may not represent a particular moment well.
Several estimates can also be compared as a diagnostic. A large change in estimated rates as the spacing changes may reflect real variation in the stock’s rate, measurement noise, or both. Finite differences alone do not decide which explanation is correct. The key is to treat the choice of spacing as part of the reasoning, rather than assuming that closer observations automatically provide a better rate estimate.
Check Your Understanding
Answer these questions using the definitions, calculations, and error reasoning above.
- Measurements are \(24\) units at time 3 and \(30\) units at time 5. What is the secant slope, including its units, and which time interval does it describe?
- Why does a centered difference use a denominator of \(2h\) when its observations are at \(t-h\) and \(t+h\)?
- If each measurement error is bounded by \(\delta\), what is the worst-case noise contribution bound for a centered difference with spacing \(h\)?
- For a smooth stock with \(|S'''|\leq M\), how does the centered-difference approximation error bound change when \(h\) is halved?
- Give one reason that decreasing observation spacing can make a rate estimate less reliable, even though the observations are closer to the target time.