Based on the word document given by the lecturer, I converted the commands into a CLI in python.
- Ensure that you have
scipy
installed in your python environment. - Run
python3 statistic commands.py
- Binomial Distribution
- Normal Binomial Distribution
- Poisson Distribution
- Exponential Distribution
- Normal Distribution
- Continuous Variable (represented by
T
) - Chi Squared Continuous Random Variable (represented by
Chisq
) - F Continuous Random Variable (represented by
F
)
Let the base be X ~ B(trials, probability of success)
cdf(number of successes)
: CalculatesPr(X <= number of successes)
pmf(number of successes)
: CalculatesPr(X = number of successes)
greater_than(number of successors)
: CalculatesPr(X > number of successes)
ppf(probability)
: CalculatesPr(X <= x) >= probability
Let the base be X ~ NB(number of successes, probability of success)
cdf(number of failures)
: CalculatesPr(X <= number of failures)
pmf(number of failures)
: CalculatesPr(X = number of failures)
greater_than(number of failures)
: CalculatesPr(X > number of failures)
ppf(probability)
: CalculatesPr(X <= x) >= probability
Let the base be X ~ P(lambda value), where E(X) = lambda value
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: CalculatesPr(X = value)
greater_than(value)
: CalculatesPr(X > value)
ppf(probability)
: CalculatesPr(X <= x) >= probability
Let the base be X ~ Exp(lambda value), where E(X) = 1/lambda value
. Note that the default lower limit
is 0 for this distribution.
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: CalculatesPr(X = value)
greater_than(value)
: CalculatesPr(X > value)
ppf(probability)
: CalculatesPr(X <= x) >= probability
Let the base be X ~ N(mu, variance), where E(X) = mu and sigma^2 = variance
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: Calculatespdf f(value)
greater_than(value)
: CalculatesPr(X > value)
ppf_leq(probability)
: CalculatesPr(X <= x) = probability
ppf_geq(probability)
: CalculatesPr(X >= x) = probability
Let the base be X ~ t(degree of freedom)
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: Calculatespdf f(value)
greater_than(value)
: CalculatesPr(X > value)
ppf_leq(probability)
: CalculatesPr(X <= x) = probability
ppf_geq(probability)
: CalculatesPr(X >= x) = probability
Let the base be X ~ Chisq(degree of freedom)
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: Calculatespdf f(value)
greater_than(value)
: CalculatesPr(X > value)
ppf_leq(probability)
: CalculatesPr(X <= x) = probability
ppf_geq(probability)
: CalculatesPr(X >= x) = probability
Let the base be X ~ F(freedom1, freedom2)
cdf(value)
: CalculatesPr(X <= value)
pmf(value)
: Calculatespdf f(value)
greater_than(value)
: CalculatesPr(X > value)
ppf_leq(probability)
: CalculatesPr(X <= x) = probability
ppf_geq(probability)
: CalculatesPr(X >= x) = probability