Correlation of Bivariate Random Data

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration constructs two lists of random numbers of length and calculates the Pearson product-moment correlation coefficient as if the lists were bivariate data. For a random sample such as this, the coefficient is expected to be close to zero, with no correlation. As you increase the sample size with the sliders, the coefficient (shown with the green dot) fluctuates less and less as it floats over zero.

Contributed by: Jamie Wickham-Jones (March 2011)
Open content licensed under CC BY-NC-SA



This computes a standard statistical quantity, the coefficient of correlation. Those studying this material for a statistics course will recognize several features in the initialization and will see how the coefficient is calculated. (The correlation can be computed directly via the built-in Mathematica function Correlation.)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.