0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Java 最小二乗法で回帰係数を求めたい

Posted at

~前提~
(x,y)の情報が複数与えられている

考え方
1.それぞれの変数の平均値を求める
2.それぞれの変数の偏差(数値 - 平均値)を求める
3.変数 x の分散(偏差の二乗平均)を求める
4.共分散(偏差の積の平均)を求める
5.共分散を変数 x の分散で割って回帰直線の傾きを得る
6.2 つの変数の平均値と傾きから、回帰直線の y 切片を得る

参考
最小二乗法の意味と計算方法 - 回帰直線の求め方
https://sci-pursuit.com/math/statistics/least-square-method.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?