title: Fit a power law to empirical data in Python
body: <p>I'm experimenting with fitting a power law to empirical data using the <a href="https://pypi.python.org/pypi/powerlaw">powerlaw</a> module. I have created the following data that follows a power law distribution of exponent 2:</p>
  
  <pre><code>x = range(1,1000)
  y = []
  
  for i in x:
      y.append(i**(-2))
  </code></pre>
  
  <p>I'm expecting the fitted power law to have an exponent of 2. However the resulting exponent deviates from the theoretical value a lot:</p>
  
  <pre><code>    fitted_pl = powerlaw.Fit(y)
  
      fitted_pl.alpha
      Out[115]: 1.4017584065981563
  </code></pre>
  
  <p>Could you please advise why this happens, or point out what I've done wrong here? </p>
  
  <p>Thank you for your kind answer!</p>