If you are interested in the mean and confidence interval for the observed data, probably the most sensible approach is to use the mean and bootstrapped confidence intervals.
For the kind of data set described in the question (100 observations), this shouldn't be too computationally intensive. For example, the following R code, with 100 observation and 10000 replications of the bootstrap, took about 6 seconds at the following site: rdrr.io/snippets/.
But often, if you have a very skewed data set, the mean may not be the best statistic for the central tendency.
It's not uncommon to run analyses on the transformed data, and then back transform the results. But this isn't an estimate of the original e.g. mean and confidence interval. For example, in the case of log-normal data, the result is the geometric mean.
The following example generates some log-normal data. The result of the mean and confidence interval for the original data is quite distinct from the back-transformed mean and confidence interval. In this case it is the difference between the mean and geometric mean.
Either of these approaches may be desirable depending on what you want to know.
set.seed(sum(utf8ToInt("Sal2023")))
Observed = rlnorm(100, 2, 0.8)
hist(Observed)
library(boot)
Function = function(input, index){
Input = input[index]
Result = mean(Input)
return(Result)}
n = length(Observed)
Function(Observed, 1:n)
Boot = boot(Observed, Function, R=10000)
boot.ci(Boot, conf = 0.95, type = "perc")
mean(Observed)
### Mean and confidence interval of the original data by bootstrap
###
### Level Percentile
### 95% ( 8.019, 11.180 )
###
### Mean
### 9.506951
Transformed = log(Observed)
hist(Transformed)
TTestTrans = t.test(Transformed)
CITrans = c(TTestTrans$estimate, TTestTrans$conf.int[1], TTestTrans$conf.int[2])
names(CITrans)=c("Mean", "Lower.ci", "Upper.ci")
CITrans
### Mean Lower.ci Upper.ci
### 1.940237 1.777612 2.102863
BackTrans = exp(CITrans)
BackTrans
### Back-transformed statistics
###
### Mean Lower.ci Upper.ci
### 6.960401 5.915710 8.189579
For R users --- with the caveat that I wrote the functions --- the following can be used to get the bootstrapped confidence interval for the mean of the original data, and the back-transformed confidence interval for the geometric mean.
if(!require(rcompanion)){install.packages("rcompanion")}
library(rcompanion)
Data = data.frame(Observed)
groupwiseMean(Observed ~ 1, data=Data, percentile=TRUE, traditional=FALSE, R=10000)
groupwiseGeometric(Observed ~ 1, data=Data)
### .id n Mean Conf.level Percentile.lower Percentile.upper
### 1 <NA> 100 9.51 0.95 8.02 11.1
### .id n Geo.mean sd.lower sd.upper se.lower se.upper ci.lower ci.upper
### 1 <NA> 100 6.96 3.07 15.8 6.41 7.55 5.92 8.19