title: How to compute the probability of a value given a list of samples from a distribution in Python?
body: <p>Not sure if this belongs in statistics, but I am trying to use Python to achieve this. I essentially just have a list of integers:</p>
  
  <pre><code>data = [300,244,543,1011,300,125,300 ... ]
  </code></pre>
  
  <p>And I would like to know the probability of a value occurring given this data.
  I graphed histograms of the data using matplotlib and obtained these:</p>
  
  <p><a href="https://i.stack.imgur.com/P1L9u.png" rel="noreferrer"><img src="https://i.stack.imgur.com/P1L9u.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1hnpO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1hnpO.png" alt="enter image description here"></a></p>
  
  <p>In the first graph, the numbers represent the amount of characters in a sequence. In the second graph, it's a measured amount of time in milliseconds. The minimum is greater than zero, but there isn't necessarily a maximum. The graphs were created using millions of examples, but I'm not sure I can make any other assumptions about the distribution. I want to know the probability of a new value given that I have a few million examples of values. In the first graph, I have a few million sequences of different lengths. Would like to know probability of a 200 length, for example.</p>
  
  <p>I know that for a continuous distribution the probability of any exact point is supposed to be zero, but given a stream of new values, I need be able to say how likely each value is. I've looked through some of the numpy/scipy probability density functions, but I'm not sure which to choose from or how to query for new values once I run something like scipy.stats.norm.pdf(data). It seems like different probability density functions will fit the data differently. Given the shape of the histograms I'm not sure how to decide which to use. </p>