Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 백준
- 포인터
- const
- programming
- function
- string
- Pre-processing
- pointer
- Deep Learning
- baekjoon
- predictive analysis
- 함수
- 알고리즘
- raw data
- pass by reference
- 문자열
- 오블완
- Class
- 파이썬
- vscode
- Object Oriented Programming
- 반복문
- OOP
- Python
- C++
- array
- Data Science
- 배열
- 티스토리챌린지
- assignment operator
Archives
- Today
- Total
Channi Studies
Slope and Y-intercept of The Regression Line | 회귀선의 기울기와 y절편 본문
Data Science/개념과 용어
Slope and Y-intercept of The Regression Line | 회귀선의 기울기와 y절편
Chan Lee 2024. 11. 25. 15:33In a simple linear regression line (LMS), the regression line can be expressed as following equation:
y = ax + b
where
- y = The variable that you want to predict (예측하고 싶은 값) | Dependent variable (종속 변수)
- x = The variable that you are using to predict (예측에 사용하는 값) | Independent variable (독립 변수)
- a = Slope (기울기)
- b = y-intercept (y 절편)
그렇다면, y = ax+b 에서 slope(a)와 y-intercept(b)는 어떻게 구하는지 알아보겠습니다.
Recall,
r (correlation coefficient) = Average of product of (x in standard units) and (y in standard units)
or in python <datascience>:

Then, the slope of the best fit line is:
Slope (a) = r * (standard deviation of y) / (standard deviation of x)
That is,
a = r * SD_y / SD_x (*)
where
- r = correlation coefficient
- SD_y = standard deviation of y
- SD_x = standard deviation of x
And, the y-intercept of the regression line is:
y-intercept (b) = (average of y) - (slope)(average of x)
That is,
b = y_average - a * x_average
where
- y_average = average of y
- x_average = average of x
- a = slope = r * SD_y / SD_x (*)
In summary, the equations for slope and y-intercept are in the following image:

'Data Science > 개념과 용어' 카테고리의 다른 글
Classification (Data Science), k-Nearest Neighbor Classifier (KNN) | 분류 (1) | 2024.11.29 |
---|---|
Trend, Pattern, and The Correlation Coefficient (r) (1) | 2024.11.15 |
How to Interpret Confidence Interval | 신뢰 구간의 해석 (2) | 2024.11.01 |
A/B Testing (0) | 2024.10.29 |
The Bootstrap Technique | 부트스트랩 (2) | 2024.10.23 |