title: Probability density function for a set of values using numpy
body: <p>Below is the data for which I want to plot the PDF.
  <a href="https://gist.github.com/ecenm/cbbdcea724e199dc60fe4a38b7791eb8#file-64_general-out" rel="nofollow noreferrer">https://gist.github.com/ecenm/cbbdcea724e199dc60fe4a38b7791eb8#file-64_general-out</a></p>
  
  <p>Below is the script</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import pylab
  
  data = np.loadtxt('64_general.out')
  H,X1 = np.histogram( data, bins = 10, normed = True, density = True) # Is this the right way to get the PDF ?
  plt.xlabel('Latency')
  plt.ylabel('PDF')
  plt.title('PDF of latency values')
  
  plt.plot(X1[1:], H)
  plt.show()
  </code></pre>
  
  <p>When I plot the above, I get the following. </p>
  
  <ol>
  <li>Is the above the correct way to calculate the PDF of a range of values</li>
  <li>Is there any other way to confirm that the results I get is the actual PDF. For example, how can show the area under pdf = 1 for my case. </li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/qEAty.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qEAty.png" alt="enter image description here"></a></p>