binomial¶
- final class boring_math.probability_distributions.distributions.binomial.Binomial¶
Bases:
DiscreteDistClass for visualizing Binomial distributed data.
A Binomial distribution represents the number of events with probability
phappening innnumbers of trials.Attributes (some inherited):
mean (float) representing the mean value of the distribution
stdev (float) representing the standard deviation of the distribution
data extracted from a data file (taken to be a population)
p (float) representing the probability of an event occurring
n (int) the total number of trials
- __init__(p: float = 0.5, n: int = 20)¶
init
- param p:
Probability of success.
- param n:
Number of trials.
- replace_stats_from_dataset(dset: DataSet) tuple[float, int]¶
Replace stats from dataset
Function to calculate p and n from a data set, taken as a population.