How can I plot graph for sample variance versus sample size while putting random numbers from 1 to 20 in R language -
How can I plot graph for sample variance versus sample size while putting random numbers from 1 to 20 in R language -
how can plot graph sample variance versus sample size while putting random numbers 1 20 in r language?
trinker hate answered this, here rough illustration many assumptions:
sample.max <- 20000 sample.sizes <- seq(1, sample.max, by=10) myfun <- function (x){ var(sample(1:20, x, replace=true)) } variances <- sapply(sample.sizes, myfun) plot(sample.sizes, variances, t='l')
r
Comments
Post a Comment