http://excel.onushi.com/function/intercept.htm The value of INTERCEPT () described in.
As a result, A4 returns the intercept value of the linear regression line, 3.2.
It is -3.2 when calculated by the function (C implementation) for finding the intercept that we have.
The signs do not match.
I also tried to solve python study (introduction to scipy) with python. Reference http://akiyoko.hatenablog.jp/entry/2013/06/16/005946
http://ideone.com/OVtvzj
from scipy import stats
xs = [ 5, 10, 9 ]
ys = [ 2, 7, 7 ]
slope, intercept, r_value, _, _ = stats.linregress(xs, ys)
print "slope:", slope
print "intercept:", intercept
print "r_value:", r_value
result
Success time: 0.15 memory: 46904 signal:0
slope: 1.07142857143
intercept: -3.2380952381
r_value: 0.981980506062
The description on the web may be wrong, or the definition may be different. I was able to confirm that this C implementation function and python are consistent.
The last two of the python implementations slope, intercept, r_value, _, _
.
http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.linregress.html
It seems that pvalue and stderr are returned as tuples in the " _, _ "
part.
If you don't use it as a variable, you would write _
.
http://stackoverflow.com/questions/2745018/python-is-there-a-dont-care-symbol-for-tuple-assignments
_
is indeed a very popular choice for "a name which doesn't matter" -- it's a legal name, visually unobtrusive, etc.
However, be careful about the "_" idiom in GNU gettext. This information is up to this point because it is not related to me yet.
Recommended Posts