Skip to content

Commit

Permalink
Fixed section headers
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcampos committed Sep 21, 2015
1 parent 9abf53f commit c1bf8c2
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 61 deletions.
20 changes: 10 additions & 10 deletions Lab3-Freq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###What is data?\n",
"### What is data?\n",
"\n",
"In labs before, you have seen datasets. As so in the example above. You have seen probability distributions of this data. Calculated means. Calculated standard deviations."
]
Expand All @@ -205,7 +205,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"####Pandas code for the week\n",
"#### Pandas code for the week\n",
"\n",
"We'll keep showing some different aspects of Pandas+Seaborn each week. For example, you can very easily calculate correlations"
]
Expand Down Expand Up @@ -327,7 +327,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"####Samples vs population\n",
"#### Samples vs population\n",
"\n",
"But we have never aked ourselves the philosophical question: what is data? **Frequentist statistics** is one answer to this philosophical question. It treats data as a **sample** from an existing **population**.\n",
"\n",
Expand All @@ -338,12 +338,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###Choosing a model\n",
"### Choosing a model\n",
"\n",
"Let us characterize our particular sample statistically then, using a *probability distribution*\n",
"\n",
"\n",
"####The Exponential Distribution\n",
"#### The Exponential Distribution\n",
"\n",
"The exponential distribution occurs naturally when describing the lengths of the inter-arrival times in a homogeneous Poisson process.\n",
"\n",
Expand Down Expand Up @@ -447,7 +447,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###How would we draw from this distribution?\n",
"### How would we draw from this distribution?\n",
"\n",
"Lets use the built in machinery in `scipy.stats`:"
]
Expand Down Expand Up @@ -623,7 +623,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"####An aside: The Poisson Distribution\n",
"#### An aside: The Poisson Distribution\n",
"\n",
"The *Poisson Distribution* is defined for all positive integers: \n",
"\n",
Expand Down Expand Up @@ -834,7 +834,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###Segue: many samples on the binomial"
"### Segue: many samples on the binomial"
]
},
{
Expand Down Expand Up @@ -979,7 +979,7 @@
"\n",
"We do it here for the mean of the time differences. We could also do it for its inverse, $\\lambda$.\n",
"\n",
"####Non Parametric bootstrap\n",
"#### Non Parametric bootstrap\n",
"\n",
"Resample the data! We can then plot the distribution of the mean time-difference."
]
Expand Down Expand Up @@ -1028,7 +1028,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"####Parametric Bootstrap\n",
"#### Parametric Bootstrap\n",
"\n",
"And here we do it in a parametric way. We get an \"estimate\" of the parameter from our sample, and them use the exponential distribution to generate many datasets, and then fir the parameter on each one of those datasets. We can then plot the distribution of the mean time-difference."
]
Expand Down
12 changes: 6 additions & 6 deletions Lab3-Stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#Sampling and Distributions"
"# Sampling and Distributions"
]
},
{
Expand Down Expand Up @@ -41,7 +41,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###Expectations and Variance\n",
"### Expectations and Variance\n",
"\n",
"The **expectation value** of a quantity with respect to the a distribution is the weighted sum of the quantity where the weights are probabilties from the distribution. For example, for the random variable $X$:\n",
"\n",
Expand All @@ -64,7 +64,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###The Law of Large Numbers\n",
"### The Law of Large Numbers\n",
"\n",
"Lets keep increasing the length of the sequence of coin flips n, and compute a running average $S_n$ of the coin-flip random variables,\n",
"$$S_n = \\frac{1}{n} \\sum_{i=1}^{n} x_i .$$\n",
Expand Down Expand Up @@ -511,7 +511,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###The Gaussian Distribution\n",
"### The Gaussian Distribution\n",
"\n",
"We saw in the last section that the sampling distribution of the mean itself has a mean $\\mu$ and variance $\\frac{\\sigma^2}{N}$. This distribution is called the **Gaussian** or **Normal Distribution**, and is probably the most important distribution in all of statistics.\n",
"\n",
Expand Down Expand Up @@ -577,7 +577,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"###The Central Limit Theorem\n",
"### The Central Limit Theorem\n",
"\n",
"The reason for the distribution's importance is the Central Limit Theorem(CLT). The theorem is stated as thus, very similar to the law of large numbers:\n",
"\n",
Expand Down Expand Up @@ -616,7 +616,7 @@
"metadata": {},
"source": [
"\n",
"####An application to elections: Binomial distribution in the large n, large k limit\n",
"#### An application to elections: Binomial distribution in the large n, large k limit\n",
"For example, consider the binomial distribution Binomial(n,k, p) in the limit of large n. The number of successes k in n trials can be ragarded as the sum of n IID Bernoulli variables with values 1 or 0. Obviously this is applicable to a large sequence of coin tosses, or to the binomial sampling issue that we encountered earlier in the case of the polling. \n",
"\n",
"Using the CLT we can replace the binomial distribution at large n by a gaussian where k is now a continuous variable, and whose mean is the mean of the binomial $np$ and whose variance is $np(1-p)$, since\n",
Expand Down
100 changes: 55 additions & 45 deletions Lab3-probability.ipynb

Large diffs are not rendered by default.

0 comments on commit c1bf8c2

Please sign in to comment.