[IPSUR-commits] r129 - pkg/IPSUR/inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 8 17:34:23 CET 2010


Author: gkerns
Date: 2010-01-08 17:34:22 +0100 (Fri, 08 Jan 2010)
New Revision: 129

Modified:
   pkg/IPSUR/inst/doc/IPSUR.Rnw
   pkg/IPSUR/inst/doc/IPSUR.bib
Log:
small changes


Modified: pkg/IPSUR/inst/doc/IPSUR.Rnw
===================================================================
--- pkg/IPSUR/inst/doc/IPSUR.Rnw	2010-01-07 18:25:36 UTC (rev 128)
+++ pkg/IPSUR/inst/doc/IPSUR.Rnw	2010-01-08 16:34:22 UTC (rev 129)
@@ -489,13 +489,13 @@
 Please bear in mind that the title of this book is {}``Introduction
 to Probability and Statistics Using \textsf{R}'', and not {}``Introduction
 to \textsf{R} Using Probability and Statistics'', nor even {}``Introduction
-to Probability and Statistics and \textsf{R} Using Words''. The goals
-are probability and statistics; the tool is \textsf{R}. There are
-several important topics about \textsf{R} which some individuals will
-feel are underdeveloped, glossed over, or wantonly omitted. Some will
-feel the same way about the probabilistic and/or statistical content.
-Still others will just want to learn \textsf{R} and skip all of the
-mathematics.
+to Probability and Statistics and \textsf{R} Using Words''. The people
+at the party are probability and statistics; the handshake is \textsf{R}.
+There are several important topics about \textsf{R} which some individuals
+will feel are underdeveloped, glossed over, or wantonly omitted. Some
+will feel the same way about the probabilistic and/or statistical
+content. Still others will just want to learn \textsf{R} and skip
+all of the mathematics.
 
 Despite any misgivings: here it is, warts and all. I humbly invite
 said individuals to take this book, with the GNU-FDL in hand, and
@@ -4263,7 +4263,7 @@
 Let us take a look at the coin-toss experiment more closely. What
 do we mean when we say {}``the probability of Heads'' or write $\P(\mbox{Heads})$?
 Given a coin and an itchy thumb, how do we go about finding what $\P(\mbox{Heads})$
-should be? There are three main approaches.
+should be?
 
 
 \subsection{The Measure Theory Approach}
@@ -4280,8 +4280,7 @@
 probability $p$ to the event $\left\{ \mbox{Heads}\right\} $, where
 $p$ is some number $0\leq p\leq1$. An experimenter that wishes to
 incorporate the symmetry of the coin would choose $p=1/2$ to balance
-the likelihood of $\left\{ \mbox{Heads}\right\} $ and $\left\{ \mbox{Tails}\right\} $
-.
+the likelihood of $\left\{ \mbox{Heads}\right\} $ and $\left\{ \mbox{Tails}\right\} $.
 
 Once the probability measure is chosen (or determined), there is not
 much left to do. All assignments of probability are made by the probability
@@ -4342,9 +4341,9 @@
 
 As the reasoning goes, to learn about the probability of an event
 $A$ we need only repeat the random experiment to get a reasonable
-estimate of its numerical value, and if we are not satisfied with
-our estimate then we may simply repeat the experiment more times,
-all the while confident that with more and more experiments our estimate
+estimate of the probability's value, and if we are not satisfied with
+our estimate then we may simply repeat the experiment more times all
+the while confident that with more and more experiments our estimate
 will stabilize to the true value. 
 
 The frequentist approach is good because it is relatively light on
@@ -4371,7 +4370,7 @@
 knowledge at the time. As new information becomes available, the estimate
 is modified accordingly to best reflect his/her current knowledge.
 The method by which the probabilities are updated is commonly done
-with Bayes' Rule, discussed in Section BLANK. 
+with Bayes' Rule, discussed in Section \ref{sec:Bayes'-Rule}. 
 
 So for the coin toss example, a person may have $\P(\mbox{Heads})=1/2$
 in the absence of additional information. But perhaps the observer
@@ -4380,11 +4379,11 @@
 magicians may be trained to be quite skilled at tossing coins, and
 some are so skilled that they may toss a fair coin and get nothing
 but Heads, indefinitely. I have \emph{seen} this. It was similarly
-claimed in \emph{Bringing Down the House} BLANK that MIT students
-were accomplished enough with cards to be able to cut a deck to the
-same location, every single time. In such cases, one clearly should
-use the additional information to assign $\P(\mbox{Heads})$ away
-from the symmetry value of $1/2$.
+claimed in \emph{Bringing Down the House} \cite{Mezrich2003} that
+MIT students were accomplished enough with cards to be able to cut
+a deck to the same location, every single time. In such cases, one
+clearly should use the additional information to assign $\P(\mbox{Heads})$
+away from the symmetry value of $1/2$.
 
 This approach works well in situations that cannot be repeated indefinitely,
 for example, to assign your probability that you will get an A in
@@ -8164,12 +8163,13 @@
 \label{pro:func-cont-rvs-pdf-formula}Let $X$ have PDF $f_{X}$ and
 let $g$ be a function which is one-to-one with a differentiable inverse
 $g^{-1}$. Then the PDF of $U=g(X)$ is given by\begin{equation}
-f_{U}(u)=f_{X}\left[g^{-1}(u)\right]\ \left|\frac{\diff}{\diff u}g^{-1}(u)\right|.\end{equation}
+f_{U}(u)=f_{X}\left[g^{-1}(u)\right]\ \left|\frac{\diff}{\diff u}g^{-1}(u)\right|.\label{eq:univ-trans-pdf-long}\end{equation}
 \end{prop}
 \begin{rem}
-The formula in Equation BLANK is nice, but does not really make any
-sense. It is better to write in the intuitive form\begin{equation}
-f_{U}(u)=f_{X}(x)\left|\frac{\diff x}{\diff u}\right|.\end{equation}
+The formula in Equation \ref{eq:univ-trans-pdf-long} is nice, but
+does not really make any sense. It is better to write in the intuitive
+form\begin{equation}
+f_{U}(u)=f_{X}(x)\left|\frac{\diff x}{\diff u}\right|.\label{eq:univ-trans-pdf-short}\end{equation}
 \end{rem}
 \begin{example}
 Let $X\sim\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$,
@@ -8201,8 +8201,9 @@
 distribution. Indeed, we may use an identical argument as the above
 to prove the following fact:
 \begin{fact}
-If $X\sim\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$ and
-if $Y=a+bX$ for constants $a$ and $b$, with $b\neq0$, then $Y\sim\mathsf{norm}(\mathtt{mean}=a+b\mu,\,\mathtt{sd}=|b|\sigma)$. 
+\label{fac:lin-trans-norm-is-norm}If $X\sim\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$
+and if $Y=a+bX$ for constants $a$ and $b$, with $b\neq0$, then
+$Y\sim\mathsf{norm}(\mathtt{mean}=a+b\mu,\,\mathtt{sd}=|b|\sigma)$. 
 \end{fact}
 Note that it is sometimes easier to \emph{postpone} solving for the
 inverse transformation $x=x(u)$. Instead, leave the transformation
@@ -8213,7 +8214,7 @@
 f_{U}(u)=f_{X}(x)\left|\frac{1}{\diff u/\diff x}\right|.\end{equation}
 In many cases there are cancellations and the work is shorter. Of
 course, it is not always true that\begin{equation}
-\frac{\diff x}{\diff u}=\frac{1}{\diff u/\diff x},\end{equation}
+\frac{\diff x}{\diff u}=\frac{1}{\diff u/\diff x},\label{eq:univ-jacob-recip}\end{equation}
 but for the well-behaved examples in this book the trick works just
 fine.
 \begin{rem}
@@ -9601,7 +9602,7 @@
 PDF of two new random variables\begin{equation}
 U=g(X,Y)\quad\mbox{and}\quad V=h(X,Y),\end{equation}
 where $g$ and $h$ are two given functions, typically {}``nice''
-in the sense of Appendix BLANK. 
+in the sense of Appendix \ref{sec:Multivariable-Calculus}. 
 
 Suppose that the transformation $(x,y)\longmapsto(u,v)$ is one-to-one.
 Then an inverse transformation $x=x(u,v)$ and $y=y(u,v)$ exists,
@@ -9611,9 +9612,9 @@
 \begin{equation}
 f_{U,V}(u,v)=f_{X,Y}\left[x(u,v),\, y(u,v)\right]\left|\frac{\partial(x,y)}{\partial(u,v)}\right|,\end{equation}
 or we can rewrite more shortly as\begin{equation}
-f_{U,V}(u,v)=f_{X,Y}(x,y)\left|\frac{\partial(x,y)}{\partial(u,v)}\right|.\end{equation}
-Take a moment and compare Equation BLANK to Equation BLANK. Do you
-see the connection?
+f_{U,V}(u,v)=f_{X,Y}(x,y)\left|\frac{\partial(x,y)}{\partial(u,v)}\right|.\label{eq:biv-trans-pdf-short}\end{equation}
+Take a moment and compare Equation \ref{eq:biv-trans-pdf-short} to
+Equation \ref{eq:univ-trans-pdf-short}. Do you see the connection?
 \begin{rem}
 It is sometimes easier to \emph{postpone} solving for the inverse
 transformation $x=x(u,v)$ and $y=y(u,v)$. Instead, leave the transformation
@@ -9626,10 +9627,10 @@
 f_{U,V}(u,v)=f_{X,Y}(x,y)\left|\frac{1}{\frac{\partial(u,v)}{\partial(x,y)}}\right|.\end{equation}
 In some cases there will be a cancellation and the work will be a
 lot shorter. Of course, it is not always true that\begin{equation}
-\frac{\partial(x,y)}{\partial(u,v)}=\frac{1}{\frac{\partial(u,v)}{\partial(x,y)}},\end{equation}
+\frac{\partial(x,y)}{\partial(u,v)}=\frac{1}{\frac{\partial(u,v)}{\partial(x,y)}},\label{eq:biv-jacob-recip}\end{equation}
 but for the well-behaved examples that we will see in this book it
 works just fine\ldots{} do you see the connection between Equations
-BLANK and BLANK?\end{rem}
+\ref{eq:biv-jacob-recip} and \ref{eq:univ-jacob-recip}?\end{rem}
 \begin{example}
 Let $(X,Y)\sim\mathsf{mvnorm}(\mathtt{mean}=\mathbf{0}_{2\times1},\,\mathtt{sigma}=\mathbf{I}_{2\times2})$
 and consider the transformation\begin{align*}
@@ -9648,11 +9649,12 @@
 we get that the joint PDF of $(U,V)$ is
 
 \begin{equation}
-f_{U,V}(u,v)=\frac{1}{2\pi}\exp\left\{ -\frac{1}{2}\left[\left(-3u+2v\right)^{2}+\left(\frac{5u-3v}{2}\right)^{2}\right]\right\} \cdot\frac{1}{2},\quad(u,v)\in\R^{2}.\end{equation}
+f_{U,V}(u,v)=\frac{1}{2\pi}\exp\left\{ -\frac{1}{2}\left[\left(-3u+2v\right)^{2}+\left(\frac{5u-3v}{2}\right)^{2}\right]\right\} \cdot\frac{1}{2},\quad(u,v)\in\R^{2}.\label{eq:biv-norm-hidden}\end{equation}
 \end{example}
 \begin{rem}
-It may not be obvious, but Equation BLANK is the PDF of a $\mathsf{mvnorm}$
-distribution. For a more general result see Proposition BLANK.
+It may not be obvious, but Equation \ref{eq:biv-norm-hidden} is the
+PDF of a $\mathsf{mvnorm}$ distribution. For a more general result
+see Theorem \ref{thm:mvnorm-dist-matrix-prod}.
 \end{rem}
 
 \subsection{How to do it with \textsf{R\label{sub:bivariate-transf-R}}}
@@ -9665,7 +9667,8 @@
 the \textsf{R} console.
 
 There are not yet any examples of Yacas in this book, but there are
-online materials to help the interested reader: see BLANK to get started.
+online materials to help the interested reader: see \url{http://code.google.com/p/ryacas/}
+to get started.
 
 
 \section{Remarks for the Multivariate Case\label{sec:Remarks-for-the-Multivariate}}
@@ -9674,8 +9677,9 @@
 have a whole bunch of them: $X_{1}$, $X_{2}$,\ldots{}, $X_{n}$,
 which we can shorten to $\mathbf{X}=(X_{1},X_{2},\ldots,X_{n})^{\mathrm{T}}$
 to make the formulas prettier (now may be a good time to check out
-Appendix BLANK). For $\mathbf{X}$ supported on the set $S_{\mathbf{X}}$,
-the joint PDF $f_{\mathbf{X}}$ (if it exists) satisfies\begin{equation}
+Appendix \ref{sec:Linear-Algebra}). For $\mathbf{X}$ supported on
+the set $S_{\mathbf{X}}$, the joint PDF $f_{\mathbf{X}}$ (if it
+exists) satisfies\begin{equation}
 f_{\mathbf{X}}(\mathbf{x})>0,\quad\mbox{for }\mathbf{x}\in S_{\mathbf{X}},\end{equation}
 and\begin{equation}
 \int\!\!\!\int\cdots\int f_{\mathbf{X}}(\mathbf{x})\,\diff x_{1}\diff x_{2}\cdots\diff x_{n}=1,\end{equation}
@@ -9709,12 +9713,12 @@
 for any reordering $\mathbf{x^{\ast}}$ of the elements of $\mathbf{x}=(x_{1},x_{2},\ldots,x_{n})$
 in the joint support.
 \begin{prop}
-Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$ be independent with respective
-population means $\mu_{1}$, $\mu_{2}$, \ldots{}, $\mu_{n}$ and
-standard deviations $\sigma_{1}$, $\sigma_{2}$, \ldots{}, $\sigma_{n}$.
-For given constants $a_{1}$, $a_{2}$, \ldots{},$a_{n}$ define
-$Y=\sum_{i=1}^{n}a_{i}X_{i}$. Then the mean and standard deviation
-of $Y$ are given by the formulas\begin{equation}
+\label{pro:mean-sd-lin-comb}Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$
+be independent with respective population means $\mu_{1}$, $\mu_{2}$,
+\ldots{}, $\mu_{n}$ and standard deviations $\sigma_{1}$, $\sigma_{2}$,
+\ldots{}, $\sigma_{n}$. For given constants $a_{1}$, $a_{2}$,
+\ldots{},$a_{n}$ define $Y=\sum_{i=1}^{n}a_{i}X_{i}$. Then the
+mean and standard deviation of $Y$ are given by the formulas\begin{equation}
 \mu_{Y}=\sum_{i=1}^{n}a_{i}\mu_{i},\quad\sigma_{Y}=\left(\sum_{i=1}^{n}a_{i}^{2}\sigma_{i}^{2}\right)^{1/2}.\end{equation}
 
 \end{prop}
@@ -9755,7 +9759,7 @@
 such that $(X_{1},\ldots,X_{k})$ are exchangeable for every $k$.
 Then there exists a random variable $\Theta$ with support $[0,1]$
 and PDF $f_{\Theta}(\theta)$ such that\begin{equation}
-\P(X_{1}=x_{1},\ldots,\, X_{k}=x_{k})=\int_{0}^{1}\theta^{\sum x_{i}}(1-\theta)^{k-\sum x_{i}}\, f_{\Theta}(\theta)\,\diff\theta,\end{equation}
+\P(X_{1}=x_{1},\ldots,\, X_{k}=x_{k})=\int_{0}^{1}\theta^{\sum x_{i}}(1-\theta)^{k-\sum x_{i}}\, f_{\Theta}(\theta)\,\diff\theta,\label{eq:definetti-binary}\end{equation}
 for all $x_{i}=0,\,1$, $i=1,\,2,\ldots,k$.
 \end{thm}
 
@@ -9776,7 +9780,7 @@
 by adding up terms that look like\begin{equation}
 \theta^{\sum x_{i}}(1-\theta)^{k-\sum x_{i}}\, f_{\Theta}(\theta),\end{equation}
 where we sum over all possible coins. The right-hand side of Equation
-BLANK is a sophisticated way to denote this process.
+\ref{eq:definetti-binary} is a sophisticated way to denote this process.
 
 Of course, the integral's value does not change if we jumble the $x_{i}$'s,
 so $(X_{1},\ldots,X_{k})$ are clearly exchangeable. The power of
@@ -9787,7 +9791,8 @@
 $\theta$ corresponds to $f_{\Theta}(\theta)$ and the likelihood
 of the sequence $X_{1}=x_{1},\ldots,\, X_{k}=x_{k}$ (conditional
 on $\theta$) corresponds to $\theta^{\sum x_{i}}(1-\theta)^{k-\sum x_{i}}$.
-Compare Equation BLANK to Section BLANK and Section BLANK.
+Compare Equation \ref{eq:definetti-binary} to Section \ref{sec:Bayes'-Rule}
+and Section \ref{sec:Conditional-Distributions}.
 
 
 
@@ -9800,7 +9805,7 @@
 M_{\mathbf{X}}(\mathbf{t})=\exp\left\{ \upmu^{\top}\mathbf{t}+\frac{1}{2}\mathbf{t}^{\top}\Sigma\mathbf{t}\right\} .\end{equation}
 We will need the following in Chapter \ref{cha:Multiple-Linear-Regression}.
 \begin{thm}
-If $\mathbf{X}\sim\mathsf{mvnorm}(\mathtt{mean}=\upmu,\,\mathtt{sigma}=\Sigma)$
+\label{thm:mvnorm-dist-matrix-prod}If $\mathbf{X}\sim\mathsf{mvnorm}(\mathtt{mean}=\upmu,\,\mathtt{sigma}=\Sigma)$
 and $\mathbf{A}$ is any matrix, then the random vector $\mathbf{Y}=\mathbf{AX}$
 is distributed\begin{equation}
 \mathbf{Y}\sim\mathsf{mvnorm}(\mathtt{mean}=\mathbf{A}\upmu,\,\mathtt{sigma}=\mathbf{A}\Sigma\mathbf{A}^{\mathrm{T}}).\end{equation}
@@ -9965,9 +9970,9 @@
 \chapter{Sampling Distributions\label{cha:Sampling-Distributions}}
 
 This is an important chapter; it is the bridge from probability and
-descriptive statistics that we studied in Chapters BLANK, BLANK and
-BLANK to inferential statistics which forms the latter part of this
-book.
+descriptive statistics that we studied in Chapters \ref{cha:Describing-Data-Distributions}
+through \ref{cha:Multivariable-Distributions} to inferential statistics
+which forms the latter part of this book.
 
 Here is the link: we are presented with a \emph{population} about
 which we would like to learn. And while it would be desirable to examine
@@ -9982,9 +9987,9 @@
 because the complete list of sample information is usually cumbersome,
 unwieldly. We summarize the data set with a descriptive \emph{statistic},
 a quantity calculated from the data (we saw many examples of these
-in Chapter BLANK). But our sample was random\ldots{} therefore, it
-stands to reason that our statistic will be random, too. How is the
-statistic distributed?
+in Chapter \ref{cha:Describing-Data-Distributions}). But our sample
+was random\ldots{} therefore, it stands to reason that our statistic
+will be random, too. How is the statistic distributed?
 
 The probability distribution associated with the population (from
 which we sample) is called the \emph{population distribution}, and
@@ -10036,22 +10041,22 @@
 \ldots{}, $X_{n}$ are a \emph{simple random sample of size} $n$,
 denoted $SRS(n)$, from the population $f$. \end{defn}
 \begin{prop}
-Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$ be a $SRS(n)$ from a
-population distribution with mean $\mu$ and finite standard deviation
-$\sigma$. Then the mean and standard deviation of $\Xbar$ are given
-by the formulas $\mu_{\Xbar}=\mu$ and $\sigma_{\Xbar}=\sigma/\sqrt{n}$.
+\label{pro:mean-sd-xbar}Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$
+be a $SRS(n)$ from a population distribution with mean $\mu$ and
+finite standard deviation $\sigma$. Then the mean and standard deviation
+of $\Xbar$ are given by the formulas $\mu_{\Xbar}=\mu$ and $\sigma_{\Xbar}=\sigma/\sqrt{n}$.
 \end{prop}
 \begin{proof}
-Plug in $a_{1}=a_{2}=\cdots=a_{n}=1/n$ in Proposition BLANK. 
+Plug in $a_{1}=a_{2}=\cdots=a_{n}=1/n$ in Proposition \ref{pro:mean-sd-lin-comb}. 
 \end{proof}
 
 
 The next fact will be useful to us when it comes time to prove the
-Central Limit Theorem in Section BLANK.
+Central Limit Theorem in Section \ref{sec:The-Central-Limit}.
 \begin{prop}
-Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$ be a $SRS(n)$ from a
-population distribution with MGF $M(t)$. Then the MGF of $\Xbar$
-is given by\begin{equation}
+\label{pro:mgf-xbar}Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$ be
+a $SRS(n)$ from a population distribution with MGF $M(t)$. Then
+the MGF of $\Xbar$ is given by\begin{equation}
 M_{\Xbar}(t)=\left[M\left(\frac{t}{n}\right)\right]^{n}.\end{equation}
 
 \end{prop}
@@ -10082,11 +10087,11 @@
 \end{prop}
 \begin{proof}
 The mean and standard deviation of $\Xbar$ follow directly from Proposition
-BLANK. To address the shape, first remember from Chapter BLANK that
-the $\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$ MGF is
-of the form\[
+\ref{pro:mean-sd-xbar}. To address the shape, first remember from
+Section \ref{sec:The-Normal-Distribution} that the $\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$
+MGF is of the form\[
 M(t)=\exp\left\{ \mu t+\sigma^{2}t^{2}/2\right\} .\]
-Now use Proposition BLANK to find\begin{eqnarray*}
+Now use Proposition \ref{pro:mgf-xbar} to find\begin{eqnarray*}
 M_{\Xbar}(t) & = & \left[M\left(\frac{t}{n}\right)\right]^{n},\\
  & = & \left[\exp\left\{ \mu(t/n)+\sigma^{2}(t/n)^{2}/2\right\} \right]^{n},\\
  & = & \exp\left\{ \, n\cdot\left[\mu(t/n)+\sigma^{2}(t/n)^{2}/2\right]\right\} ,\\
@@ -10114,8 +10119,8 @@
 \begin{proof}
 The proof is beyond the scope of the present book, but the theorem
 is simply too important to be omitted. The interested reader could
-consult Casella and Berger, or any other sophisticated text on Mathematical
-Statistics. 
+consult Casella and Berger \cite{Casella2002}, or Hogg \emph{et al}
+\cite{Hogg2005}. 
 \end{proof}
 
 
@@ -10141,19 +10146,19 @@
 and we know from Section \ref{sub:Samp-Var-Dist} that $V\sim\mathsf{chisq}(\mathtt{df}=n-1)$.
 Further, since we are sampling from a normal distribution, Theorem
 \ref{thm:Xbar-andS} gives that $\Xbar$ and $S^{2}$ are independent
-and by Fact BLANK so are $Z$ and $V$. In summary, the distribution
-of $T$ is the same as the distribution of the quantity $Z/\sqrt{V/r}$,
-where $Z\sim\mathsf{norm}(\mathtt{mean}=0,\,\mathtt{sd}=1)$ and $V\sim\mathsf{chisq}(\mathtt{df}=r)$
-are independent. This is in fact the definition of Student's $t$
-distribution.
+and by Fact \ref{fac:indep-then-function-indep} so are $Z$ and $V$.
+In summary, the distribution of $T$ is the same as the distribution
+of the quantity $Z/\sqrt{V/r}$, where $Z\sim\mathsf{norm}(\mathtt{mean}=0,\,\mathtt{sd}=1)$
+and $V\sim\mathsf{chisq}(\mathtt{df}=r)$ are independent. This is
+in fact the definition of Student's $t$ distribution.
 \end{proof}
 
 
 This distribution was first published by W.~S.~Gosset (1900) under
 the pseudonym Student, and the distribution has consequently come
 to be known as Student's $t$ distribution. The PDF of $T$ can be
-derived explicitly using the techniques of Section BLANK; it takes
-the form 
+derived explicitly using the techniques of Section \ref{sec:Functions-of-Continuous};
+it takes the form 
 
 \begin{equation}
 f_{X}(x)=\frac{\Gamma[(r+1)/2]}{\sqrt{r\pi}\ \Gamma(r/2)}\left(1+\frac{x^{2}}{r}\right)^{-(r+1)/2},\quad\-\infty<x<\infty\end{equation}
@@ -10202,9 +10207,9 @@
 \ref{sec:Sampling-from-Normal} that when $X_{1}$, $X_{2}$, \ldots{},
 $X_{n}$ is a $SRS(n)$ from a $\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma)$
 distribution then $\Xbar\sim\mathsf{norm}(\mathtt{mean}=\mu,\,\mathtt{sd}=\sigma/\sqrt{n})$.
-In other words, we may say (owing to Proposition BLANK) when the underlying
-population is normal that the sampling distribution of $Z$ defined
-by \begin{equation}
+In other words, we may say (owing to Fact \ref{fac:lin-trans-norm-is-norm})
+when the underlying population is normal that the sampling distribution
+of $Z$ defined by \begin{equation}
 Z=\frac{\Xbar-\mu}{\sigma/\sqrt{n}}\end{equation}
 is $\mathsf{norm}(\mathtt{mean}=0,\,\mathtt{sd}=1)$. 
 
@@ -10213,10 +10218,10 @@
 What can be said in this case? The surprising answer is contained
 in the following theorem.
 \begin{thm}
-\textbf{The Central Limit Theorem.} Let $X_{1}$, $X_{2}$, \ldots{},
-$X_{n}$ be a $SRS(n)$ from a population distribution with mean $\mu$
-and finite standard deviation $\sigma$. Then the sampling distribution
-of \begin{equation}
+\textbf{\label{thm:central-limit-thrm}The Central Limit Theorem.}
+Let $X_{1}$, $X_{2}$, \ldots{}, $X_{n}$ be a $SRS(n)$ from a
+population distribution with mean $\mu$ and finite standard deviation
+$\sigma$. Then the sampling distribution of \begin{equation}
 Z=\frac{\Xbar-\mu}{\sigma/\sqrt{n}}\end{equation}
 approaches a $\mathsf{norm}(\mathtt{mean}=0,\,\mathtt{sd}=1)$ distribution
 as $n\to\infty$. \end{thm}
@@ -10231,12 +10236,12 @@
 
 \begin{rem}
 Notice that the shape of the underlying population's distribution
-is not mentioned in Theorem BLANK; indeed, the result is true for
-any population that is well-behaved enough to have a finite standard
-deviation. In particular, if the population is normally distributed
-then we know from Section BLANK that the distribution of $\Xbar$
-(and $Z$ by extension) is \emph{exactly} normal, for \emph{every}
-$n$.
+is not mentioned in Theorem \ref{thm:central-limit-thrm}; indeed,
+the result is true for any population that is well-behaved enough
+to have a finite standard deviation. In particular, if the population
+is normally distributed then we know from Section \ref{sub:Samp-Mean-Dist}
+that the distribution of $\Xbar$ (and $Z$ by extension) is \emph{exactly}
+normal, for \emph{every} $n$.
 \end{rem}
 
 \begin{rem}
@@ -10275,12 +10280,11 @@
 package has the functions \inputencoding{latin9}\lstinline[showstringspaces=false]!clt1!\inputencoding{utf8},
 \inputencoding{latin9}\lstinline[showstringspaces=false]!clt2!\inputencoding{utf8},
 and \inputencoding{latin9}\lstinline[showstringspaces=false]!clt3!\inputencoding{utf8}
-(see Exercises BLANK, BLANK, and BLANK at the end of this chapter).
-The purpose of each is to investigate what happens to the sampling
-distribution of $\Xbar$ when the population distribution is mound
-shaped, finite support, and skewed, namely $\mathsf{dt}(\mathtt{df}=3)$,
-$\mathsf{unif}(\mathtt{a}=0,\,\mathtt{b}=10)$ and $\mathsf{gamma}(\mathtt{shape}=,\,\mathtt{scale}=)$,
-respectively. 
+(see Exercise \ref{xca:clt123} at the end of this chapter). Its purpose
+is to investigate what happens to the sampling distribution of $\Xbar$
+when the population distribution is mound shaped, finite support,
+and skewed, namely $\mathsf{dt}(\mathtt{df}=3)$, $\mathsf{unif}(\mathtt{a}=0,\,\mathtt{b}=10)$
+and $\mathsf{gamma}(\mathtt{shape}=,\,\mathtt{scale}=)$, respectively. 
 
 For example, when the command \inputencoding{latin9}\lstinline[showstringspaces=false]!clt1()!\inputencoding{utf8}
 is issued a plot window opens to show a graph of the PDF of a $\mathsf{dt}(\mathtt{df}=3)$
@@ -10533,9 +10537,9 @@
 \item Find $\P(a<\Xbar\leq b)$
 \item Find $\P(\Xbar>c)$.\end{enumerate}
 \begin{xca}
-In this exercise we will investigate how the shape of the population
-distribution affects the time until the distribution of $\Xbar$ is
-acceptably normal.
+\label{xca:clt123}In this exercise we will investigate how the shape
+of the population distribution affects the time until the distribution
+of $\Xbar$ is acceptably normal.
 \end{xca}
 Answer the questions and write a report about what you have learned.
 Use plots and histograms to support your conclusions. See Appendix
@@ -11297,14 +11301,15 @@
 \Xbar-\Ybar\sim\mathsf{norm}\left(\mathtt{mean}=\mu_{X}-\mu_{Y},\,\mathtt{sd}=\sqrt{\frac{\sigma_{X}^{2}}{n}+\frac{\sigma_{Y}^{2}}{m}}\right).\end{equation}
 Therefore, a $100(1-\alpha)$\% confidence interval for $\mu_{X}-\mu_{Y}$
 is given by\begin{equation}
-\left(\Xbar-\Ybar\right)\pm z_{\alpha/2}\sqrt{\frac{\sigma_{X}^{2}}{n}+\frac{\sigma_{Y}^{2}}{m}}.\end{equation}
+\left(\Xbar-\Ybar\right)\pm z_{\alpha/2}\sqrt{\frac{\sigma_{X}^{2}}{n}+\frac{\sigma_{Y}^{2}}{m}}.\label{eq:two-samp-mean-CI}\end{equation}
 Unfortunately, most of the time the values of $\sigma_{X}$ and $\sigma_{Y}$
 are unknown. This leads us to the following:
 \begin{itemize}
 \item If both sample sizes are large, then we may appeal to the CLT/SLLN
-(see BLANK) and substitute $S_{X}^{2}$ and $S_{Y}^{2}$ for $\sigma_{X}^{2}$
-and $\sigma_{Y}^{2}$ in the interval BLANK. The resulting confidence
-interval will have approximately $100(1-\alpha)\%$ confidence.
+(see \ref{sec:The-Central-Limit}) and substitute $S_{X}^{2}$ and
+$S_{Y}^{2}$ for $\sigma_{X}^{2}$ and $\sigma_{Y}^{2}$ in the interval
+\ref{eq:two-samp-mean-CI}. The resulting confidence interval will
+have approximately $100(1-\alpha)\%$ confidence.
 \item If one or more of the sample sizes is small then we are in trouble,
 unless
 
@@ -11382,8 +11387,8 @@
 f(p)=\left(Y/n-p\right)^{2}-z_{\alpha/2}^{2}\frac{p(1-p)}{n}\]
 satisfies $f(p)\leq0$. But $f$ is quadratic in $p$ so its graph
 is a parabola; it has two roots, and these roots form the limits of
-the confidence interval. We can get an expression for the bounds by
-means of the quadratic formula (see Exercise BLANK):\begin{equation}
+the confidence interval. We can find them with the quadratic formula
+(see Exercise \ref{xca:CI-quad-form}):\begin{equation}
 \left.\left[\left(\hat{p}+\frac{z_{\alpha/2}^{2}}{2n}\right)\pm z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}+\frac{z_{\alpha/2}^{2}}{(2n)^{2}}}\right]\right\slash \left(1+\frac{z_{\alpha/2}^{2}}{n}\right)\end{equation}
  This approach is called the \emph{score interval} because it is based
 on the inversion of the {}``Score test''. See Section BLANK. It
@@ -11455,7 +11460,7 @@
 
 \subsection{How to do it with \textsf{R}}
 
-I am thinking about fitdistr() here.
+I am thinking about fitdistr from the MASS package \cite{Venables2002}.
 
 
 \section{Sample Size and Margin of Error\label{sec:Sample-Size-and-MOE}}
@@ -11543,8 +11548,6 @@
 
 \section{Other Topics\label{sec:Other-Topics}}
 
-I am thinking about fitdistr from the MASS package \cite{Venables2002}.
-
 Mention mle from the stats4 package
 
 \newpage{}
@@ -11557,6 +11560,13 @@
 Find a two-dimensional MLE for $\theta=(\mu,\sigma)$.\label{xca:norm-mu-sig-MLE}
 \end{xca}
 
+\begin{xca}
+\label{xca:CI-quad-form}Find the upper and lower limits for the confidence
+interval procedure by finding the roots of $f$ defined by \[
+f(p)=\left(Y/n-p\right)^{2}-z_{\alpha/2}^{2}\frac{p(1-p)}{n}.\]
+You are going to need the quadratic formula.
+\end{xca}
+
 \chapter{Hypothesis Testing\label{cha:Hypothesis-Testing}}
 
 
@@ -14563,7 +14573,8 @@
 \end{lstlisting}
 \inputencoding{utf8}See \inputencoding{latin9}\lstinline[showstringspaces=false]!?poly!\inputencoding{utf8}
 and \inputencoding{latin9}\lstinline[showstringspaces=false]!?cars!\inputencoding{utf8}
-for more information. \end{enumerate}
+for more information. Note that we can recover the approach in 2 with
+\inputencoding{latin9}\lstinline[showstringspaces=false]!poly(Girth, degree = 2, raw = TRUE)!\inputencoding{utf8}. \end{enumerate}
 \begin{example}
 We will fit the quadratic model to the \inputencoding{latin9}\lstinline[showstringspaces=false]!trees!\inputencoding{utf8}
 data and display the results with \inputencoding{latin9}\lstinline[showstringspaces=false]!summary!\inputencoding{utf8},
@@ -15244,7 +15255,7 @@
 
 \end{enumerate}
 
-\chapter{\label{cha:Resampling-Methods}Resampling Methods}
+\chapter{Resampling Methods\label{cha:Resampling-Methods}}
 
 
 \paragraph*{What do I want them to know?}
@@ -15417,19 +15428,16 @@
 In this example we extend our study to include more complicated statistics
 and data where we do not know the answer ahead of time. This example
 uses the \inputencoding{latin9}\lstinline[showstringspaces=false]!rivers!\inputencoding{utf8}\index{Data sets!rivers@\texttt{rivers}}
-dataset; recall the stemplot on page \vpageref{ite:stemplot-rivers}
-that we made for these data. 
-
-We see from the stemplot that the \inputencoding{latin9}\lstinline[showstringspaces=false]!rivers!\inputencoding{utf8}
-data are clearly right-skewed, so a natural estimate of center would
-be the sample median. Unfortunately, its sampling distribution falls
-out of our reach. We use the bootstrap to help us with this problem,
-and the modifications to the last example are trivial.
+dataset. Recall the stemplot on page \vpageref{ite:stemplot-rivers}
+that we made for these data which shows them to be markedly right-skewed,
+so a natural estimate of center would be the sample median. Unfortunately,
+its sampling distribution falls out of our reach. We use the bootstrap
+to help us with this problem, and the modifications to the last example
+are trivial.
 \end{example}
 <<>>=
 resamps <- replicate(1000, sample(rivers, 141, TRUE), simplify = FALSE)
 medstar <- sapply(resamps, median, simplify = TRUE)
-mean(medstar)
 sd(medstar)
 @
 
@@ -15455,7 +15463,8 @@
 @
 \begin{example}
 The boot package in \texttt{R}. It turns out that there are many bootstrap
-procedures and commands already built into \texttt{R}, in the \inputencoding{latin9}\lstinline[showstringspaces=false]!boot!\inputencoding{utf8}
+procedures and commands already built into base \texttt{R}, in the
+\inputencoding{latin9}\lstinline[showstringspaces=false]!boot!\inputencoding{utf8}
 package. Further, inside the \inputencoding{latin9}\lstinline[showstringspaces=false]!boot!\inputencoding{utf8}
 package there is even a function called \inputencoding{latin9}\lstinline[showstringspaces=false]!boot!\inputencoding{utf8}\index{boot@\texttt{boot}}.
 The basic syntax is of the form:
@@ -15469,7 +15478,7 @@
 Here, \inputencoding{latin9}\lstinline[showstringspaces=false]!data!\inputencoding{utf8}
 is a vector (or matrix) containing the data to be resampled, \inputencoding{latin9}\lstinline[showstringspaces=false]!statistic!\inputencoding{utf8}
 is a defined function, \emph{of two arguments}, that tells which statistic
-to be computed, and the parameter \inputencoding{latin9}\lstinline[showstringspaces=false]!R!\inputencoding{utf8}
+should be computed, and the parameter \inputencoding{latin9}\lstinline[showstringspaces=false]!R!\inputencoding{utf8}
 specifies how many resamples should be taken.
 
 For the standard error of the mean (Example \ref{exa:Bootstrap-se-mean}):
@@ -15501,13 +15510,13 @@
 While the sampling distribution is centered at the population mean
 (plus any bias), the bootstrap distribution is centered at the original
 value of the statistic (plus any bias). The \inputencoding{latin9}\lstinline[showstringspaces=false]!boot!\inputencoding{utf8}
-function gives an empirical estimate of the bias in the statistic
+function gives an empirical estimate of the bias of the statistic
 as part of its output. 
 \item We tried to estimate the standard error, but we could have (in principle)
 tried to estimate something else. Note from the previous remark, however,
-that it would be useless to try to estimate the population mean $\mu$
-using the bootstrap since the mean of the bootstrap distribution is
-the observed $\xbar$. 
+that it would be useless to estimate the population mean $\mu$ using
+the bootstrap since the mean of the bootstrap distribution is the
+observed $\xbar$. 
 \item You don't get something from nothing. We have seen that we can take
 a random sample from a population and use bootstrap methods to get
 a very good idea about standard errors, bias, and the like. However,

Modified: pkg/IPSUR/inst/doc/IPSUR.bib
===================================================================
--- pkg/IPSUR/inst/doc/IPSUR.bib	2010-01-07 18:25:36 UTC (rev 128)
+++ pkg/IPSUR/inst/doc/IPSUR.bib	2010-01-08 16:34:22 UTC (rev 129)
@@ -605,6 +605,16 @@
   url = {http://CRAN.R-project.org/package=DAAG}
 }
 
+ at BOOK{Mezrich2003,
+  title = {Bringing Down the House: The Inside Story of Six M.I.T. Students
+	Who Took Vegas for Millions},
+  publisher = {Free Press},
+  year = {2003},
+  author = {Mezrich, Ben},
+  owner = {jay},
+  timestamp = {2010.01.08}
+}
+
 @MISC{Miller,
   author = {Miller, Jeff},
   title = {Earliest Known Uses of Some of the Words of Mathematics},
@@ -654,6 +664,15 @@
   timestamp = {2009.12.30}
 }
 
+ at BOOK{Rizzo2008,
+  title = {Statistical Computing with R},
+  publisher = {Chapman \& Hall/CRC},
+  year = {2008},
+  author = {Rizzo, Maria L.},
+  owner = {jay},
+  timestamp = {2010.01.07}
+}
+
 @BOOK{Robert2004,
   title = {Monte Carlo Statistical Methods},
   publisher = {Springer},



More information about the IPSUR-commits mailing list