title: What is first value that is passed into StatsModels predict function?
body: <p>I have the following OLS model from StatsModels:</p>
  
  <pre><code>X = df['Grade']
  y = df['Results']
  
  X = statsmodels.tools.tools.add_constant(X)
  
  mod = sm.OLS(y,X)
  results = mod.fit() 
  </code></pre>
  
  <p>When trying to predict a new Y value for an X value of 4, I have to pass the following:</p>
  
  <pre><code>results.predict([1,4])
  </code></pre>
  
  <p>I don't understand why an array with the first value being '1' needs to be passed in order for the predict function to work correctly. Why do I need to include a 1 instead of just saying:</p>
  
  <pre><code>results.predict([4])
  </code></pre>
  
  <p>I'm not clear on the concept at work here. Does anybody know what's going on?</p>