Probability formula solvers

Addition Rule (Mutually Exclusive Events)

P(AB)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

ProbabilityStatisticsFor events that cannot both happen, the chance that either one occurs is simply the sum of their separate probabilities.

Arrangements with Repetition

N=nrN = n^{r}

ProbabilityAlgebraNumber of sequences of length r drawn from n available choices when repeats are allowed, as with PIN codes and passwords.

Bayes' Theorem (Two Hypotheses)

P(AB)=P(BA)P(A)P(BA)P(A)+P(BAc)(1P(A))P(A \mid B) = \frac{P(B \mid A) \, P(A)}{P(B \mid A) \, P(A) + P(B \mid A^{c}) \, \left(1 - P(A)\right)}

ProbabilityStatisticsUpdates a prior belief into a posterior after evidence arrives, weighing the true-positive rate against the false-positive rate.

Binomial Distribution Mean

μ=np\mu = n p

ProbabilityStatisticsExpected number of successes across n independent trials that each succeed with probability p — the mean of the binomial distribution.

Binomial Distribution Variance

σ2=np(1p)\sigma^{2} = n p (1 - p)

ProbabilityStatisticsSpread of the number of successes across n independent trials, at its largest when the per-trial chance p sits at one half.

Binomial Probability

P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k} p^{k} (1 - p)^{\,n-k}

ProbabilityStatisticsChance of exactly k successes in n independent trials that each succeed with the same fixed probability p, as with coin tosses.

Birthday Problem (All Distinct)

P=N!(Nn)!  NnP = \frac{N!}{(N - n)! \; N^{\,n}}

ProbabilityStatisticsChance that n independent picks from N equally likely options are all different, the engine behind the birthday paradox.

Classical Probability

P=fnP = \frac{f}{n}

ProbabilityStatisticsProbability of an event as the number of favourable outcomes divided by the total number of equally likely outcomes.

Combinations (nCr)

nCr=(nr)=n!r!(nr)!{}_{n}C_{r} = \binom{n}{r} = \frac{n!}{r! \, (n-r)!}

ProbabilityAlgebraNumber of ways to choose r items from n distinct items when the order does not matter, as with poker hands or lottery tickets.

Complement Rule

P(Ac)=1P(A)P(A^{c}) = 1 - P(A)

ProbabilityStatisticsThe chance an event does not happen is one minus the chance it does, because every trial must end in one case or the other.

Conditional Probability

P(AB)=P(AB)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

ProbabilityStatisticsThe chance of A once B is known to have happened, found by rescaling the overlap to the reduced sample space B.

Erlang B Blocking Probability

B=AN/N!k=0NAk/k!B = \frac{A^{N}/N!}{\displaystyle\sum_{k=0}^{N} A^{k}/k!}

Computer ScienceProbabilityFraction of calls turned away by N circuits carrying A erlangs of offered traffic, on the assumption that a blocked call simply goes away. The standard sizing tool for trunks, agents and connection pools.

Expected Trials Until First Success

E[X]=1pE[X] = \frac{1}{p}

ProbabilityStatisticsAverage number of independent attempts needed before the first success when each attempt succeeds with probability p.

Expected Value of a Bet

E=pW(1p)LE = p \, W - (1 - p) \, L

ProbabilityStatisticsAverage profit per play of a two-outcome wager that pays W with probability p and costs L the rest of the time, over many plays.

Factorial

n!=n×(n1)××2×1n! = n \times (n-1) \times \cdots \times 2 \times 1

ProbabilityAlgebraThe product of every whole number from n down to 1, counting the ways that n distinct objects can be arranged in order.

General Addition Rule

P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)

ProbabilityStatisticsThe chance that either of two events happens, correcting the simple sum by subtracting the overlap that would be counted twice.

General Multiplication Rule

P(AB)=P(A)P(BA)P(A \cap B) = P(A) \, P(B \mid A)

ProbabilityStatisticsChance that both events happen when the second depends on the first, as in drawing two cards without replacement from a deck.

Geometric Distribution (First Success)

P(X=k)=(1p)k1pP(X = k) = (1 - p)^{\,k-1} p

ProbabilityStatisticsChance that the first success in a run of repeated independent trials arrives exactly on trial number k, after k - 1 failures.

Hypergeometric Probability

P(X=k)=(Kk)(NKnk)(Nn)P(X = k) = \frac{\binom{K}{k} \binom{N - K}{n - k}}{\binom{N}{n}}

ProbabilityStatisticsChance of drawing exactly k successes in a sample of n taken without replacement from a population of N holding K successes.

M/M/1 Average Number in System

L=λμλL = \frac{\lambda}{\mu - \lambda}

Computer ScienceProbabilityAverage number of jobs in a single-server queue, waiting plus in service. It rises gently until the server is about 70% busy and then goes vertical.

M/M/1 Average Time in System

W=1μλW = \frac{1}{\mu - \lambda}

Computer ScienceProbabilityAverage time a job spends in a single-server queue, from arrival to departure. It depends on the difference between the two rates, not on their ratio.

Multiplication Rule (Independent Events)

P(AB)=P(A)P(B)P(A \cap B) = P(A) \, P(B)

ProbabilityStatisticsWhen one event has no influence on the other, the chance that both occur is the product of their separate probabilities.

Odds and Probability

O=P1PO = \frac{P}{1 - P}

ProbabilityStatisticsConverts between a probability and odds in favour, the ratio of the chance it happens to the chance it does not.

Parallel System Reliability (Redundancy)

Rs=1(1R)nR_s = 1 - (1 - R)^{n}

Computer ScienceProbabilityReliability of n identical components when any single one is enough: the chance that they do not all fail together. Redundancy buys nines fast, provided the failures are genuinely independent.

Permutations (nPr)

nPr=n!(nr)!{}_{n}P_{r} = \frac{n!}{(n-r)!}

ProbabilityAlgebraNumber of ways to choose r items from n distinct items when the order of the selection matters, as with podium finishes.

Poisson Probability

P(X=k)=λkeλk!P(X = k) = \frac{\lambda^{k} e^{-\lambda}}{k!}

ProbabilityStatisticsChance of exactly k events in a fixed interval when events occur independently at a constant average rate lambda.

Probability of At Least One Success

P=1(1p)nP = 1 - (1 - p)^{n}

ProbabilityStatisticsChance that at least one of n independent attempts succeeds, found as one minus the chance that every single attempt fails.

Series System Reliability

Rs=RnR_s = R^{n}

Computer ScienceProbabilityReliability of n identical components that must all work: the individual reliability raised to the nth power. Every dependency you add makes the whole thing worse, never better.

Shannon Entropy of a Binary Source

H=plog2p(1p)log2(1p)H = -p\log_2 p - (1 - p)\log_2(1 - p)

Computer ScienceProbabilityAverage information carried by each symbol of a two-outcome source, in bits. It peaks at exactly 1 bit for a fair coin and falls to zero as the outcome becomes certain.