# How do I use LsqFit to fit points with an associated error?

**URL:** <https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291>\
**Category:** General Usage\
**Tags:** package, curve-fitting, lsqfit\
**Created:** [October 5, 2022, 1:24pm UTC](https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291 "2022-10-05T13:24:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ultrapoci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultrapoci/32/25356_2.png) [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Post date:** [October 5, 2022, 8:32pm UTC](https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291/3 "2022-10-05T20:32:07Z")

</div>

Nevermind, I found [this post](https://discourse.julialang.org/t/weighted-linear-regression-with-confidence-interval-fitted-to-error-bars/60743/6) that explains how to do it. Basically, I don’t have to normalize the vector of weights. I simply take the inverse squared of each measurement error.

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-use-lsqfit-to-fit-points-with-an-associated-error/88291)._
