Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: generating a continuous distribution (type Maxwell-Boltzmann) to generate random values

I want to generate a continuous distribution (type Maxwell-Boltzmann) with Python. I mean, I want to create the distribution in order to generate random values.

This link kinda helps:

Create a continuous distribution in python

I don't have idea where to start, I know the analytical function that generates the distribution but I don't know how to implement that. Can anyone help me?

Thanks in advance

like image 291
dapias Avatar asked Aug 26 '13 04:08

dapias


1 Answers

scipy has a Maxwell-Boltzmann distribution built-in, maxwell, and its pdf method will give you the probability density function.

like image 93
tom10 Avatar answered Nov 15 '22 17:11

tom10