The mathematical framework for Bayesian statistics

Bayesian methods are an alternative way of making a statistical inference. We will first look at Bayes' theorem, the fundamental equation from which all Bayesian inference is derived.

A few definitions regarding probability are in order before we begin:

  • A,B: These are events that can occur with a certain probability.
  • P(A) and P(B): This is the probability of the occurrence of a particular event.
  • P(A|B): This is the probability of A happening, given that B has occurred. This is known as a conditional probability.
  • P(AB) = P(A and B): This is the probability of A and B occurring together.

We begin with the following basic assumption:

P(AB) = P(B) * P(A|B)

The preceding equation shows the ...

Get Mastering pandas - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.