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 details)

Uploaded Source

File details

Details for the file sp_distributions-0.1.2.tar.gz.

File metadata

  • Download URL: sp_distributions-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.17

File hashes

Hashes for sp_distributions-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7e762df2ba1a14a99be7c08b0ad6b9a50bb4d2f2565449e602dc2f34a42cd0f3
MD5 d09d29231957e239bcfcc17dc446033e
BLAKE2b-256 31495672cd749dada1bdc5fdc23fac45ea1f12ead028a3f7acb8d4046a2edba4

See more details on using hashes here.

Provenance

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