python - Does anyone have example code of using scipy.stats.distributions? -


I understand how to use scipy.distributions package and wonder what post some example code for me Could. It seems that whatever I want, it seems to do everything, how can I use it?

I need to produce two distributions, one log-normal and one poseon. I know Vicharan and Lambda for each.

Links to resources will work right away.

I think that you mean distribution in scipy.stats . Calculate distribution to create, to generate random variations and PDF:

Python 2.5.1 (r251: of 54,863, Feb. 4, 2008, 21:48:13) [GCC 4.0.1 (Apple Inc. Construction 5465)] For more information on Darwin, type "help", "copyright", "credit" or "license".

  & gt; & Gt; & Gt; Cesipi.State Import Possession, Lognorum & gt; & Gt; & Gt; MyShape = 5; MyMu = 10> and gt; & Gt; Ln = logarom (myShape) & gt; & Gt; & Gt; P = Poison (Maemu)> & Gt; & Gt; Ln.rvs ((10,)) # 10 RV from the LN array. (# 2k09l648l2e + 00, 3k29062874-0l, Lk2245394le-03, 3k80l0l527e + 02, 7k67464002-02, 2k53530952e + 0l, +03 from Lk4l850880e, 8k36347923e + 03, 8k69209870 O + 03, 1.64317413 to 01 ]) & Gt; & Gt; & Gt; P.rvs ((10,)) 10 RV from P array. (# 8, 9, 7, 12, 6, 13, 11, 11, 10, 8]) # gt; & Gt; & Gt; Ln.pdf (3) #lognorm x = 3 array on PDF (0.02596183475208955)  

Other methods (and the rest of the scipy.stats document may be) new Found on the site.


Comments