Closed atpinto closed 2 years ago
The confidence interval for the mean in the Descriptive statistics command is using the critical values from the normal distribution instead to the t-distribution. When the sample size is small size, this confidence interval will fail to have the correct coverage because is too narrow. Given that we are using the sample standard deviation for the calculation of the standard error, the t-distribution should be used for the calculation of the confidence interval for the mean.
The correct confidence interval can be obtained form the t-test command and it will not match the normal-based confidence interval in the descriptives command.
i think we want to add a footnote too @raviselker ? 1. so people are aware of the change. 2. because it's informative to have?
I fixed up this PR in #348 (there were some other issues with it).
Changed the critical value for the confidence interval for the mean. The critical values is now chosen as the quantile from the t-distribution with df=n-1 rather than the quantile from the normal distribution.