(1) Get the data for the dependent and independent variable in column format.
(2) Type in the data, either in comma separated or space separated format.
x data (comma or space separated)
y data (comma or space separated)
The independent variable is x, and the dependent variable is y. In order to compute the regression coefficients, the following table needs to be used:
Sum=xx2...xn∑xiyy2...yn∑yixyx2y2...xnyn∑xiyix2x22...xn2∑xi2y2y22...yn2∑yi2 Based on the above table, the following is calculated:
xˉ=n1i=1∑nxi, yˉ=i=1∑nyi
SSxx=i=1∑nxi2−n1(i=1∑nxi)2
SSyy=i=1∑nyi2−n1(i=1∑nyi)2
SSxy=i=1∑nxiyi−n1(i=1∑nxi)(i=1∑nyi)Therefore, based on the above calculations, the regression coefficients (the slope m, and the y-intercept n) are obtained as follows:
m=SxxSxy
n=yˉ−m⋅xˉ Therefore, we find that the regression equation is:
y=n+mx
The linear relationship between two variables is negative when one increases as the other decreases. For example, as values of x get larger values of y get smaller. This is also known as an indirect relationship.
y=n+mx,m<0 How regression line touches to Y-axis?
x=0:y=n Point (0,n)
Comments