typos in regression

This commit is contained in:
mhjensen
2018-09-13 05:16:25 +02:00
parent 43ae02adf5
commit 83ab1ca1b7
39 changed files with 15307 additions and 929118 deletions
@@ -14,6 +14,3 @@ If more than 10⁵ lines are specified the autocorrelation function won't be com
The `gaussian.dat` dataset has been generated with numpy, as a proof of concept. It represents a normally distributed set of 5x10⁵ elements with `std = 0.05`. One will notice that the estimate on the error of the central value is greatly improved by all resampling methods.
`energy.dat` is an autocorrelated data set, with autocorrelation time of roughly 200. It is useful to see the use of blocking on this dataset as a convenient method to estimate the autocorrelation time (compare the elapsed time on the different methods).
In the `plaquette.dat` file there is a small data set (just 1000 samples) and it shows the strenght of using resampling methods to better estimate the error on the central value as opposed to the standard deviation.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@@ -369,7 +369,7 @@ MathJax.Hub.Config({
<p>
Two famous
resampling methods are \textit{the independent bootstrap} and \textit{the jackknife}.
resampling methods are the <b>independent bootstrap</b> and <b>the jackknife</b>.
<p>
The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
@@ -387,15 +387,15 @@ Sample code for the Jackknife method
t <span style="color: #666666">=</span> jack(X, stat)
</pre></div>
<p>
Consider first the function \texttt{jack()}. This function repeatedly
estimates the function called \texttt{statistic()} under the resampled
Consider first the function <b>jack()</b>. This function repeatedly
estimates the function called <b>statistic()</b> under the resampled
data by systematically leaving out one observation from the data. The
function \texttt{stat()} is passed as an argument to
\texttt{jack()}. The array \texttt{t} is eventually returned, which
function <b>stat()</b> is passed as an argument to
<b>jack()</b>. The array <b>t</b> is eventually returned, which
contains all the estimates \( \widehat{\vec{\theta}} \), and can be
plotted or analysed in other ways, such as by calling \texttt{std(t)}
from \texttt{numpy} to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the
plotted or analysed in other ways, such as by calling <b>std(t)</b>
from <b>numpy</b> to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the
estimator \( \widehat{\sigma}^2 \).
<p>
@@ -384,7 +384,7 @@ MathJax.Hub.Config({
t <span style="color: #666666">=</span> boot(X, stat, <span style="color: #666666">2**9</span>)
</pre></div>
<p>
Consider first the function \texttt{boot()}. In the \texttt{for}-loop, this function repeatedly estimates the function called \texttt{statistic()} under the resampled data \texttt{data[randint(0,n,n)]}. The function \texttt{statistic()} is passed as an argument to \texttt{boot()}. The array \texttt{t} is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling \texttt{std(t)} from \texttt{numpy} to estimate the standard error of \( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the estimator \( \widehat{\sigma}^2 \).
Consider first the function <b>boot()</b>. In the <b>for</b> loop, this function repeatedly estimates the function called <b>statistic()</b> under the resampled data in <b>data(randint(0,n,n))</b>. The function <b>statistic()</b> is passed as an argument to <b>boot()</b>. The array <b>t</b> is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling <b>std(t)</b> from <b>numpy</b> to estimate the standard error of \( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the estimator \( \widehat{\sigma}^2 \).
<p>
<p>
@@ -377,7 +377,7 @@ The independent bootstrap works like this:
<li> Repeat this process \( k \) times.</li>
</ol>
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
<p>
<p>
@@ -371,7 +371,7 @@ MathJax.Hub.Config({
We can then wrap up
$$
\begin{align}
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i \stackrel{ \eqref{eq:blocking} }{=} \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i = \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
&= \frac{1}{2}\left[ (\vec{X}_j)_1 + (\vec{X}_j)_2 + \cdots + (\vec{X}_j)_{n_j} \right] = \underbrace{\frac{n_j}{2}}_{=n_{j+1}} \overline{X}_j = n_{j+1}\overline{X}_j.
\tag{26}
\end{align}
+11 -11
View File
@@ -2723,7 +2723,7 @@ the design matrix and the parameters \( \beta \).
<p>
Two famous
resampling methods are \textit{the independent bootstrap} and \textit{the jackknife}.
resampling methods are the <b>independent bootstrap</b> and <b>the jackknife</b>.
<p>
The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
@@ -2801,15 +2801,15 @@ Sample code for the Jackknife method
t = jack(X, stat)
</pre></div>
<p>
Consider first the function \texttt{jack()}. This function repeatedly
estimates the function called \texttt{statistic()} under the resampled
Consider first the function <b>jack()</b>. This function repeatedly
estimates the function called <b>statistic()</b> under the resampled
data by systematically leaving out one observation from the data. The
function \texttt{stat()} is passed as an argument to
\texttt{jack()}. The array \texttt{t} is eventually returned, which
function <b>stat()</b> is passed as an argument to
<b>jack()</b>. The array <b>t</b> is eventually returned, which
contains all the estimates \( \widehat{\vec{\theta}} \), and can be
plotted or analysed in other ways, such as by calling \texttt{std(t)}
from \texttt{numpy} to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the
plotted or analysed in other ways, such as by calling <b>std(t)</b>
from <b>numpy</b> to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the
estimator \( \widehat{\sigma}^2 \).
</section>
@@ -2916,7 +2916,7 @@ frequency of the observation \( X_i \), just draw the values
t = boot(X, stat, <span style="color: #B452CD">2</span>**<span style="color: #B452CD">9</span>)
</pre></div>
<p>
Consider first the function \texttt{boot()}. In the \texttt{for}-loop, this function repeatedly estimates the function called \texttt{statistic()} under the resampled data \texttt{data[randint(0,n,n)]}. The function \texttt{statistic()} is passed as an argument to \texttt{boot()}. The array \texttt{t} is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling \texttt{std(t)} from \texttt{numpy} to estimate the standard error of \( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the estimator \( \widehat{\sigma}^2 \).
Consider first the function <b>boot()</b>. In the <b>for</b> loop, this function repeatedly estimates the function called <b>statistic()</b> under the resampled data in <b>data(randint(0,n,n))</b>. The function <b>statistic()</b> is passed as an argument to <b>boot()</b>. The array <b>t</b> is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling <b>std(t)</b> from <b>numpy</b> to estimate the standard error of \( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the estimator \( \widehat{\sigma}^2 \).
</section>
@@ -2934,7 +2934,7 @@ The independent bootstrap works like this:
</ol>
<p>
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
</section>
@@ -3064,7 +3064,7 @@ We can then wrap up
<p>&nbsp;<br>
$$
\begin{align}
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i \stackrel{ \eqref{eq:blocking} }{=} \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i = \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
&= \frac{1}{2}\left[ (\vec{X}_j)_1 + (\vec{X}_j)_2 + \cdots + (\vec{X}_j)_{n_j} \right] = \underbrace{\frac{n_j}{2}}_{=n_{j+1}} \overline{X}_j = n_{j+1}\overline{X}_j.
\tag{26}
\end{align}
@@ -2688,7 +2688,7 @@ the design matrix and the parameters \( \beta \).
<p>
Two famous
resampling methods are \textit{the independent bootstrap} and \textit{the jackknife}.
resampling methods are the <b>independent bootstrap</b> and <b>the jackknife</b>.
<p>
The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
@@ -2762,15 +2762,15 @@ Sample code for the Jackknife method
t = jack(X, stat)
</pre></div>
<p>
Consider first the function \texttt{jack()}. This function repeatedly
estimates the function called \texttt{statistic()} under the resampled
Consider first the function <b>jack()</b>. This function repeatedly
estimates the function called <b>statistic()</b> under the resampled
data by systematically leaving out one observation from the data. The
function \texttt{stat()} is passed as an argument to
\texttt{jack()}. The array \texttt{t} is eventually returned, which
function <b>stat()</b> is passed as an argument to
<b>jack()</b>. The array <b>t</b> is eventually returned, which
contains all the estimates \( \widehat{\vec{\theta}} \), and can be
plotted or analysed in other ways, such as by calling \texttt{std(t)}
from \texttt{numpy} to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the
plotted or analysed in other ways, such as by calling <b>std(t)</b>
from <b>numpy</b> to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the
estimator \( \widehat{\sigma}^2 \).
<p>
@@ -2875,7 +2875,7 @@ frequency of the observation \( X_i \), just draw the values
t = boot(X, stat, <span style="color: #B452CD">2</span>**<span style="color: #B452CD">9</span>)
</pre></div>
<p>
Consider first the function \texttt{boot()}. In the \texttt{for}-loop, this function repeatedly estimates the function called \texttt{statistic()} under the resampled data \texttt{data[randint(0,n,n)]}. The function \texttt{statistic()} is passed as an argument to \texttt{boot()}. The array \texttt{t} is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling \texttt{std(t)} from \texttt{numpy} to estimate the standard error of \( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the estimator \( \widehat{\sigma}^2 \).
Consider first the function <b>boot()</b>. In the <b>for</b> loop, this function repeatedly estimates the function called <b>statistic()</b> under the resampled data in <b>data(randint(0,n,n))</b>. The function <b>statistic()</b> is passed as an argument to <b>boot()</b>. The array <b>t</b> is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling <b>std(t)</b> from <b>numpy</b> to estimate the standard error of \( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the estimator \( \widehat{\sigma}^2 \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -2892,7 +2892,7 @@ The independent bootstrap works like this:
<li> Repeat this process \( k \) times.</li>
</ol>
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -3013,7 +3013,7 @@ We can show that \( V(\overline{X}_i) = V(\overline{X}_j) \) for all \( 0 \leq i
We can then wrap up
$$
\begin{align}
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i \stackrel{ \eqref{eq:blocking} }{=} \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i = \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
&= \frac{1}{2}\left[ (\vec{X}_j)_1 + (\vec{X}_j)_2 + \cdots + (\vec{X}_j)_{n_j} \right] = \underbrace{\frac{n_j}{2}}_{=n_{j+1}} \overline{X}_j = n_{j+1}\overline{X}_j.
\label{_auto16}
\end{align}
+11 -11
View File
@@ -2693,7 +2693,7 @@ the design matrix and the parameters \( \beta \).
<p>
Two famous
resampling methods are \textit{the independent bootstrap} and \textit{the jackknife}.
resampling methods are the <b>independent bootstrap</b> and <b>the jackknife</b>.
<p>
The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
@@ -2767,15 +2767,15 @@ Sample code for the Jackknife method
t <span style="color: #666666">=</span> jack(X, stat)
</pre></div>
<p>
Consider first the function \texttt{jack()}. This function repeatedly
estimates the function called \texttt{statistic()} under the resampled
Consider first the function <b>jack()</b>. This function repeatedly
estimates the function called <b>statistic()</b> under the resampled
data by systematically leaving out one observation from the data. The
function \texttt{stat()} is passed as an argument to
\texttt{jack()}. The array \texttt{t} is eventually returned, which
function <b>stat()</b> is passed as an argument to
<b>jack()</b>. The array <b>t</b> is eventually returned, which
contains all the estimates \( \widehat{\vec{\theta}} \), and can be
plotted or analysed in other ways, such as by calling \texttt{std(t)}
from \texttt{numpy} to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the
plotted or analysed in other ways, such as by calling <b>std(t)</b>
from <b>numpy</b> to estimate the standard error of
\( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the
estimator \( \widehat{\sigma}^2 \).
<p>
@@ -2880,7 +2880,7 @@ frequency of the observation \( X_i \), just draw the values
t <span style="color: #666666">=</span> boot(X, stat, <span style="color: #666666">2**9</span>)
</pre></div>
<p>
Consider first the function \texttt{boot()}. In the \texttt{for}-loop, this function repeatedly estimates the function called \texttt{statistic()} under the resampled data \texttt{data[randint(0,n,n)]}. The function \texttt{statistic()} is passed as an argument to \texttt{boot()}. The array \texttt{t} is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling \texttt{std(t)} from \texttt{numpy} to estimate the standard error of \( \widehat{\vec{\theta}} \). The function \texttt{std(t)} is just the estimator \( \widehat{\sigma}^2 \).
Consider first the function <b>boot()</b>. In the <b>for</b> loop, this function repeatedly estimates the function called <b>statistic()</b> under the resampled data in <b>data(randint(0,n,n))</b>. The function <b>statistic()</b> is passed as an argument to <b>boot()</b>. The array <b>t</b> is eventually returned, which contains all the estimates \( \widehat{\vec{\theta}} \), and can be plotted or analysed in other ways, such as by calling <b>std(t)</b> from <b>numpy</b> to estimate the standard error of \( \widehat{\vec{\theta}} \). The function <b>std(t)</b> is just the estimator \( \widehat{\sigma}^2 \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -2897,7 +2897,7 @@ The independent bootstrap works like this:
<li> Repeat this process \( k \) times.</li>
</ol>
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
When you are done, you can draw a histogram of the relative frequency of \( \widehat \theta^* \). This is your estimate of the probability distribution \( p(t) \). Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of \( \widehat{\theta}^* \). Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of \( \widehat \theta \), apply the esimator \( \widehat \sigma^2 \) to the values \( \widehat \theta ^* \).
<p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
@@ -3018,7 +3018,7 @@ We can show that \( V(\overline{X}_i) = V(\overline{X}_j) \) for all \( 0 \leq i
We can then wrap up
$$
\begin{align}
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i \stackrel{ \eqref{eq:blocking} }{=} \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i = \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
&= \frac{1}{2}\left[ (\vec{X}_j)_1 + (\vec{X}_j)_2 + \cdots + (\vec{X}_j)_{n_j} \right] = \underbrace{\frac{n_j}{2}}_{=n_{j+1}} \overline{X}_j = n_{j+1}\overline{X}_j.
\label{_auto16}
\end{align}
+11 -11
View File
@@ -3504,7 +3504,7 @@
"## Resampling methods: Jackknife and Bootstrap\n",
"\n",
"Two famous\n",
"resampling methods are \\textit{the independent bootstrap} and \\textit{the jackknife}. \n",
"resampling methods are the **independent bootstrap** and **the jackknife**. \n",
"\n",
"The jackknife is a special case of the independent bootstrap. Still, the jackknife was made\n",
"popular prior to the independent bootstrap. And as the popularity of\n",
@@ -3594,15 +3594,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Consider first the function \\texttt{jack()}. This function repeatedly\n",
"estimates the function called \\texttt{statistic()} under the resampled\n",
"Consider first the function **jack()**. This function repeatedly\n",
"estimates the function called **statistic()** under the resampled\n",
"data by systematically leaving out one observation from the data. The\n",
"function \\texttt{stat()} is passed as an argument to\n",
"\\texttt{jack()}. The array \\texttt{t} is eventually returned, which\n",
"function **stat()** is passed as an argument to\n",
"**jack()**. The array **t** is eventually returned, which\n",
"contains all the estimates $\\widehat{\\vec{\\theta}}$, and can be\n",
"plotted or analysed in other ways, such as by calling \\texttt{std(t)}\n",
"from \\texttt{numpy} to estimate the standard error of\n",
"$\\widehat{\\vec{\\theta}}$. The function \\texttt{std(t)} is just the\n",
"plotted or analysed in other ways, such as by calling **std(t)**\n",
"from **numpy** to estimate the standard error of\n",
"$\\widehat{\\vec{\\theta}}$. The function **std(t)** is just the\n",
"estimator $\\widehat{\\sigma}^2$.\n",
"\n",
"\n",
@@ -3699,7 +3699,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Consider first the function \\texttt{boot()}. In the \\texttt{for}-loop, this function repeatedly estimates the function called \\texttt{statistic()} under the resampled data \\texttt{data[randint(0,n,n)]}. The function \\texttt{statistic()} is passed as an argument to \\texttt{boot()}. The array \\texttt{t} is eventually returned, which contains all the estimates $\\widehat{\\vec{\\theta}}$, and can be plotted or analysed in other ways, such as by calling \\texttt{std(t)} from \\texttt{numpy} to estimate the standard error of $\\widehat{\\vec{\\theta}}$. The function \\texttt{std(t)} is just the estimator $\\widehat{\\sigma}^2$.\n",
"Consider first the function **boot()**. In the **for** loop, this function repeatedly estimates the function called **statistic()** under the resampled data in **data(randint(0,n,n))**. The function **statistic()** is passed as an argument to **boot()**. The array **t** is eventually returned, which contains all the estimates $\\widehat{\\vec{\\theta}}$, and can be plotted or analysed in other ways, such as by calling **std(t)** from **numpy** to estimate the standard error of $\\widehat{\\vec{\\theta}}$. The function **std(t)** is just the estimator $\\widehat{\\sigma}^2$.\n",
"\n",
"\n",
"\n",
@@ -3715,7 +3715,7 @@
"\n",
"4. Repeat this process $k$ times. \n",
"\n",
"When you are done, you can draw a histogram of the relative frequency of $\\widehat \\theta^*$. This is your estimate of the probability distribution $p(t)$. Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of $\\widehat{\\theta}^*$. Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of $\\widehat \\theta$, apply the esimator $\\widehat \\sigma^2$ to the values $\\widehat \\theta ^*$.\n",
"When you are done, you can draw a histogram of the relative frequency of $\\widehat \\theta^*$. This is your estimate of the probability distribution $p(t)$. Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of $\\widehat{\\theta}^*$. Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of $\\widehat \\theta$, apply the esimator $\\widehat \\sigma^2$ to the values $\\widehat \\theta ^*$.\n",
"\n",
"\n",
"\n",
@@ -3924,7 +3924,7 @@
"metadata": {},
"source": [
"$$\n",
"n_{j+1} \\overline{X}_{j+1} = \\sum_{i=1}^{n_{j+1}} (\\vec{X}_{j+1})_i \\stackrel{ \\eqref{eq:blocking} }{=} \\frac{1}{2}\\sum_{i=1}^{n_{j}/2} (\\vec{X}_{j})_{2i-1} + (\\vec{X}_{j})_{2i} \\nonumber\n",
"n_{j+1} \\overline{X}_{j+1} = \\sum_{i=1}^{n_{j+1}} (\\vec{X}_{j+1})_i = \\frac{1}{2}\\sum_{i=1}^{n_{j}/2} (\\vec{X}_{j})_{2i-1} + (\\vec{X}_{j})_{2i} \\nonumber\n",
"$$"
]
},
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11 -11
View File
@@ -2179,7 +2179,7 @@ the design matrix and the parameters $\beta$.
===== Resampling methods: Jackknife and Bootstrap =====
Two famous
resampling methods are \textit{the independent bootstrap} and \textit{the jackknife}.
resampling methods are the _independent bootstrap_ and _the jackknife_.
The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
popular prior to the independent bootstrap. And as the popularity of
@@ -2245,15 +2245,15 @@ def stat(data):
t = jack(X, stat)
!ec
Consider first the function \texttt{jack()}. This function repeatedly
estimates the function called \texttt{statistic()} under the resampled
Consider first the function _jack()_. This function repeatedly
estimates the function called _statistic()_ under the resampled
data by systematically leaving out one observation from the data. The
function \texttt{stat()} is passed as an argument to
\texttt{jack()}. The array \texttt{t} is eventually returned, which
function _stat()_ is passed as an argument to
_jack()_. The array _t_ is eventually returned, which
contains all the estimates $\widehat{\vec{\theta}}$, and can be
plotted or analysed in other ways, such as by calling \texttt{std(t)}
from \texttt{numpy} to estimate the standard error of
$\widehat{\vec{\theta}}$. The function \texttt{std(t)} is just the
plotted or analysed in other ways, such as by calling _std(t)_
from _numpy_ to estimate the standard error of
$\widehat{\vec{\theta}}$. The function _std(t)_ is just the
estimator $\widehat{\sigma}^2$.
@@ -2339,7 +2339,7 @@ def stat(data):
t = boot(X, stat, 2**9)
!ec
Consider first the function \texttt{boot()}. In the \texttt{for}-loop, this function repeatedly estimates the function called \texttt{statistic()} under the resampled data \texttt{data[randint(0,n,n)]}. The function \texttt{statistic()} is passed as an argument to \texttt{boot()}. The array \texttt{t} is eventually returned, which contains all the estimates $\widehat{\vec{\theta}}$, and can be plotted or analysed in other ways, such as by calling \texttt{std(t)} from \texttt{numpy} to estimate the standard error of $\widehat{\vec{\theta}}$. The function \texttt{std(t)} is just the estimator $\widehat{\sigma}^2$.
Consider first the function _boot()_. In the _for_ loop, this function repeatedly estimates the function called _statistic()_ under the resampled data in _data(randint(0,n,n))_. The function _statistic()_ is passed as an argument to _boot()_. The array _t_ is eventually returned, which contains all the estimates $\widehat{\vec{\theta}}$, and can be plotted or analysed in other ways, such as by calling _std(t)_ from _numpy_ to estimate the standard error of $\widehat{\vec{\theta}}$. The function _std(t)_ is just the estimator $\widehat{\sigma}^2$.
@@ -2353,7 +2353,7 @@ o Define a vector $\vec{x}^*$ containing the values which were drawn from $\vec{
o Using the vector $\vec{x}^*$ compute $\widehat{\theta}^*$ by evaluating $\widehat \theta$ under the observations $\vec{x}^*$.
o Repeat this process $k$ times.
When you are done, you can draw a histogram of the relative frequency of $\widehat \theta^*$. This is your estimate of the probability distribution $p(t)$. Using this probability distribution you can estimate any statistic thereof. In principle you never draw the histogram of the relative frequency of $\widehat{\theta}^*$. Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of $\widehat \theta$, apply the esimator $\widehat \sigma^2$ to the values $\widehat \theta ^*$.
When you are done, you can draw a histogram of the relative frequency of $\widehat \theta^*$. This is your estimate of the probability distribution $p(t)$. Using this probability distribution you can estimate any statistics thereof. In principle you never draw the histogram of the relative frequency of $\widehat{\theta}^*$. Instead you use the estimators corresponding to the statistic of interest. For example, if you are interested in estimating the variance of $\widehat \theta$, apply the esimator $\widehat \sigma^2$ to the values $\widehat \theta ^*$.
@@ -2452,7 +2452,7 @@ We can show that $V(\overline{X}_i) = V(\overline{X}_j)$ for all $0 \leq i \leq
We can then wrap up
!bt
\begin{align}
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i \stackrel{ \eqref{eq:blocking} }{=} \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
n_{j+1} \overline{X}_{j+1} &= \sum_{i=1}^{n_{j+1}} (\vec{X}_{j+1})_i = \frac{1}{2}\sum_{i=1}^{n_{j}/2} (\vec{X}_{j})_{2i-1} + (\vec{X}_{j})_{2i} \nonumber \\
&= \frac{1}{2}\left[ (\vec{X}_j)_1 + (\vec{X}_j)_2 + \cdots + (\vec{X}_j)_{n_j} \right] = \underbrace{\frac{n_j}{2}}_{=n_{j+1}} \overline{X}_j = n_{j+1}\overline{X}_j.
\end{align}
!et