# Classical Confidence Intervals vs. Bootstrap Confidence Intervals

Suppose I have some data that includes height and weight measurements for 1000 people - I am interested in calculating the Correlation Coefficient to see if there exists some correlation between height and weight, and if this correlation is statistically significant.

I was curious in learning more about how the Confidence Intervals of the Correlation Coefficient is calculated. When reading about this online, I found some links which included something called the "Fisher Transform" and outlined (what seemed to me as) a complicated procedure for calculating the Confidence Interval of the Correlation Coefficient.

This got me thinking about the Bootstrap Procedure. Suppose I took performed "Random Sampling With Replacement" and made 1000 draws from the data I have, and then calculated the Correlation Coefficient. Now, imagine I repeat this process 1000 times and produce a list of 1000 Correlation Coefficients calculated using random draws from this data. Could I not then find 5th and the 95th quantile and use these as a pseudo confidence interval?

Although I have feeling that this might work, I am not sure if this is a statistically valid approach. Is it possible that using the "classical" formulas for the Confidence Intervals of the Correlation Coefficient would be "more realistic and better suited" compared to this "bootstrap approach"?

Thank you!

• One note: since weight and height aren't likely to be linearly related except approximately over a small range of heights, you may want to consider something other than the Pearson correlation, which indicates the strength of a linear relationship - for example, the Spearman correlation, which indicates the strength of a monotonic relationship. You might also look at this answer: stats.stackexchange.com/questions/130485/… Dec 19, 2022 at 0:43
• @jbowman weight and height aren't correlated? Sure, the relationship is not linear, but a correlation should be very strong. The role of an alternative to Pearson correlation is not very clear (I am actually already troubled with using any correlation at all; obviously it correlated, so what?). Dec 19, 2022 at 13:23
• @SextusEmpiricus - well I didn't mean to imply that there was no correlation, although rereading my note I can see that's not an unfair interpretation! I assume that this is a toy exercise, otherwise, as you say, obviously it is correlated and so what? My real point is "why measure the strength of a linear relationship when you know the true relationship is nonlinear?" Dec 19, 2022 at 18:20
• @jbowman I am equally puzzled about the use of correlation as some relevant statistic for the application. I agree with that criticism. Consider my comment as a side-note adding nuance. Dec 19, 2022 at 21:53

Yes, you can bootstrap the correlation coefficient and get the confidence intervals you are looking for but:

you should random-sample joint observations (couples of observations i.e. weight,height) and not independently sampling from weight and height.

Even if this makes sense, I may suggest a different approach:

1. Fit a linear model (for example $$\text{weight} = \alpha + \beta \text{height}$$);
2. Estimate the residuals;
3. Bootstrap the residuals with replacement and calculate bootstrapped fitted values;
4. Calculate correlation between the bootstrapped fitted values and the independent variable (height);
5. Repeat point 4 and 5 N times to get the confidence intervals for the correlation coefficient.

What you’ve described is possible bootstrap procedure, and there is a reasonable argument for calling those the endpoints of a $$90\%$$ confidence interval. (Remember that a $$95\%$$ confidence interval would have to go to percentiles $$2.5$$ and $$97.5$$.)

While such an approach might be okay, your reviewers will be reasonable in their criticism that you haven’t used a more modern bootstrap approach, such as BCa, as these are pretty standard in statistical software and tend to have superior properties.

For a reputable source, the documentation for the boot package in R gives citations for bootstrap procedures, some written by Efron himself.