Skip to main content

A statistical package to compute Mean and Standard deviation on of various Probability distributions

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sp_distributions-0.1.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page