Social Statistics 5

  • Job DurationLess than a week
  • Project LevelBasic Level
  • Project deadlineExpired

Project detail

# Instructions —-
# For this week I would like you to do simulate sampling in your data using both of the methods we talked about in class. I have put examples below, but you will need to use them with your own data. You will need to build on the work we have done in previous weeks to get a mydata dataset for this assignment.
# Please submit both your code and your histograms to Blackboard for the assignment. If you have trouble uploading multiple files you may email me the histograms.

# New Package —-
# We have a new package this week. You will need to install infer and add it to your list of libraries.
library(infer)

# Sample Simulation Technique —-
virtual_resample %
select(age) %>%
rep_sample_n(size = 500, replace = T)

virtual_resample %>%
ggplot(aes(x=age))+
geom_histogram(bins = 20, color = “white”)

# Bootstrap Simulation Technique —-
bootstrap_resample %
specify(response = age) %>%
generate(reps = 500, type = “bootstrap”) %>%
calculate(stat = “mean”)

visualize(bootstrap_resample)

Industry Categories

Freelancer type required for this project