Skip to content

Number simulator for Normal, Poisson or Binomial distributions.

License

Notifications You must be signed in to change notification settings

Roundy123/simNum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

simNum is a number simulator for Normal, Poisson or Binomial distributions.

Code Example

import simNum

d = simNum.simDist(10,'normal')

print(d)

Dependencies

NumPy

Installation

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.

  1. Download the package here
  2. Unzip the file
  3. Change directory in your terminal to the directory containing the downloaded setup.py file
  4. Type python setup.py install and press return

Documentation

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.

Contributors

I highly doubt anyone will want to contribute to this project but please feel free!

License

MIT

About

Number simulator for Normal, Poisson or Binomial distributions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published