simNum is a number simulator for Normal, Poisson or Binomial distributions.
import simNum
d = simNum.simDist(10,'normal')
print(d)
This package can be installed using pip by simply running the line of code below in your terminal. Note you may need to add sudo to the beggining depending on your permissions setup.
pip install simNum
Alternatively if you'd like to install manually you can follow the steps below.
- Download the package here
- Unzip the file
- Change directory in your terminal to the directory containing the downloaded setup.py file
- Type
python setup.py install
and press return
The package only contains one function simDist()
which takes the following parameters:
simNum.simDist (samples,distribution,mean=0,stddev=1,lamb=1,trials=None,probability=None)
-
samples : int
The number of samples required.
-
distribution : str
Specifies the type of distribution 'normal', 'poisson' or 'binomial'.
-
stddev : float
Standard deviation (spread or “width”) of the distribution.
-
lamb : float
This parameter is only used for the poisson distribution. Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size.
-
trials : int
This parameter is only used for the binomial distribution. Parameter of the distribution, >= 0. Floats are also accepted, but they will be truncated to integers.
-
probability : float
This parameter is only used for the binomial distribution. Parameter of the distribution, >= 0 and <=1.
Further documention for the parameters associated with each distribution can be found here: normal, binomial, poisson.
I highly doubt anyone will want to contribute to this project but please feel free!