#ndata
ndata<- rnorm(10000, mean=200, sd=10) 

sample_n_10 = c()
for (i in 1:10)
{
  sample_n_10 = c(sample_n_10, mean(sample(ndata, 10)))
}

sample_n_100 = c()
for (i in 1:10)
{
  sample_n_100 = c(sample_n_100, mean(sample(ndata, 100)))
}

sample_n_1000 = c()
for (i in 1:10)
{
  sample_n_1000 = c(sample_n_1000, mean(sample(ndata, 1000)))
}

sample_n_all = data.frame(sample_n_10, sample_n_100, sample_n_1000)
write.table(sample_n_all, "ndata.txt", quote=F, row.names = F)

#kdata
kdata<- rnorm(10000, mean=200, sd=50) 

sample_k_10 = c()
for (i in 1:10)
{
  sample_k_10 = c(sample_k_10, mean(sample(ndata, 10)))
}

sample_k_100 = c()
for (i in 1:10)
{
  sample_k_100 = c(sample_k_100, mean(sample(ndata, 100)))
}

sample_k_1000 = c()
for (i in 1:10)
{
  sample_k_1000 = c(sample_k_1000, mean(sample(ndata, 1000)))
}

sample_k_all = data.frame(sample_k_10, sample_k_100, sample_k_1000)
write.table(sample_k_all, "kdata.txt", quote=F, row.names = F)

