How can I build a regression model that accounts for the known error ranges (95% confidence intervals) in my independent variable samples?

I am not an expert in statistics, but I have the impression that there is still information in wide confidence interval samples but they should not be as important as samples with a narrow confidence interval.

  • $\begingroup$ what are you trying to accomplish? $\endgroup$
    – rep_ho
    Sep 28, 2021 at 18:02
  • $\begingroup$ I'm trying to include helpful information from all the measurements but not overweight measurements that have high error. Specifically, these are surface carbon storage values. There are accurate measurements of surface carbon in the pantropics with an error of +/- 3% of the value in a 95% confidence interval. But in the pacific northwest I have measurement errors of up to +/- 80%. Rather than throw these values out, I thought there must be some way to include the information in them as part of the model. $\endgroup$
    – Rich
    Sep 28, 2021 at 18:12
  • $\begingroup$ If you're using Python and are interested in learning PyMC3, here's a Discourse thread on this topic: discourse.pymc.io/t/errors-in-variables-model-in-pymc3/3519 $\endgroup$ Sep 29, 2021 at 4:14

1 Answer 1


This can be accomplished using measurement error models, errors in variables models, or latent variables models. I don't know if those are fundamentally different approaches or just different names for the same concept. These will help you estimate the effect of that unobserved "noiseless variable" if you observed only its noisy version. If your goal is to make a predictive model, these models might not be helpful since the predictions will be made only based on the noisy variable.

  • $\begingroup$ OP might consider using a Botorch model within the Adaptive Experimental Platform and specifying uncertainty either as a constant or on a point-by-point basis. ax.dev/docs/models.html $\endgroup$
    – Sterling
    Mar 23 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.