What is this?­

This tool calculates the Pearson Correlation Coefficient of data.

What is the Pearson Correlation?

Have you ever wondered if certain things influence each other? For example, if gas prices rise when daily temperatures increase?

With the Pearson Correlation, you can find out.

For two lists of numbers, it returns values between +1 and −1:

  • 1: Y increases as X increases.
  • 0: There is no linear correlation between the variables.
  • −1: Y decreases as X increases.

The Pearson correlation coefficient is typically denoted by r, Pearson’s ρ or simply ρ.

How to use this Calculator

  • For two columns of data, copy and paste each one into the two text fields.
  • Alternatively, click on “Toggle one column,” copy two columns and paste data into the text field.

The correlation will be calculated automatically.

API

pearsoncorrelation.com has a simple API to calculate the Pearson correlation coefficient.

API endpoint

https://pearsoncorrelation.com/api/v2.groovy

Parameters

One of

  • t which contains an interleaved list of strings (one value of the first column, one value of the second column etc.)
  • t1 and t2 which contain the first and second column respectively

Use whitespace or newlines to separate values.

Output Types

Output depends on the Accept header you send. If you send application/xml, the output will be XML. Similarly for application/json (JSON output) and text/plain (plain text output).

JSON-P Mode

If you use a parameter called callback, you can use the API from remote domains.

Toggle one column

Visualization

Link to this webpage

Embed this graph

Toggle two columns
Toggle one column
That’s a strong correlation.
That’s a moderate correlation.
That’s a weak correlation.
This data is probably not correlated.