Skip to content

StdAddn

Description

StdAddn performs standard addition calculations and returns the point estimate of the concentration along with its standard error and 95% confidence interval.

The method of standard additions is a technique in analytical chemistry in which known amounts of analyte are added sequentially to a solution with an unknown concentration of the analyte, with measurements taken after every addition. SLR regression is then applied to the measurements (which may be corrected for the effects of dilution) against the volume of added standard. Extrapolation to the X axis yields the volume of standard, V′V', that contains the same quantity of analyte as in the original sample, which can then be used to estimate its original concentration.

This is a form of inverse regression but it is a little different from PolyInv because it doesn’t involve an additional measurement.

Syntax

StdAddn(Y, Vstd, Va, Cstd) where

  • Y is a column or row vector of the measurements after the additions of standard. Any dilution correction should be applied before passing it to the function.
  • Vstd is the volume of added standards as a column or row vector; these are the X values in the standard addition plot
  • Va is the volume of the original sample, before addition of standard. Vstd and Va should be in the same units.
  • Cstd is the concentration of standard in units compatible with the volume units

The function returns a five-element row array with the following elements:

  1. The point estimate of the analyte concentration in the original sample, in the same units as Cstd
  2. The standard error of the point estimate.
  3. The 95% margin of error (MOE) of the point estimate.
  4. The exact lower bound of the 95% confidence interval.
  5. The exact upper bound of the 95% confidence interval.

The 2nd and 3rd items are approximations obtained by error propagation while the last two items are exact values obtained by using Fieller’s equation for inverse regression.

Source Code

StdAddn = LAMBDA(
    Y, // column/row vector measured signals
    Vstd, // column/row vector of volumes of added standard (same units as Va)
    // Y and Vstd are filtered to contain only numeric values
    Va, // volume of "unknown" solution containing analyte (same units as Vstd)
    Cstd, // concentration of the standard solution added to the "unknown"
    LET(
        Yn, TOCOL(FILTER(Y, ISNUMBER(Y) * ISNUMBER(Vstd))),
        Vn, TOCOL(FILTER(Vstd, ISNUMBER(Y) * ISNUMBER(Vstd))),
        // get slope and intercept of data, then calc V'
        b_0, INTERCEPT(Yn, Vn),
        b_1, SLOPE(Yn, Vn),
        Vprime, b_0 / b_1,
        // now calculate its uncertainty
        n, COUNT(Yn),
        sres, STEYX(Yn, Vn),
        Vbar, AVERAGE(Vn),
        Sxx, DEVSQ(Vn),
        se_prime, sres / b_1 * SQRT(1 / n + (Vprime + Vbar) ^ 2 / Sxx), //extrapolation to x-axis
        // calculate conc and its uncertainty
        Ca, Cstd * Vprime / Va,
        se_Ca, Cstd * se_prime / Va,
        tcrit, T.INV.2T(5%, n-2),
        MOE, tcrit * se_Ca,
        // now calculate the bounds of the exact 95% CI
        // first calc the std err of the slope
        se_b1, sres / SQRT(Sxx),
        // now a convenience term (approx CI assumes g = 0)
        g, (tcrit/(b_1/se_b1))^2,
        // 1st two terms in the numerator of eqn
        num_1, (Vprime + Vbar) * g,
        num_2, tcrit*sres/ABS(b_1) * SQRT((1-g)/n + (Vprime+Vbar)^2/Sxx),
        // upper and lower bounds of 95% CI of V'
        V_U, Vprime + (num_1 + num_2) / (1-g),
        V_L, Vprime + (num_1 - num_2) / (1-g),
        // convert V' CI to concs in output
        HSTACK(Ca, se_Ca, MOE, V_L * Cstd/Va, V_U * Cstd/Va)
    )
);