# ::Free Statistics and Forecasting Software::

v1.2.1

### :: Sampling Distribution of the Sample Mean - Free Statistics Software (Calculator) ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

Sampling Distribution of the Sample Mean: sdsm() and CLT.unif and CLT.exp. The very difficult concept of the sampling distribution of the sample mean is basic to statistics both for its importance for applications, and for its use as an example of modeling the variability of a statistic. sdsm() defaults uses a sample size of n=25 - it shows what a typical sample looks like relative to the density function (standard normal) and then shows a similarly-scaled diagram with the simulated sampling distribution of the sample mean. The emphasis is on the precision of averages, rather than the normality aspect. The normality from the CLT is easier to understand than the precision-of-averages aspect, and so the latter is the focus here. One can use the program with different sample sizes: sdsm(ssize=10), sdsm(ssize=50), sdsm(ssize=100) can be tried here. To make the point about the normality of the sdsm, use CLT.unif() or CLT.exp(), which use uniform(0,1) or exponential(1) as the population and show the sdsm as approximately normal. The default sample size is 10 but CLT.unif(25) or CLT.exp(25) works for sample size 25 and any other sample size can also be used this way.

 Send output to: Browser Blue - Charts White Browser Black/White CSV Replications Sample Size Mean Standard Deviation Chart options Width: Height:

 Source code of R module reps <- as.numeric(par1) ssize <- as.numeric(par2) m <- as.numeric(par3) s <- as.numeric(par4) samples <- FALSE my.dotplot.lims <- function (x, at=.44, cex=1, x.min=x.min, x.max=x.max ,scale=10, ...){ z=(x-mean(x))/sd(x) z=(round(scale*z)/scale) x=z*sd(x)+mean(x) edge=(x.max-x.min)/10 stripchart(x,method="stack", xlim=c(x.min-edge, x.max+edge), ylab="Frequency", at=at, cex=cex,...) } means=1:reps for (i in 1:reps) { sample=rnorm(ssize,m,s) mean=mean(sample) if (samples==T) { print(c("Sample Number",i)) print(format(sample,digits=1)) print (c("Mean of Sample Number",i,format(mean,digits=1)))} means[i]=mean } bitmap(file="test1.png") my.dotplot.lims(sample, x.min=m-2.5*s, x.max=m+2.5*s, scale=10/ssize^.5, main="typical sample vs population density", col="darkgreen", xlab="sample values") text(-2.2,1.5,"Sample Size =",col="darkgreen") text(-1,1.5,ssize) x=seq(m-2.5*s,m+2.5*s,length.out=25) lines(x,.4+dnorm(x,mean=m,sd=s),col="red",lwd=2) lines(x,x/x-.6,col="black") dev.off() bitmap(file="test2.png") my.dotplot.lims(means, x.min=m-2.5*s, x.max=m+2.5*s, scale=10/ssize^.5, main="Sampling Distribution of the Sample Mean", xlab="sample means",col="darkgreen") text(-2.2,1.5,"Sample Size =",col="darkgreen") text(-1,1.5,ssize) text(-3.0,1.35,reps) text(-1.8,1.35,"Sample Means",col="darkgreen") x=seq(m-2.5*s,m+2.5*s,length.out=25) lines(x,.4+dnorm(x,mean=m,sd=s),col="red",lwd=2) lines(x,x/x-.6,col="black") text(2,.8,"Population Density",col="red") dev.off()
 Top | Output | Charts | References

 Cite this software as: Weldon L., (2017), Sampling Distribution of the Sample Mean (v1.0.1) in Free Statistics Software (v1.2.1), Office for Research Development and Education, URL https://www.wessa.net/rwasp_samplingdistributionmean.wasp/ The R code is based on : Weldon Larry, Stat Ed Programs for Demos in R, Simon Fraser University, URL http://www.stat.sfu.ca/~weldon/title.doc Weldon Larry, R Programs for Statistics Education, Simon Fraser University, URL http://www.stat.sfu.ca/~weldon/Programs Weldon Larry, Instructions for using R programs for Statistics Education, Simon Fraser University, URL http://www.stat.sfu.ca/~weldon/instructions.doc
 Top | Output | Charts | References
 To cite Wessa.net in publications use:Wessa, P. (2022), Free Statistics Software, Office for Research Development and Education, version 1.2.1, URL https://www.wessa.net/ © All rights reserved. Academic license for non-commercial use only. The free use of the scientific content, services, and applications in this website is granted for non commercial use only. In any case, the source (url) should always be clearly displayed. Under no circumstances are you allowed to reproduce, copy or redistribute the design, layout, or any content of this website (for commercial use) including any materials contained herein without the express written permission. Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. We make no warranties or representations as to the accuracy or completeness of such information (or software), and it assumes no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site. Software Version : 1.2.1Algorithms & Software : Patrick Wessa, PhDServer : www.wessa.net