Skip to content

Instantly share code, notes, and snippets.

@andykuszyk
Last active February 16, 2017 12:17
Show Gist options
  • Save andykuszyk/e3810f94f7af24118c4b1578768198c5 to your computer and use it in GitHub Desktop.
Save andykuszyk/e3810f94f7af24118c4b1578768198c5 to your computer and use it in GitHub Desktop.
Probabilities
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Probabilities\n",
"\n",
"$X$ and $Y$ are events such that $X,Y \\in A$ where $A$ is the set of events.\n",
"\n",
"## Probability of an event\n",
"The probability of an event $X$ in an event space $A$: $P(X) = count(X) / count(A)$\n",
"\n",
"## Probability of two events\n",
"Probability of event $X$ and event $Y$ in event space $A$: $P(X and Y) = count(X and Y) / count(A)$\n",
"\n",
"## Conditional probability\n",
"Probability of $X$ given $Y$: \n",
"$$ P(X|Y) = \\frac{P(X and Y)}{P(Y)} $$\n",
"\n",
"## Propability of independant events\n",
"Probability of $X$ and $Y$ when they are independent: $ P(XY) = P(X) + P(Y)$\n",
"\n",
"## Probability of dependent events\n",
"Probability of $X$ and $Y$ when they are dependent: $ P(XY) = P(X) \\times P(Y) $\n",
"\n",
"## Bayes theorem\n",
"$$ P(X|Y) = \\frac{P(Y|X)P(X)}{P(Y)}$$"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment