Richard N. Landers, Ph.D.
Associate Professor in Industrial/Organizational Psychology
Primary Investigator of TNTLab
Old Dominion University

Pearson's r Correlation Simulator

This correlation simulator was designed after I noticed that very few simple, illustrative online correlation simulators were available. Most that I could fined were heavily mathematical and littered with notation. While I appreciate that level of detail (and of course, such knowledge was needed to construct this simulator), it is unnecessary for a basic introductory course in the social sciences, such as Psychology 101. With that need in mind, I designed the simulator below.

The simulator functions by:

  1. Generating two sets of normally distributed data with mean = 0 and SD = 1 (which we'll call X and RawY)
  2. Determine Y for each X using the following formula: Y = X * correlation + RawY * (1 - correlation^2) ^ 0.5
  3. Graph all of the X/Y pairs on a coordinate plane ranging +/-3 on both axes

This procedure essentially generates a dataset of X/Y pairs pulled from a random distribution of correlations centered around the simulation parameters specified. Thus, even if you set r = 0.2, you will not necessarily get precisely r = 0.2 in the generated data. Additionally, as you would expect, smaller N's are more likely to produce increasingly inaccurate representations of the desired correlation.

If you're an undergraduate viewing this page, pretty much everything I wrote above is meaningless to you. Just play with the sliders:

If you are learning about what correlations are and what they look like, try the following combinations with N=200: +1.0, +0.8, +0.5, +0.3, 0, -0.3, -0.5, -0.8, -1.0

If you are learning about correlation, you might also consider reading what you find in this blog post.

If you are using this as part of a lesson in your classroom, I'd appreciate an e-mail letting me know who you are, what institution you work for, and what course you are using it in. This tool can be used to teach about correlations and even a little bit about sampling error.

If you are an educator or represent an organization interested in partnering with a major research university to use technology-enhanced hiring or training techniques like this tool, please contact me or visit my laboratory.