This visualization randomly picks numbers from normal distribution with mean 0 and given standard deviation.
Then it computes their sample mean and uses this to estimate the distribution of X̄ - which has standard deviation σ/√n.
Depending on the chosen
confidence level, the appropriate central area under the X̄ distribution is calculated and shaded.
This gives the confidence interval.
Shading changes to red if the confidence interval does not contain the true mean.
by Dr. B.Walter and ChatGPT