Learn R Programming

testDriveR (version 0.5.2)

kerrich: Kerrich Coin Toss Trial Outcomes

Description

A data set containing 2,000 trials of coin flips from statistician John Edmund Kerrich's 1940s experiments while imprisoned by the Nazis during World War Two.

Usage

data(kerrich)

Arguments

Format

A data frame with 1216 rows and 21 variables:

id

trial

outcome

outcome of each trial; TRUE = heads, FALSE = tails

average

cumulative mean of outcomes

References

https://en.wikipedia.org/wiki/John_Edmund_Kerrich

Examples

Run this code
str(kerrich)

if (require("ggplot2")) {
    ggplot(data = kerrich) +
        geom_hline(mapping = aes(yintercept = .5, color = "p(heads)")) +
        geom_line(mapping = aes(x = id, y = average)) +
        ylim(0,1)
}

Run the code above in your browser using DataLab