Inspired by my STATs class, I randomly decided to make a command-line application that has binomial probability-related things in it.
It can:
- Solve
$Pr(X = x)$ questions, including$\leq$ ,$\geq$ ,$<$ , and$>$ . - Produce a binomial probability table with essential statistics like mean, variance, and standard deviation
- Produce a binomial probability distribution with different graph styles such as line graphs, bar graphs, and scatterplots.
Binomial probability is used to calculate the success (
There are certain conditions for an experiment/event to be binomial:
- Event can be summarized to two outcomes (i.e.
$\pi$ and its complement). - Trials (
$n$ ) must be independent. - Trials (
$n$ ) must be fixed prior to data collection. - Probability of success/target outcome (
$\pi$ ) must stay constant.
The formula used is:
Where:
-
$n$ = Total number of independent trials -
$\pi$ = Probability of success/target outcome -
$x$ = Probability of x successes (i.e. the little x in$P(X = x)$ ) -
$\binom{n}{x}$ = Combination formula
- Make sure you installed Python 3.10 or higher (since it uses the new
match
case and type annotations). - Make sure these libraries are installed:
pip install typing pip install tabulate pip install numpy pip install pandas pip install matplotlib pip install seaborn
- Click the latest version on the Releases section and download the source code. Alternatively, click the green code button and download as a ZIP (or you can clone it).
- Run BinomialApp.py on your Python terminal or any Python IDE.
- Enjoy!