Skip to content
Probability and Statistics: a simulation-based introduction. An open-access book.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img format pdf, calibration, mcmc, regression-mean chapters Feb 18, 2019
.gitignore Initial commit Dec 7, 2018
LICENSE Initial commit Dec 7, 2018
README.md clarified R and system requirements in readme May 8, 2019
_bookdown.yml kl divergence with rvs May 8, 2019
all.bib basic style and first chapters Dec 7, 2018
before-chapter.R entropy, typical sets May 5, 2019
build-pdf.sh fixed build script, linebreak in title, updated README.md Dec 14, 2018
build.sh format pdf, calibration, mcmc, regression-mean chapters Feb 18, 2019
calibration.Rmd format pdf, calibration, mcmc, regression-mean chapters Feb 18, 2019
conjugacy.Rmd fixed format to build pdf May 13, 2019
conjugate-posteriors.Rmd prng test chapter Jan 9, 2019
continuous-random-variables.Rmd pdf formatting and correlated mcmc Feb 19, 2019
densities.Rmd exponential density example Jun 10, 2019
discrete-markov-chains.Rmd
divergence.Rmd fixed format to build pdf May 13, 2019
expectations.Rmd fix ggplot errs Dec 31, 2018
exponential.Rmd binom approx to poisson Mar 25, 2019
finite-markov-chains.Rmd split markov chains to 3 chapters Mar 10, 2019
floating-point.Rmd float pt finished Jan 19, 2019
header.tex caption formatting for latex Mar 23, 2019
hmc.R conjugate algebra Apr 28, 2019
index.Rmd stationary mcmc theory Mar 13, 2019
inference.Rmd pdf formatting and correlated mcmc Feb 19, 2019
information-theory.Rmd discrete entropy examples Jun 10, 2019
joint.Rmd posterior histogram Jan 6, 2019
mcmc-convergence.Rmd exponential distro Mar 24, 2019
mcmc.Rmd caption formatting for latex Mar 23, 2019
metropolis.Rmd exponential distro Mar 24, 2019
multiple-random-variables.Rmd format pdf, calibration, mcmc, regression-mean chapters Feb 18, 2019
normal.Rmd entropy, typical sets May 5, 2019
philosophical-prelude.Rmd steps toward inference Jan 6, 2019
predictive-inference.Rmd pdf formatting and correlated mcmc Feb 19, 2019
random-variables.Rmd caption formatting for latex Mar 23, 2019
regression-mean.Rmd fix number format in rv chapter for pdf Feb 24, 2019
rejection-sampling.Rmd pdf formatting and correlated mcmc Feb 19, 2019
stationary-markov-chains.Rmd stationary mcmc theory Mar 13, 2019
testing-prngs.Rmd format pdf, calibration, mcmc, regression-mean chapters Feb 18, 2019
testing-rngs.Rmd posterior predictive inference Jan 11, 2019
typical-sets.Rmd entropy, typical sets May 5, 2019

README.md

Probability and Statistics: a simulation-based introduction

A reproducible, open-access book (BSD-3 code, CC-BY ND 4.0 text).

Building the Book

  • System Prerequisites: pandoc and pandoc-citeproc must be installed on the operating system and available to be executed on the system PATH.

  • R Prerequisitea: All of the packages found in before-chapter.R must be installed: As of now, this includes ggplot2, grid, gridExtra, knitr, MASS, reshape, rstan, tufte, and bookdown.

Building the HTML

From either the shell script or R commands, HTML output will be generated in directory _book, with top-level page

prob-stats/_book/index.html

Building HTML from unix

From the shell, first change to the directory for the repo, then run the build shell script.

$ cd prob-stats
$ ./build.sh

Building HTML from R

Load the bookdown library, set the working directory to the directory for the repo, then render the book.

$ library(bookdown)
$ setwd('prob-stats')
$ bookdown::render_book('index.Rmd')

Rendering with just index.Rmd as an argument defers the style to the index.Rmd yaml header.

Building the PDF

Pre-requisite: Building the pdf requires pdflatex to be installed on the operating system and available on the PATH.

From either the shell script or R commands, PDF output will be generated in

prob-stats/_main.pdf

Building PDF from unix

From the shell, first change to the directory for the repo, then run the build shell script.

$ cd prob-stats
$ ./build-pdf.sh

Building PDF from R

Load the bookdown library, set the working directory to the directory for the repo, then render the book.

$ library(bookdown)
$ setwd('prob-stats')
$ bookdown::render_book('index.Rmd', 'tufte_book2')

In this case, we specified the tufte_book2 format in the call to render, which will override the default specification in index.Rmd. The PDF file will be in file _book/_main.pdf.

Note on RStudio

If you try to build using the knit button in RStudio from the index.Rmd file, you will get the default HTML output because that is what is specified in the YAML header at the top of index.Rmd.

You can’t perform that action at this time.