Probability is the measure of the likeliness that an event will occur.
Probability theory is the branch of mathematics concerned with probability, the analysis of random phenomena.
Show a normal example of some dice / cards
Introduce with Boy or girl paradox (https://en.wikipedia.org/wiki/Boy_or_Girl_paradox) or Bertrand paradox (https://en.wikipedia.org/wiki/Bertrand_paradox_%28probability%29) Paradoxes in probability theory (https://en.wikipedia.org/wiki/Category:Probability_theory_paradoxes)
More problems list (http://stats.stackexchange.com/questions/3104/what-is-your-favorite-problem-for-an-introduction-to-probability)
MH370 articles: http://www.bbc.com/news/magazine-26680633 http://www.news.com.au/travel/travel-updates/missing-malaysia-airlines-flight-mh370-search-goes-back-to-basics-turning-to-the-power-of-maths-to-solve-the-mystery/story-fnizu68q-1226941119783 http://blogs.sas.com/content/subconsciousmusings/2014/04/02/how-bayesian-analysis-might-help-find-the-missing-malaysian-airplane/
Paradoxes: https://en.wikipedia.org/wiki/Raven_paradox https://en.wikipedia.org/wiki/Bertrand_paradox_%28probability%29
The essential characteristic of Bayesian Method is their explicit use of probabiltiy for quantifying uncertainity in inference based of statistical data analysis.
The whole idea of Bayesian Statistics revolve around this formula:
$$ P(\theta | D) = \frac{P(D | \theta) * P(\theta)}{ P(D)} $$In the case of Bayesian Statistics we assign probability to our parameters and don't settle for a single model as we do in the case of maximum likelihood. And then we can do whatever we want when we do the predictions. We can just use the model having maximum probability for the parameter or predict over all the models and do a weighted average based on the models.
Show a practical example.
But the problem that we face in the case of Bayesian Statistics is because of the huge integration to do to find the posterior distribution.
For dealing with this problem we have diffent methods like sampling.
Main steps in Bayesian Data Analysis:
In [38]:
from scipy.stats import beta
prior = beta(1000, 1000)
In [39]:
import matplotlib.pyplot as plt
plt.plot(np.linspace(0, 1, 1000), prior.pdf(np.linspace(0, 1, 1000)), alpha=0.3, c='g')
Out[39]:
In [4]:
%matplotlib inline
In [8]:
from __future__ import print_function
from IPython.html.widgets import interact, interactive, fixed
from IPython.html import widgets
In [25]:
from IPython.html.widgets import *
In [55]:
from scipy.stats import beta
%matplotlib inline
def plot(a, b):
y = beta(a, b).pdf(np.linspace(0, 1, 1000))
x = np.linspace(0, 1, 1000)
plt.plot(x, y, c='g')
plt.show()
interact(plot, a=(0, 1000), b=(0, 1000))
In [61]:
x = np.linspace(0, 10, 100)
y = 0.4 * x + 0.6
y_with_noise = y + np.random.randn(100)
plt.scatter(x, y_with_noise, alpha=0.5, c='g')
Out[61]:
In [ ]: