In R software, I am trying to generate a simulation plot for bernoulli trial for different sample sizes as below
I have generated the proportions for given sample size and repeated the process 1000 times. But I dont understand, how to plot the graph as given figure.
m=1000 ###### replications
n=10 ###### sample size
my=function(){
n=10 ######Trials
u=rbinom(n,1,0.5)
}
Simulated_data=t((replicate(m, my())))
Proportions<-apply(Simulated_data,1,sum)/n
Proportions