MathJax render tests

This page is a render test for MathJax, a \(\LaTeX\) renderer built in JavaScript, and Alpine.js widgets. It’s also a bit of a cheat sheet for some probability functions I frequently forget.

Binomial distribution calculator widget



Binomial Distributions

If \(P(X=1) = .25 = p\) then the number of trials \(n\) needed to achieve a cumulative success likelihood (confidence interval) of 95% is:

  • number of successes \(X = 1\)
  • chance of success \(p = 0.25\)
  • likelihood that the true population parameter lies outside the confidence interval \(\alpha = 1 - .95 = 0.05\)
\[n = \frac{\log\alpha}{\log(1 - p)}\]

So in this scenario,

\[n = \frac{\log0.05}{\log(1 - 0.25)} = \frac{\log0.05}{\log(0.75)} = 10.41 \implies 11\]

Notes

  • \(P(A \cup B)\), union, probability that Event A or Event B will occur
  • \(P(A \cap B)\), intersection, probability that Event A and Event B will occur

Using Excel

The Microsoft Office Excel (or Google Sheets!) function for calculating a binomial distribution is the BINOMDIST (or BINOM.DIST) function:

BINOMDIST(x, n, p, cumulative)

x or fewer successes in n independent Bernoulli trials. Each trial has probability p of success. When cumulative is false the probability of exactly x successes is returned.

References