Draw many samples of n pairs with true correlation ρ and compute the sample correlation r each time. Top left: the first sample. Top right: the histogram of r, skewed when ρ is near ±1, with its exact density for normal data. Bottom left: the histogram of Fisher's z = artanh r against the normal law N(artanh ρ, 1/(n − 3)) on which his interval rests. Bottom right: the first 40 samples' 95% intervals by three methods: Fisher's, the bootstrap percentile interval and the delta method r ± z(1 − r²)/√n; a pink cross marks a miss. Switch to heavy-tailed data and watch Fisher's interval lose its coverage.
Pairs are (s Z1, s(ρZ1 + √(1 − ρ²) Z2)) with Z1, Z2 independent standard normals from a seeded generator, and s = 1 (normal data) or s = √(ν/C), C ~ χ²ν (bivariate t, kurtosis parameter κ = 2/(ν − 4)). The correlation does not depend on means or variances, so these are the only parameters that matter. The bootstrap interval takes the 2.5% and 97.5% quantiles (linear interpolation) of B correlations of resampled pairs. The "exact" values integrate the normal-theory density of r.
code/ch14_multivariate_models.py (corr_demo, fisher_ci, wald_ci, boot_percentile_ci, r_density, z_moments; Figures 14.S2 and 14.S3).