Probability


Bayes' theorem

          P(A) * P(B/A)
P(A/B) = ──────────────
              P(B)

Derivationʳ:

P(A ∩ B) is the probability of A times probablity of B given that A has already happened.

P(A ∩ B) = P(A) * P(B/A)

It could also be defined as the probability of B times probablity of A given that B has already happened.

P(A ∩ B) = P(B) * P(A/B)

Equating the two,

P(A) * P(B/A) = P(B) * P(A/B)


                 P(A) * P(B/A)
 =>    P(A/B) = ──────────────
                     P(B)

Probability distribution models

Poisson distribution

Same event that happens multiple times over a time interval.

  • Discrete
  • Parameter: mean/expectation (λ)

Probability of k events (probability density/mass function):

        λᵏ.e⁻ᵏ
P(k) = ───────
         k!

Poisson density function is not continuous. It's defined only for integer values of k.

See: https://brilliant.org/wiki/poisson-distribution/

Gamma distribution

  • Parameters
    • Shape parameter k
    • Rate parameter θ

DBT: Mean is past the midpoint in the graph always??

Normal distribution

  • aka Gaussian distribution
  • Bell shaped curve
  • Continuous ??

Categorical distribution

  • Value of random variable is from one among a set of predefined categories ʳ

  • Each category has an associated probability

  • A generalization of Bernoulli distribution ?? ʳ

  • Discrete

  • Doesn't have anything to do with category theory

Examples:

  • Rolling of a 6-faced die.
    • Each category has equal probability: 1/6
  • Coin toss
  • Selecting marbles from an urn ʳ
    • Suppose urn has 5 red, 3 green and 2 blue marbles
    • Probabilities of categories are like:
      • Red: 5/10
      • Green: 3/10
      • Blue: 2/10

More

  • Exponential
    • For between 2 occurrences of a same event??
  • Erlang
  • Binomial
  • Bernoulli
  • Uniform distribution

Central limit theorem

Given a collection of points (of any probability distribution. Need not be normal), if we select k number of points repeatedly with replacement (ie, the k points are considered to be 'put back' after each trial), the mean value of the trials will be normally distributed.

See:

Books