Re: [Numpy-discussion] Statistical distributions on samples

2011-08-19 Thread alan
I have applied the update to the documentation (although that function needs a general rewrite - later...) On Mon, Aug 15, 2011 at 8:53 AM, Andrea Gavana andrea.gav...@gmail.comwrote: Hi Chris and All, On 12 August 2011 16:53, Christopher Jordan-Squire wrote: Hi Andrea--An easy way to get

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-15 Thread Andrea Gavana
Hi Chris Brennan, On 15 August 2011 00:59, Brennan Williams wrote: You can use scipy.stats.truncnorm, can't you? Unless I misread, you want to sample a normal distribution but with generated values only being within a specified range? However you also say you want to do this with triangular

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-15 Thread Andrea Gavana
Hi Chris and All, On 12 August 2011 16:53, Christopher Jordan-Squire wrote: Hi Andrea--An easy way to get something like this would be import numpy as np import scipy.stats as stats sigma = #some reasonable standard deviation for your application x = stats.norm.rvs(size=1000, loc=125,

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-15 Thread Christopher Jordan-Squire
On Mon, Aug 15, 2011 at 8:53 AM, Andrea Gavana andrea.gav...@gmail.comwrote: Hi Chris and All, On 12 August 2011 16:53, Christopher Jordan-Squire wrote: Hi Andrea--An easy way to get something like this would be import numpy as np import scipy.stats as stats sigma = #some

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-14 Thread Brennan Williams
You can use scipy.stats.truncnorm, can't you? Unless I misread, you want to sample a normal distribution but with generated values only being within a specified range? However you also say you want to do this with triangular and log normal and for these I presume the easiest way is to sample

[Numpy-discussion] Statistical distributions on samples

2011-08-12 Thread Andrea Gavana
Hi All, I am working on something that appeared to be a no-brainer issue (at the beginning), by my complete ignorance in statistics is overwhelming and I got stuck. What I am trying to do can be summarized as follows Let's assume that I have to generate a sample of a 1,000 values for a

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-12 Thread Christopher Jordan-Squire
Hi Andrea--An easy way to get something like this would be import numpy as np import scipy.stats as stats sigma = #some reasonable standard deviation for your application x = stats.norm.rvs(size=1000, loc=125, scale=sigma) x = x[x50] x = x[x200] That will give a roughly normal distribution to