Data Science, Central Limit Theorem, Artificial Intelligence, Technology, R Programming.
500, 1000) EX <- n*p VarX <- n*p*(1-p) Z_score <- matrix(NA, nrow = s, ncol = length(m)) for (i in 1:s){ for (j in 1:length(m)){ # loop over sample size samp <- rbinom(n = m[j], size = n, prob = 0.05) sample_mean <- mean(samp) # sample mean # Calculate Z score for mean of each sample size