The following code produces confidence intervals in R using the normal distribution and confidence intervals using the t-distribution.

The code reproduces the figure 1 presented in this post.

Continue reading Confidence Intervals R Code Part 1The following code produces confidence intervals in R using the normal distribution and confidence intervals using the t-distribution.

The code reproduces the figure 1 presented in this post.

Continue reading Confidence Intervals R Code Part 1This blog post explains the difference between confidence intervals that use the t-distribution and confidence intervals that use the Normal distribution. Thereby, the post will not focus on the theoretical/mathematical differences of the two distributions, but rather compare the two types of confidence intervals using simulation studies. Furthermore, in case you are interested in replicating the presented results or simply play around with it yourself, I provide the R code to conduct the simulation exercises and to replicate the figures.

Continue reading What is the difference between using the t-distribution and the Normal distribution when constructing confidence intervals?