Null Distribution of the Correlation Coefficient

The Pearson correlation coefficient, , is considered in most introductory statistics courses. One of the questions students may ask is how large needs to be before it is likely to be important. Before presenting a formal significance test, it is helpful to show some simulations.
Simulations of independent normal and are used to compute the Pearson correlation coefficient . The histogram of is obtained and compared with its exact distribution (solid curve) and a normal approximation (red curve with dashing). As increases from 5 to 30, the exact distribution closely approximates the normal and it becomes much more narrowly focused on the true value. The histogram with only 100 simulations is shown. Increase the number of simulations to get a more accurate histogram density estimate.
The robustness of the distribution of may be examined by examining the histograms when the and/or has a non-normal distribution. The exponential and distributions may be selected.



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Given data , the sample Pearson correlation coefficient may be simply defined (see [1]) as
and computed using the Mathematica function Correlation.
The exact probability density function for the null case when the data are normal can be written [2, equation 27]
Based on this exact distribution, an exact test of may be constructed [2, §34]. Under the test statistic is -distributed on degrees of freedom.
A simple but reasonable approximation [3, §34] is to use the normal distribution with mean zero and variance . This Demonstration shows that this approximation is reasonable unless is very small.
The table below compares the critical values for a 5% two-sided test based on . That is, we reject versus when the observed value of exceeds the critical value. Again this table confirms that the approximation is quite good, provided is not too small.
[1] D. S. Moore, The Basic Practice of Statistics, New York: W. H. Freeman and Company, 2010.
[3] R. A. Fisher, Statistical Methods, Experimental Design, and Scientific Inference, New York: Oxford University Press, 1990.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2014 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+