Learn R Programming

moderndive (version 0.4.0)

pennies_resamples: Bootstrap resamples of a sample of 50 pennies

Description

35 bootstrap resamples with replacement of sample of 50 pennies contained in a 50 cent roll from Florence Bank on Friday February 1, 2019 in downtown Northampton, Massachusetts, USA https://goo.gl/maps/AF88fpvVfm12. The original sample of 50 pennies is available in pennies_sample .

Usage

pennies_resamples

Arguments

Format

A data frame of 1750 rows representing 35 students' bootstrap resamples of size 50 and 3 variables

replicate

ID variable of replicate/resample number.

name

Name of student

year

Year on resampled penny

See Also

pennies_sample

Examples

Run this code
# NOT RUN {
library(ggplot2)
library(dplyr)
bootstrap_sample_means <- pennies_resamples %>% 
  group_by(name) %>% 
  summarize(sample_mean = mean(year))

ggplot(bootstrap_sample_means, aes(x = sample_mean)) +
 geom_histogram(binwidth = 2.5) +
  labs(x = "sample mean year", title = "Bootstrap distribution of sample mean year")
# }

Run the code above in your browser using DataLab