Finding the value of chi-squared for a linear fit

6 ビュー (過去 30 日間)
Emilee Burris
Emilee Burris 2019 年 3 月 21 日
回答済み: dpb 2019 年 3 月 21 日
How do you use matlab to derive a formula for making a linear fit to data with an intercept at the origin so that y=bx and then apply it to your model to fit a straight line through the origin to the data given below
Assume uniform uncertainties σi= 1.5 in yi
The how do you find the value of chi-squared for the fit?
and the uncertainties in b and R^2.
Data:
xi= 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
yi= 5.3, 14.4, 20.7, 30.1, 35.0, 41.3, 52.7, 55.7, 63.0, 72.1, 80.5, 87.9

回答 (1 件)

dpb
dpb 2019 年 3 月 21 日
mdl=fitlm(xi,yi,'intercept',false);

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by