---
title: "Errata"
author: "Foundations and Applications of Statistics"
date: "Second Edition"
output:
  knitr:::html_vignette:
    variant: html+multiline_tables
    fig_caption: no
    toc: no
  html_document:
    toc: no
  pdf_document:
    highlight: null
    number_sections: no
vignette: |
  %\VignetteIndexEntry{Errata} 
  %\VignetteEngine{knitr::rmarkdown} 
  %\VignetteEncoding{UTF-8}
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```


-------------------------------------------------------------------------------------------------------------------------------
Page Location             Issue
---- -------------------- -----------------------------------------------------------------------------------------------------
25                        printed: `tally(death ~ victim, data = DeathPenalty)` <br>
                          correct: `tally(death ~ defendant, data = DeathPenalty)`

     Exercise 1.20        `geyser` is in the `MASS` package (see page 14).  
                          Use `MASS::geyser` to access this data set.
                          
285  last line            printed: $-2n\pi$  <br>
                          correct: $-n\pi$
                          
286  lines 9-10           printed: correct when $\pi_0 = 0$ but overestimates ... when $\pi_0 > 0$  
                          correct: correct when $\pi_0 = 1/2$ but overestimates ... when $\pi_0 \neq 1/2$
                          
331                       The problem could be clarified to indicate that the *first* moment
                          is not useful. The second moment could be used.
                       
373                       printed: $W = -2 \log\left(\frac{L(\theta_0)}{L(\hat\theta)} \right) = 2 \left(\log(\hat \theta) - \log(\theta_0)\right) \approx I(\hat \theta) (\theta_0 - \hat\theta)^2$ <br>
                          correct: $W = -2 \log\left( \frac{L(\theta_0)}{L(\hat\theta)} \right) = 2 \left(l(\hat \theta) - l(\theta_0)\right) \approx I(\hat \theta) (\theta_0 - \hat\theta)^2$

380  lines 6, 11, 13      printed: `pnorm()`, `pchisq()`, `pchisq()` <br>
                          correct: `qnorm()`, `qchisq()`, `qchisq()`.  

388                       printed: The assymptotic distribution of $\Lambda$   <br>
                          correct: The assymptotic distribution of $W = -2 \log(\Lambda)$

389                       printed: `makLik`  <br>
                          correct: `maxLik`

446  Exercise 5.18        printed: log of the odds ratio  <br>
                          correct: log of the odds

447  line 1               printed: poison  <br>
                          correct: Poisson

498  line 5               printed: internally studentized residuls  <br>
                          correct: internally studentized residuals

747  Exercise A.11        Unfortunately, the `weatherData` package has been 
                          removed from CRAN.
                          Similar data now live in `mosaicData::Weather`, 
                          but the data for several cities are 
                          already contained in a single data frame, 
                          so there is no need to merge from multiple sources.
-------------------------------------------------------------------------------------------------------------------------------


