Curve Fitting Toolbox: Worked examples

Complete walkthroughs with scientific context, equations, sample data, and fitted outcomes across all six included model families.

← Curve Fitting Toolbox overview · Getting started · Modeling guide · Methods guide · Reference

Overview of included models

The Curve Fitting Toolbox comes pre-loaded with six canonical model families representing major problem archetypes in biochemistry, pharmacology, physics, materials science, spectroscopy, and engineering:

  1. Michaelis-Menten: Substrate saturation kinetics in enzyme biochemistry.
  2. Exponential Decay: First-order radioactive decay and pharmacokinetic drug clearance.
  3. Cubic Polynomial: Empirical thermodynamic expansion and mechanical deformation.
  4. Gaussian Peak: Chromatographic retention and spectroscopic absorbance profiling.
  5. 4-Parameter Logistic (4PL): Immunoassay and cell-based sigmoidal dose-response bioassays.
  6. Power Law: Allometric biological scaling and fluid dynamic drag laws.

Each model is configured on the Data and Parameters sheets and can be fitted immediately by selecting its ID in Start!B6.


1. Enzyme kinetics: Michaelis-Menten saturation

Scientific context

The Henri-Michaelis-Menten equation is the foundational model of enzyme kinetics. It describes how the initial reaction velocity \(v\) of an enzyme-catalyzed reaction varies with the concentration of substrate \([S]\). At low substrate levels, the reaction rate increases linearly (first-order kinetics); at high substrate levels, the enzyme active sites become saturated, approaching an asymptotic maximum velocity \(V_{\max}\) (zero-order kinetics).

Mathematical formulation

\[v = \frac{V_{\max} [S]}{K_m + [S]}\]

  • \(V_{\max}\): Maximum asymptotic reaction velocity (\(\mu\text{mol} / \text{min}\)).
  • \(K_m\): Michaelis constant (mM), representing the substrate concentration at which \(v = V_{\max} / 2\).

Sample data (Data!A5:E14)

Model            X (mM)    Y (umol/min)    Weight    Sigma
michaelis_menten    0.5            12.6       1.0      0.5
michaelis_menten    1.0            20.3       1.0      0.5
michaelis_menten    2.0            35.3       1.0      0.5
michaelis_menten    3.0            42.1       1.0      0.5
michaelis_menten    5.0            55.3       1.0      0.5
michaelis_menten    7.0            61.0       1.0      0.5
michaelis_menten   10.0            69.7       1.0      0.5
michaelis_menten   15.0            74.3       1.0      0.5
michaelis_menten   20.0            79.0       1.0      0.5

Initial parameters & bounds (Parameters!A5:G7)

  • Vmax: Initial = 85.0, Bounds = [0.1, 500.0], Fixed = FALSE
  • Km: Initial = 4.0, Bounds = [0.01, 100.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 6.41 (6.4062), RMSE ≈ 0.8437, \(R^2 > 0.998\) (\(R^2 = 0.9986\)), Adjusted \(R^2 = 0.9984\), Residual DoF = 7.
  • Estimated Parameters:
    • \(V_{\max} \approx 91.93 \pm 1.14\) (95% CI: \([89.23, 94.62]\), \(t = 80.69\), \(p < 0.0001\))
    • \(K_m \approx 3.38 \pm 0.13\) (95% CI: \([3.08, 3.69]\), \(t = 26.33\), \(p < 0.0001\))

Interpretation

The enzyme reaches half-maximal saturation at a substrate concentration of \(K_m \approx 3.38\text{ mM}\), with an ultimate catalytic capacity of \(91.93\ \mu\text{mol/min}\). In the Diagnostics suite, 6 checks report PASS while Residual Autocorrelation reports WARN (\(d = 3.6039\), due to alternating residual signs in small sample \(N=9\)).


2. Radioactive decay & pharmacokinetics: Exponential decay

Scientific context

First-order kinetics govern radioactive decay of unstable isotopes (e.g. Iodine-131, Carbon-14) and one-compartment pharmacokinetic clearance of circulating drugs following intravenous administration. The rate of loss is directly proportional to the quantity remaining.

Mathematical formulation

\[y(t) = y_0 e^{-k t}\]

  • \(y_0\): Initial activity or drug concentration at time \(t = 0\).
  • \(k\): First-order elimination rate constant (\(\text{time}^{-1}\)).
  • Elimination half-life: \(t_{1/2} = \frac{\ln 2}{k} \approx \frac{0.69315}{k}\).

Sample data (Data!A15:E21)

Model                X (hours)    Y (activity)    Weight    Sigma
exponential_decay          0.0           100.0       1.0      1.0
exponential_decay          1.0            60.5       1.0      1.0
exponential_decay          2.0            36.8       1.0      1.0
exponential_decay          3.0            22.4       1.0      1.0
exponential_decay          4.0            13.5       1.0      1.0
exponential_decay          5.0             8.2       1.0      1.0
exponential_decay          6.0             5.0       1.0      1.0

Initial parameters & bounds (Parameters!A8:G9)

  • y0: Initial = 100.0, Bounds = [0.0, 1000.0], Fixed = FALSE
  • k: Initial = 0.5, Bounds = [0.001, 10.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 0.0294, RMSE ≈ 0.0648, \(R^2 > 0.999\) (\(R^2 = 1.0000\)), Adjusted \(R^2 = 1.0000\), Residual DoF = 5.
  • Estimated Parameters:
    • \(y_0 \approx 99.95 \pm 0.07\) (95% CI: \([99.77, 100.14]\), \(t = 1395.8\), \(p < 0.0001\))
    • \(k \approx 0.5000 \pm 0.0007\) (95% CI: \([0.4983, 0.5017]\), \(t = 766.8\), \(p < 0.0001\))

Interpretation

The fitted decay constant \(k \approx 0.5000\text{ hr}^{-1}\) corresponds to a half-life of \(t_{1/2} = \frac{\ln 2}{0.5000} \approx 1.386\text{ hours}\). In the Diagnostics suite, Durbin-Watson statistic \(d = 2.5410\) reports WARN for possible residual autocorrelation (\(2.5 < d \le 3.0\)).


3. Materials science: Cubic thermal expansion

Scientific context

The dimensional change of structural alloys, ceramics, or polymers over broad temperature ranges often exhibits non-linear behavior with inflection points caused by lattice phase transformations. A 3rd-degree cubic polynomial provides a robust empirical representation.

Mathematical formulation

\[y(x) = a x^3 + b x^2 + c x + d\]

  • \(a\): Cubic curvature coefficient (\(\Delta L / \Delta T^3\)).
  • \(b\): Quadratic acceleration coefficient.
  • \(c\): Linear thermal expansion coefficient.
  • \(d\): Baseline dimension at reference temperature \(x = 0\).

Sample data (Data!A22:E27)

Model            X (deg C)    Y (expansion um)    Weight    Sigma
polynomial_3          -2.0               -11.0       1.0      0.5
polynomial_3          -1.0                 1.0       1.0      0.5
polynomial_3           0.0                 3.0       1.0      0.5
polynomial_3           1.0                 7.0       1.0      0.5
polynomial_3           2.0                25.0       1.0      0.5
polynomial_3           3.0                67.0       1.0      0.5

Initial parameters & bounds (Parameters!A10:G13)

  • a: Initial = 2.0, Bounds = [-100.0, 100.0], Fixed = FALSE
  • b: Initial = 1.0, Bounds = [-100.0, 100.0], Fixed = FALSE
  • c: Initial = 1.0, Bounds = [-100.0, 100.0], Fixed = FALSE
  • d: Initial = 3.0, Bounds = [-100.0, 100.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 0.1587, RMSE ≈ 0.1627, \(R^2 > 0.999\) (\(R^2 = 1.0000\)), Adjusted \(R^2 = 0.9999\), Residual DoF = 2.
  • Estimated Parameters:
    • \(a \approx 1.9074\) (\(1.9074 \pm 0.0350\), 95% CI: \([1.7568, 2.0580]\), \(t = 54.50\), \(p = 0.0003\))
    • \(b \approx 0.9603\) (\(0.9603 \pm 0.0699\), 95% CI: \([0.6597, 1.2609]\), \(t = 13.74\), \(p = 0.0053\))
    • \(c \approx 1.2910\) (\(1.2910 \pm 0.1712\), 95% CI: \([0.5544, 2.0276]\), \(t = 7.54\), \(p = 0.0171\))
    • \(d \approx 3.0635\) (\(3.0635 \pm 0.1911\), 95% CI: \([2.2411, 3.8859]\), \(t = 16.03\), \(p = 0.0039\))

Interpretation

The polynomial recovers the cubic trajectory across both negative and positive thermal domains (\(a \approx 1.91, b \approx 0.96, c \approx 1.29, d \approx 3.06\), close to nominal generating parameters \(2, 1, 1, 3\)) with minimal residual variance (SSE ≈ 0.1587, \(R^2 = 1.0000\)). In the Diagnostics suite, Durbin-Watson statistic \(d = 3.0016\) reports WARN due to alternating residual signs in small sample \(N=6\).


4. Spectroscopy & chromatography: Gaussian peak

Scientific context

Spectral absorption bands (UV-Vis, FTIR, Raman) and chromatographic elution peaks (HPLC, GC-MS) arise from statistical broadening mechanisms (Doppler broadening, instrumental dispersion, diffusion). The symmetrical Gaussian distribution models peak height, center retention time or wavelength, and band width.

Mathematical formulation

\[y(x) = \text{amp} \cdot \exp\left(-\frac{1}{2} \left(\frac{x - \text{mean}}{\text{std}}\right)^2\right)\]

  • \(\text{amp}\): Maximum peak height absorbance or signal intensity.
  • \(\text{mean}\): Peak center position (retention time in minutes, or absorption wavelength in nm).
  • \(\text{std}\): Peak standard deviation parameter (\(\sigma\)).
  • Full Width at Half Maximum: \(\text{FWHM} = 2 \sqrt{2 \ln 2} \cdot \text{std} \approx 2.3548 \cdot \text{std}\).
  • Integrated peak area: \(\text{Area} = \text{amp} \cdot \text{std} \cdot \sqrt{2\pi} \approx 2.5066 \cdot \text{amp} \cdot \text{std}\).

Sample data (Data!A28:E34)

Model            X (retention min)    Y (mAU)    Weight    Sigma
gaussian_peak                  1.0        2.1       1.0      0.2
gaussian_peak                  2.0        8.5       1.0      0.2
gaussian_peak                  3.0       35.2       1.0      0.2
gaussian_peak                  4.0       98.4       1.0      0.2
gaussian_peak                  5.0       36.1       1.0      0.2
gaussian_peak                  6.0        7.9       1.0      0.2
gaussian_peak                  7.0        2.0       1.0      0.2

Initial parameters & bounds (Parameters!A14:G16)

  • amp: Initial = 100.0, Bounds = [0.1, 1000.0], Fixed = FALSE
  • mean: Initial = 4.0, Bounds = [-100.0, 100.0], Fixed = FALSE
  • std: Initial = 0.8, Bounds = [0.01, 20.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 89.29 (89.2936), RMSE ≈ 3.5716, \(R^2 > 0.987\) (\(R^2 = 0.9876\)), Adjusted \(R^2 = 0.9814\), Residual DoF = 4.
  • Estimated Parameters:
    • \(\text{amp} \approx 97.6329\) (\(97.6329 \pm 4.7078\), 95% CI: \([84.5619, 110.7039]\), \(t = 20.74\), \(p < 0.0001\))
    • \(\text{mean} \approx 4.0057\) (\(4.0057 \pm 0.0463\), 95% CI: \([3.8773, 4.1342]\), \(t = 86.60\), \(p < 0.0001\))
    • \(\text{std} \approx 0.7179\) (\(0.7179 \pm 0.0369\), 95% CI: \([0.6154, 0.8204]\), \(t = 19.45\), \(p < 0.0001\))
    • Calculated \(\text{FWHM} \approx 1.6905\text{ min}\) (nominal \(\approx 1.8839\text{ min}\))
    • Calculated peak area \(\approx 175.69\text{ mAU}\cdot\text{min}\)

Interpretation

The peak center is precisely determined near \(4.01\text{ min}\) (\(\text{mean} \approx 4.01, \text{amp} \approx 97.63, \text{std} \approx 0.72\), SSE ≈ 89.29). In the Diagnostics suite, Durbin-Watson statistic \(d = 1.7652\) passes cleanly (PASS), confirming no significant residual autocorrelation (\(1.5 \le d \le 2.5\)).


5. Pharmacology & immunoassays: 4-Parameter Logistic (4PL)

Scientific context

The 4-Parameter Logistic (4PL) model is the standard international model for analyzing biological immunoassays (ELISA, RIA, ECL) and concentration-response relationships. It captures lower non-specific binding, upper saturated signal, drug potency (\(\text{EC}_{50}\)), and receptor binding cooperativity (Hill slope).

Mathematical formulation

\[y(x) = \text{bottom} + \frac{\text{top} - \text{bottom}}{1 + \left(\frac{\text{ec50}}{x}\right)^{\text{hill}}}\]

  • \(\text{bottom}\): Lower horizontal plateau (minimum baseline optical density or fluorescence).
  • \(\text{top}\): Upper horizontal plateau (maximum saturated signal).
  • \(\text{ec50}\): Half-maximal effective concentration (\(\mu\text{M}\) or \(\text{ng/mL}\)), representing drug potency.
  • \(\text{hill}\): Hill coefficient (slope factor). Positive values (\(> 0\)) describe increasing sigmoidal responses; values \(> 1\) reflect positive cooperativity.

Sample data (Data!A35:E40)

Model          X (dose uM)    Y (signal)    Weight    Sigma
logistic_4p            0.1           5.2       1.0      0.5
logistic_4p            0.5          12.1       1.0      0.5
logistic_4p            1.0          28.4       1.0      0.5
logistic_4p            2.0          68.2       1.0      0.5
logistic_4p            5.0          91.5       1.0      0.5
logistic_4p           10.0          96.8       1.0      0.5

Initial parameters & bounds (Parameters!A17:G20)

  • bottom: Initial = 5.0, Bounds = [0.0, 50.0], Fixed = FALSE
  • top: Initial = 100.0, Bounds = [50.0, 200.0], Fixed = FALSE
  • ec50: Initial = 1.5, Bounds = [0.01, 50.0], Fixed = FALSE
  • hill: Initial = 2.0, Bounds = [0.1, 10.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 6.05 (6.0546), RMSE ≈ 1.0045, \(R^2 > 0.999\) (\(R^2 = 0.9993\)), Adjusted \(R^2 = 0.9981\), Residual DoF = 2.
  • Estimated Parameters:
    • \(\text{bottom} \approx 5.8329\) (\(5.8329 \pm 1.5522\), 95% CI: \([-0.8456, 12.5113]\), \(t = 3.76\), \(p = 0.0641\))
    • \(\text{top} \approx 96.5639\) (\(96.5639 \pm 1.5587\), 95% CI: \([89.8574, 103.2703]\), \(t = 61.95\), \(p = 0.0003\))
    • \(\text{ec50} \approx 1.4982\) (\(1.4982 \pm 0.0520\), 95% CI: \([1.2745, 1.7219]\), \(t = 28.82\), \(p = 0.0012\))
    • \(\text{hill} \approx 2.5964\) (\(2.5964 \pm 0.2095\), 95% CI: \([1.6950, 3.4979]\), \(t = 12.39\), \(p = 0.0064\))

Interpretation

The drug candidate exhibits an \(\text{EC}_{50} \approx 1.50\ \mu\text{M}\) with Hill coefficient \(\text{hill} \approx 2.60\), lower plateau \(\text{bottom} \approx 5.83\), and upper plateau \(\text{top} \approx 96.56\) (SSE ≈ 6.05). In the Diagnostics suite, Durbin-Watson statistic \(d = 3.4197\) yields WARN due to alternating residual signs in small sample \(N=6\).


6. Allometry & scaling laws: Power law

Scientific context

Power laws govern scale-invariant phenomena across biology and physical sciences, including Kleiber’s law (metabolic rate scaling with body mass as \(M^{3/4}\)), aerodynamic boundary layers, and hydraulic river discharge geometry.

Mathematical formulation

\[y(x) = a \cdot x^b\]

  • \(a\): Prefactor scaling constant.
  • \(b\): Scaling exponent. When \(b > 1\), growth is superlinear; when \(0 < b < 1\), growth is sublinear.

Sample data (Data!A41:E45)

Model        X (mass kg)    Y (metabolic rate W)    Weight    Sigma
power_law            1.0                     2.5       1.0      0.2
power_law            2.0                     7.1       1.0      0.2
power_law            4.0                    20.0       1.0      0.2
power_law            8.0                    56.6       1.0      0.2
power_law           16.0                   160.0       1.0      0.2

Initial parameters & bounds (Parameters!A21:G22)

  • a: Initial = 2.5, Bounds = [0.01, 100.0], Fixed = FALSE
  • b: Initial = 1.5, Bounds = [0.01, 5.0], Fixed = FALSE

Fitted results

  • Status: OPTIMAL
  • Fit Summary: SSE ≈ 0.0000 (0.00076), RMSE ≈ 0.0123, \(R^2 \approx 1.000\) (\(R^2 = 1.0000\)), Adjusted \(R^2 = 1.0000\), Residual DoF = 3.
  • Estimated Parameters:
    • \(a \approx 2.5000\) (\(2.5045 \pm 0.0022\), 95% CI: \([2.4973, 2.5116]\), \(t = 1121.0\), \(p < 0.0001\))
    • \(b \approx 1.5000\) (\(1.4994 \pm 0.0003\), 95% CI: \([1.4983, 1.5004]\), \(t = 4518.3\), \(p < 0.0001\))

Interpretation

The solver accurately resolves the non-linear exponent \(b \approx 1.5000\) and scale factor \(a \approx 2.5000\) with negligible standard error (SSE ≈ 0.0000, \(R^2 \approx 1.000\)). In the Diagnostics suite, Durbin-Watson statistic \(d = 3.4227\) yields WARN due to alternating residual signs in small sample \(N=5\).