Decline Curve Statistics

Decline curve statistics quantify how well a forecast model matches observed production data. These objective functions are essential for:

  • Comparing multiple decline models to select the best fit
  • Validating curve-fitting results
  • Identifying periods where model assumptions break down

Sum of Squared Errors (SSE)

Theory

The Sum of Squared Errors measures the total squared deviation between observed and predicted values:

SSE=i=1n(qpredicted,iqobserved,i)2SSE = \sum_{i=1}^{n} (q_{predicted,i} - q_{observed,i})^2
Property Value
Range 0 to ∞
Best value 0 (perfect fit)
Units (rate units)²

Interpretation

SSE Interpretation
0 Perfect fit (rare with real data)
Low Good model match
High Poor fit or wrong model type

!!! warning "Scale Sensitivity" SSE is sensitive to the scale of the data. A well producing 10,000 bbl/day will have much larger SSE than one producing 100 bbl/day, even for the same relative fit quality.

Function

ComputeSse — Sum of squared errors

Parameters:

Parameter Description Type
observedValues Actual production rates Range or array
predictedValues Model-predicted rates Range or array

Returns: SSE value (scalar)


Log-Space SSE

Theory

Log-space SSE applies the SSE calculation to the logarithms of the values:

SSElog=i=1n(ln(qpredicted,i+ε)ln(qobserved,i+ε))2SSE_{log} = \sum_{i=1}^{n} \left(\ln(q_{predicted,i} + \varepsilon) - \ln(q_{observed,i} + \varepsilon)\right)^2

Where ε=109\varepsilon = 10^{-9} is a small constant to prevent ln(0)\ln(0).

Why Log-Space?

Log-space error offers several advantages for decline curve analysis:

Benefit Explanation
Scale invariance Treats 10% error the same at 10,000 or 100 bbl/day
Handles wide dynamic range Decline data spans orders of magnitude
Emphasizes late-time fit Low-rate tails contribute more relatively
Matches visual assessment Log-log plots weight errors more evenly

Function

ComputeLogSse — Log-space sum of squared errors

Parameters:

Parameter Description Type
observedValues Actual production rates Range or array
predictedValues Model-predicted rates Range or array

Returns: Log-space SSE value (scalar)


Weighted SSE

Theory

Weighted SSE allows assigning different importance to each data point:

SSEweighted=i=1nwi(qpredicted,iqobserved,i)2SSE_{weighted} = \sum_{i=1}^{n} w_i \cdot (q_{predicted,i} - q_{observed,i})^2

Where wi0w_i \geq 0 is the weight for sample ii.

Weight Applications

Weighting Strategy Use Case
Time-based wi=tiw_i = t_i emphasizes recent data
Inverse variance wi=1/σi2w_i = 1/\sigma_i^2 for heteroscedastic data
Quality flags wi=0w_i = 0 to exclude bad data points
Uniform wi=1w_i = 1 (equivalent to standard SSE)

Function

ComputeWeightedSse — Weighted sum of squared errors

Parameters:

Parameter Description Type
observedValues Actual production rates Range or array
predictedValues Model-predicted rates Range or array
weightsValues Per-sample weights (must be ≥ 0) Range or array

Returns: Weighted SSE value (scalar)


Weighted Log-Space SSE

Theory

Combines the benefits of log-space error with sample weighting:

SSEweighted,log=i=1nwi(ln(qpredicted,i+ε)ln(qobserved,i+ε))2SSE_{weighted,log} = \sum_{i=1}^{n} w_i \cdot \left(\ln(q_{predicted,i} + \varepsilon) - \ln(q_{observed,i} + \varepsilon)\right)^2

This is the default objective function used by Petroleum Office's curve fitting algorithms.

Function

ComputeWeightedLogSse — Weighted log-space SSE

Parameters:

Parameter Description Type
observedValues Actual production rates Range or array
predictedValues Model-predicted rates Range or array
weightsValues Per-sample weights (must be ≥ 0) Range or array

Returns: Weighted log-space SSE value (scalar)


Model Selection Guidelines

When to Use Each Metric

Metric Best For
SSE Quick comparisons, same well/scale
Log SSE Wide dynamic range, visual log-log match
Weighted SSE Data quality issues, emphasis control
Weighted Log SSE Production forecasting (default for fitting)

Converting SSE to Other Metrics

To derive commonly-used metrics from SSE:

Mean Squared Error (MSE):

MSE=SSEnMSE = \frac{SSE}{n}

Root Mean Squared Error (RMSE):

RMSE=SSEnRMSE = \sqrt{\frac{SSE}{n}}

Normalized RMSE:

NRMSE=RMSEqˉobservedNRMSE = \frac{RMSE}{\bar{q}_{observed}}

Troubleshooting

Large SSE Values

Symptom Likely Cause Solution
SSE >> 10⁶ Wrong model type Try different decline model
SSE increases late-time Interference/restimulation Fit subset of data
SSE high early Transient flow period Exclude early points

Array Length Mismatch

All input arrays must have the same length. If you get an error:

  • Check for blank cells in your data
  • Ensure observed and predicted ranges match exactly
  • Verify weight array (if used) has the same length

See Also

An unhandled error has occurred. Reload X