I am really confused about how to do the generalization exercises of this lab. I believe I have the beginning portion correct but at the end I just can't seem to get it. I messed around with the code as much as I could and I can't attend lab because of the holidays...so this is my only hope. Any help would be appreciated.
This is my code:
# get 1000 samples with 10 scores each
scores <- rnorm(1000*10,100,25)
samples <- rep(1:1000,each=10)
my_df <- data.frame(samples,scores)
# get the means of the samples
sample_means <- my_df %>%
group_by(samples) %>%
summarise(means=mean(scores))
# make a histogram
ggplot(sample_means, aes(x=means))+
geom_histogram(color="white")+
theme_classic()
#mean of sample means
meanofmeans <- sample_means[,2] %>%
summarise(meanofmeans=mean(means))
meanofmeans
sdofmeans <- sample_means[,2] %>%
summarise(sdofmeans=sd(means))
sdofmeans
Attached are screenshots of the results I am getting.
I am really confused about how to do the generalization exercises of this lab. I believe I have the beginning portion correct but at the end I just can't seem to get it. I messed around with the code as much as I could and I can't attend lab because of the holidays...so this is my only hope. Any help would be appreciated.
This is my code:
Attached are screenshots of the results I am getting.
Thank you for your time.