Finding uncertainty of a slope

18 views (last 30 days)
Bugrahan Guner
Bugrahan Guner on 28 Aug 2023
Answered: Star Strider on 28 Aug 2023
I have 5 data sets. After I average each one of them within themselves, I fit a line to the resultant 5 data points. I would love to receive some suggestions toward how to find the +- uncertainty for the slope of this line and how to achieve it through MATLAB.
Thanks in advance!

Answers (1)

Star Strider
Star Strider on 28 Aug 2023
This is straightforward if you have the Statistics and Machine Learning Toolbox. Use regress to get the confidence intervals. The fitlm function provides probability values (that the slope and other parameters individually are different from zero) however not the confidence intervals.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!