title: scipy linregress: computing only scaling/slope parameter with intercept fixed at 0
body: <p>I am trying to use <a href="http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.stats.linregress.html" rel="nofollow">scipy.stats.linregress</a> to compute a scaling factor between two sets of data in the least square sense. However, it gives me an intercept despite the fact that the input <code>xi</code> variable is a vector and not a <code>n X 2</code> matrix. </p>
  
  <p>So, a simple code is as follows:</p>
  
  <pre><code>from scipy import stats
  from numpy import arrange,array
  
  y = [0, 11, 19, 28, 41, 49, 62, 75, 81]
  xi = arange(0,9)
  
  scale, intercept, r_value, p_value, std_err = stats.linregress(xi,y)
  </code></pre>
  
  <p>Running this, I get the scale as 10.383 but I also get an intercept of -0.86. How can I tell it to fit only the scaling parameter and the intercept should be kept zero. </p>