Skip to main content

logo

Python module that calculates the probability density or mass function, along with the median and standard deviation for numerical datasets exhibiting Gaussian or Binomial distributions.

Installation

pip install juan-stats
from juan_stats import *

Demo in Google Colab

Look the package in action here

Features Gaussian Distribution

  • Read numerical datasets from a CSV file or a Python list
gaussian_one = Gaussian()
gaussian_one.read_data_file("numbers.csv")

#another option is to read the data from a list
gaussian_one.data = [10,10,10,19,15,15,12,12,2,9,8,8,5] 
  • Calculate the mean, standard deviation, and relative probability density at a specific point in a Gaussian distribution
print(gaussian_one.calculate_mean())
print(gaussian_one.calculate_stdev())
print(gaussian_one.pdf(49))
  • Plot Histogram of the data or the Normalized histogram along with the probability density function
gaussian_one.plot_histogram()
gaussian_one.plot_histogram_pdf()

Features Binomial Distribution

  • Calculate the mean, and standard deviation given some probability p and number of trials n
Binomial(0.4, 25)
#or
Binomial(p=0.4, n=25)
  • Read numerical datasets from a CSV file or a Python list. The dataset should be composed of 0 and 1.
  • Calculate the mean, standard deviation, and probability mass at a specific point in a Binomial distribution
binomial_one.data = [0,1,0,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1] 
print(binomial_one.calculate_mean())
print(binomial_one.calculate_stdev())
print(binomial_one.pdf(5))
  • Plot the probability mass function of the binomial distribution
binomial_one.plot_bar_pdf()

Contributing

Submit a pull request to this Github repository and add other distributions you may like!

Release files for juan-stats 2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juan-stats 2.1
File Size Uploaded
juan_stats-2.1.tar.gz 4.5 kB Details

Release files / juan_stats-2.1.tar.gz

Download URL juan_stats-2.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
666c220382dbf8d12fdc8d1ad12260bdc49025c0454bcefc124eb122d34f4d75
BLAKE2b-256 checksum
How to use checksums
81829777185d4e8eca1a3b68ef74e9eef6e89ed9ddf5a7a7c0f25e43627ec9ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

2.1 This release

1 release file

2.0

1 release file

1.9

1 release file

1.8

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page