In most experiments, the dependent variable (Y) carries the main uncertainty, while the independent variable (X) is set or controlled directly and is therefore much more precise.
Accordingly, most fitting algorithms assume no uncertainty in X, minimising only the residual deviations in Y.
When to consider X errors
Usually, ignoring X uncertainty makes little practical difference — particularly when the X uncertainties are small or uniform.
However, there are cases where including X weighting is important.
A typical example is peak fitting, where uncertainty in the peak position affects the accuracy of the result.
In such cases, enabling X errors allows the fitting algorithm to account for both vertical and horizontal deviations.
Enabling X errors in CFTool
To include X uncertainties:
-
Just below the Control Ribbon, click the Enable X Errors button.
-
This automatically switches the fitting algorithm to Orthogonal Distance (OD) mode.
-
The Apply Weights (X) checkbox becomes active.
-
-
Tick Apply Weights (X) to include X uncertainties in the fit.
-
The Edit Window will appear, allowing you to enter σx values (the estimated uncertainty in each X point).
You can then choose how these values are used:
-
X-weighting ON – X uncertainties affect both the fit and the reported coefficient errors.
-
X-weighting OFF – X uncertainties are plotted as X-error bars only; they are not used in weighting or uncertainty calculations.
Once entered, σx values can be modified through the Edit Window and are stored in the project file whenever x-errors remain enabled.
If you disable x-errors, CFTool will warn you that the X-Sigma values will be lost and give you the option to save the project before continuing.
Using orthogonal distance fitting
When X Errors are enabled, CFTool automatically switches to the Orthogonal Distance (OD) fitting algorithm.
This method minimises the shortest (orthogonal) distance between each data point and the fitted curve, taking into account uncertainties in both X and Y.
Tip: OD fitting gives each point an extra degree of freedom.
Over-estimated X uncertainties can allow the function to shift laterally, especially when Y-weights are also applied, leading to unrealistic fits.
Use X weighting only when the X uncertainties are meaningful and well estimated.
Residuals display
Even when X weighting is applied, the residuals plot still shows only the Y-component of the residuals (the deviation in Y).
This makes it easier to compare results with ordinary Y-only fits.
Best practice
When to enable X errors
✅ Use X errors only when the uncertainty in the X-values is significant and physically justified.
❌ Avoid enabling X weighting when the X-values are set precisely (e.g. voltage, time, temperature steps).
⚠️ Be cautious when using both X and Y weighting — overestimated uncertainties can make the fit unstable.
💾 Always save the project before disabling X errors to avoid losing the X-Sigma values.