University of Minnesota, Twin Cities
School of Statistics
Stat 3011
Rweb
Textbook (Wild and Seber)

# Stat 3011 (Geyer) In-Class Examples (Chapter 4)

## General Instructions

To do each example, just click the "Submit" button.
You do not have to type in any R instructions (that's already done for you).
You do not have to select a dataset (that's already done for you).
Like Figure 4.1.1 in Wild and Seber but with a normal scale rather than
their log scale on the horizontal axis.

### Comments

- The
`sample`

generates a random sample from a specified set
either with or without replacement. Here the set is `c(0, 1)`

and the sampling is with replacement. This is just like coin flips,
except that we've coded zero for tails and one for heads.
`cumsum`

returns the vector of cumulative sums of a sequence.
Thus `y`

is the vector of relative frequencies of heads (ones),
that is `y[``k`]

is the relative of frequencies of heads
in the first `k` flips.