Skip to content

This is a statistical Python library, to compute Mean and Standard deviation on of various Probability distributions.

License

Notifications You must be signed in to change notification settings

SandipPalit/sp_distributions

Repository files navigation

This is a statistical Python library, to compute Mean and Standard deviation on of various Probability distributions, like Gaussian Distribution and Binomial distribution. This package is developed by Sandip Palit.

Install statement: pip install sp_distributions

Import statement :

Gaussian: from sp_distributions import Gaussian

Binomial: from sp_distributions import Binomial

Initialise statement :

Gaussian: g=Gaussian(5,3) (mu=5, sigma=3)

Binomial: b=Binomial(0.5,3) (p=0.5, n=3)

Methods :

calculate_mean()

Function to calculate the mean of the data set.

Args: None

Returns: float

calculate_stdev()

Function to calculate the standard deviation of the data set.

Args: None

Returns: float

read_data_file()

Function to read in data from a txt file. The txt file should have one number (float) per line. After reading in the file, the mean and standard deviation are calculated

Args: file_name (string)

Returns: None

plot()

Function to output a plotting of the instance variable data using matplotlib pyplot library.

Args: None

Returns: None

pdf():

Probability density function calculator for the gaussian distribution, on a specific point (x).

Args: x (float)

Returns: float

plot_pdf():

Function to plot the normalized graph of the data and a plot of the probability density function along the same range.

Args: n_spaces (int)

Returns: x values (list), y values (list)

You can also add together two objects of a distribution by using + operator.

About

This is a statistical Python library, to compute Mean and Standard deviation on of various Probability distributions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages