How to find confidence interval for not normally distributed data (Bootstrapping)
16 次查看(过去 30 天)
显示 更早的评论
hi,
I wanted to find 95%confidence interval for not normally distributed data through boot strap. I have found confidence through function prctile, but I am not sure whether it is giving the right answer or not? I wanted to ask which is better between the two and also, whether I will get diiferent answer for 95% CI if i transformed my data from not normal to normal distribution (log transformation) and then calculate CI.
I have attached by data. please help me in providing the code for boot strap.I will be extremely gareful for your help.
0 个评论
回答(1 个)
Pratyush
2024-5-30
Hi Shagun,
When estimating 95% confidence intervals (CI) for non-normally distributed data in MATLAB, bootstrapping combined with the 'prctile' function is a robust method that doesn't assume a specific data distribution. This approach involves resampling your data with replacement, calculating the statistic of interest (e.g., mean) for each sample, and then using 'prctile' to find the 2.5th and 97.5th percentiles as the CI bounds.
Comparatively, transforming data (e.g., log transformation) to approximate a normal distribution and then calculating CI can yield different results. This method requires the data transformation to be effective in normalizing the distribution and may affect interpretability and accuracy if the transformation introduces bias.
In essence, bootstrapping with 'prctile' is generally preferred for its versatility and reliability with non-normally distributed data, while data transformation followed by parametric CI estimation could be considered when the transformation is appropriate and well-understood. The choice between these methods depends on the dataset and analysis requirements.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!