2. Calibration Curve
The calibration curve is the functional relationship between the observed signal ($y$) and the quantity or condition that produces it ($x$), such as the concentration of an analyte in chemical assays. Simple linear regression is generally used. When the residuals do not have constant variance (heteroscedasticity), weighted linear regression is adopted.
Input fields
| Field | Description |
|---|---|
| Response variable | Column with the measured signal ($y$). |
| Explanatory variable | Column with the reference quantity ($x$). |
| Linear / Polynomial | Model $y = \beta_0 + \beta_1 x$ or polynomial, with the Polynomial order (for example, 2 for $y = \beta_0 + \beta_1 x + \beta_2 x^2$). |
| No intercept | Fits the model without $\beta_0$. |
| Weights | No weights, $1/x$, $1/x^2$, $1/y$, $1/y^2$, $1/s^2$, or a column of weights. |
| Trust level | Confidence level of the intervals. The default is 0.95. |
| Scatter plot | Plot of the data with the fitted line and the confidence interval. |
| Prediction values | Fitted values, intervals, and standard deviations for each observation. |
| Forecast values (new data) | Forecast of the response for the values typed in New values of the explanatory variable, separated by spaces. |
| Limit tolerance | Upper tolerance limits (95% and 99%) and the MRL (maximum residue limit) as a reference in the plot. |
| Calibration curve uncertainty | Methods for the uncertainty due to the curve: Naive, Prediction Interval, Projection, Delta, and Fieller. |
| Diagnostics | Residual analysis, lack-of-fit test, and outliers and influential points. |
Details
In weighted regression, the coefficients minimize $\sum w_i \left(y_i - \beta_0 - \beta_1 x_i\right)^2$, where $w_i$ is the weight of each observation. Weights such as $1/x$ or $1/x^2$ give less importance to the points with larger variance, usually those with higher values.
The diagnostics check the model assumptions:
- Lack-of-fit test: when there are replicates at each level of $x$, it compares the pure error with the deviation from the line. A high p-value indicates that the linear model is adequate.
- Outliers and influential points: standardized and studentized residuals (outliers in $y$), leverage $h_{ii}$ (outliers in $x$), and the DFFITS, Cook’s distance, and DFBETAS measures, each with its own criterion.
Example 1: hardness as a function of temperature
In a heat treatment, we want to establish the relationship between the oven temperature and the hardness of a part. Five parts were measured at each temperature: 220, 225, 230, and 235 °C.
The data are in the columns Dureza and Temperatura. Load the example Metrologia — curva calibracao dureza in Data upload › Examples.

Open Metrology › Calibration Curve and fill in:
- Response variable:
Dureza; Explanatory variable:Temperatura. - Check Linear, Weights:
No weights, Trust level:0.95. - Check Scatter plot and click Calculate.

Results
Anova table
| G.L. | Sum of Squares | Mean Square | Stat. F | P-value | |
|---|---|---|---|---|---|
| Temperatura | 1 | 665.64 | 665.64 | 291.0962 | 0 |
| Residuals | 18 | 41.16 | 2.2867 | NA | NA |
Exploratory Analysis (residuals)
| Minimum | 1Q | Median | Mean | 3Q | Maximum |
|---|---|---|---|---|---|
| -2.82 | -0.82 | 0.18 | 0 | 1.02 | 3.02 |
Coefficients
| Estimate | Standard Deviation | Stat. t | P-value | |
|---|---|---|---|---|
| Intercept | 364.18 | 13.7649 | 26.4571 | 0 |
| Temperatura | -1.032 | 0.0605 | -17.0615 | 0 |
Descriptive Measure of Fit Quality
| Residual Standard Deviation | Degrees of Freedom | R^2 | R^2 Adjusted |
|---|---|---|---|
| 1.5122 | 18 | 0.9418 | 0.9385 |
Confidence interval for the parameters
| Inferior limit | Upper limit | |
|---|---|---|
| Intercept | 335.261 | 393.099 |
| Temperatura | -1.1591 | -0.9049 |
Interpretation
- In the ANOVA, the p-value is practically zero: at the 5% level, temperature has a significant linear relationship with hardness.
- The fitted curve is $\text{Dureza} = 364.18 - 1.032 \times \text{Temperatura}$. The negative coefficient indicates that, within the range studied, each additional degree reduces hardness by about 1.03 units.
- The adjusted $R^2$ of 0.9385 indicates that the model explains about 94% of the variation in hardness.
Example 2: weighted curve with forecast and diagnostics
With the same data, we fit the curve with weight $w = 1/x$, compute the predicted hardness for temperatures of 222 °C and 232 °C, and run the model diagnostics.
Repeat the settings of Example 1 and:
- In Weights, choose
1/x. - Check Prediction values and Forecast values (new data) and type
222 232in New values of the explanatory variable. - Check Limit tolerance and type
130in MRL. - Under diagnostics, check Lack-of-fit test and Outliers and influential points.
- Click Calculate.

Results
The system indicates the weight used (1/x) and shows the same tables as in Example 1 for the weighted model:
Coefficients
| Estimate | Standard Deviation | Stat. t | P-value | |
|---|---|---|---|---|
| Intercept | 363.7736 | 13.7419 | 26.4718 | 0 |
| Temperatura | -1.0302 | 0.0604 | -17.0502 | 0 |
Descriptive Measure of Fit Quality
| Residual Standard Deviation | Degrees of Freedom | R^2 | R^2 Adjusted |
|---|---|---|---|
| 0.1002 | 18 | 0.9417 | 0.9385 |
Prediction Interval (the system lists all 20 observations; below, one value per temperature, since rows with the same temperature have the same results)
| Temperatura | Fitted Value | Inferior limit | Upper limit | Standard Deviation | Limit Tolerance (95%) | Limit Tolerance (99%) |
|---|---|---|---|---|---|---|
| 220 | 137.1266 | 135.9531 | 138.3001 | 0.5585 | 138.2768 | 138.3528 |
| 225 | 131.9755 | 131.2052 | 132.7459 | 0.3667 | 132.7937 | 132.8703 |
| 230 | 126.8245 | 126.0399 | 127.609 | 0.3734 | 127.6543 | 127.7309 |
| 235 | 121.6734 | 120.472 | 122.8748 | 0.5719 | 122.8467 | 122.9227 |
Forecast Interval
| Temperatura | Fitted Value | Inferior limit | Upper limit | Standard Deviation | Limit Tolerance (95%) | Limit Tolerance (99%) | |
|---|---|---|---|---|---|---|---|
| 1 | 222 | 135.0662 | 134.0606 | 136.0717 | 0.1002 | 136.0597 | 136.1359 |
| 2 | 232 | 124.764 | 123.8184 | 125.7097 | 0.1002 | 125.707 | 125.7834 |
Lack of Fit Test
| DF | Sum of Squares | Mean Square | Stat. F | P-value | |
|---|---|---|---|---|---|
| Temperatura | 1 | 2.9169 | 2.9169 | 351.9527 | 0 |
| Residuals | 18 | 0.1806 | 0.01 | NA | NA |
| Lack of Fit | 2 | 0.048 | 0.024 | 2.896 | 0.0844 |
| Pure Error | 16 | 0.1326 | 0.0083 | NA | NA |
Outliers and influential points
| Observations | DFFITS | Criteria |
|---|---|---|
| 5 | -0.65 | ± 0.63 |
| 19 | -0.82 | ± 0.63 |
| Observations | DCOOK | Criteria |
|---|---|---|
| 19 | 0.2833 | 0.2 |
| Observations | DFBETA | Criteria |
|---|---|---|
| 5 | 0.5208 | 0.4472 |
| 19 | -0.6582 | 0.4472 |
Interpretation
- The coefficients of the weighted curve are very close to those of the unweighted curve: $\text{Dureza} = 363.77 - 1.0302 \times \text{Temperatura}$.
- The predicted hardness is 135.07 at 222 °C (interval from 134.06 to 136.07) and 124.76 at 232 °C (interval from 123.82 to 125.71).
- In the lack-of-fit test, the p-value is 0.0844. At the 5% level, there is no evidence of lack of fit: the linear model is adequate.
- Observations 5 (hardness 135 at 220 °C) and 19 (hardness 119 at 235 °C) exceed the DFFITS and DFBETAS criteria, and observation 19 also exceeds the Cook’s distance criterion. It is worth checking whether there was any problem with these measurements before removing them; influential points are not necessarily errors.
- The residual analysis (normality, homoscedasticity, and independence tests) is not available for weighted curves: if it is checked, the system displays a warning. To obtain it, use the unweighted curve.
References
- D. C. Montgomery and E. A. Peck (1992). Introduction to Linear Regression Analysis. 2nd ed. John Wiley & Sons.
- J. Neter, W. Wasserman and M. H. Kutner (1985). Applied Linear Statistical Models. 2nd ed. R. D. Irwin.
- T. S. Breusch and A. R. Pagan (1979). A Simple Test for Heteroscedasticity and Random Coefficient Variation. Econometrica, 47(5), 1287–1294.
- W. A. Wallis (1951). Tolerance Intervals for Linear Regression. Second Berkeley Symposium on Mathematical Statistics and Probability, 43–51.