about · email me · subscribe
Spurious correlation #16,596 · View random

A linear line chart with years as the X-axis and two variables on the Y-axis. The first variable is The number of movies Robert Downey Jr. appeared in and the second variable is Ticket sales for New York Yankees games.  The chart goes from 1975 to 2019, and the two variables track closely in value over that time. Small Image
Download png
, svg

It takes a bit of time to generate AI explanations!
Check back later, or email me if you'd enjoy seeing this work in real-time.



Random correlation

Discover a new correlation

View all correlations

View all research papers

Report an error


Data details

The number of movies Robert Downey Jr. appeared in
Source: The Movie DB
Additional Info: Iron Man (2008); Chaplin (1992); Sherlock Holmes (2009); Kiss Kiss Bang Bang (2005); The Singing Detective (2003); The Avengers (2012); Heart and Souls (1993); Two Girls and a Guy (1997); Restoration (1995); Due Date (2010); Black and White (1999); The Soloist (2009); 1969 (1988); Iron Man 3 (2013); Sherlock Holmes: A Game of Shadows (2011); The Judge (2014); The Route V50 (2004); Mr. Willowby's Christmas Tree (1995); Marvel Studios: Assembling a Universe (2014); Avengers: Infinity War (2018); The Last Party (1993); I Am Steve McQueen (2014); Iron Man 2 (2010); Avengers: Age of Ultron (2015); Lethargy (2002); Dolittle (2020); I Am Iron Man (2008); Pieta (2001); Sherlock Holmes and Dr. Watson: A Perfect Chemistry (2012); Sherlock Holmes: Reinvented (2010); Avengers: Endgame (2019); Phase 2 Tag Scenes: A Making of the Marvel Cinematic Universe Phase Two (2015); Equilibrium (2004); Ultimate Iron Man: The Making of Iron Man 2 (2010); The Age of A.I (2019); Downey's Dream Cars (2022); Chances Are (1989); A Scanner Darkly (2006); Johnny Be Good (1988); Gothika (2003); Air America (1990); True Believer (1989); Charlie Bartlett (2008); Home for the Holidays (1995); Only You (1994); The Pick-up Artist (1987); Fur: An Imaginary Portrait of Diane Arbus (2006); Game 6 (2006); Too Much Sun (1990); Whatever We Do (2003); The Outsider (2005); Danger Zone (1996); Starz Inside: Comic Books Unbound (2008); Captain America: Civil War (2016); Building the Dream: Assembling the Avengers (2012); Tropic Thunder (2008); Mad Mel: The Rise and Fall of a Hollywood Icon (2010); Arrival (1986); Sr. (2022); Natural Born Killers (1994); U.S. Marshals (1998); A Guide to Recognizing Your Saints (2006); Soapdish (1991); The Gingerbread Man (1998); Less Than Zero (1987); Tropic Thunder: Rain of Madness (2008); Spider-Man: Homecoming (2017); Zodiac (2007); Wonder Boys (2000); Richard III (1995); In Dreams (1999); Marvel One-Shot: The Consultant (2011); Two Tons of Turquoise to Taos Tonight (1975); Eros (2004); Oppenheimer (2023); The Shaggy Dog (2006); Good Night, and Good Luck. (2005); Hugo Pool (1997); One Night Stand (1997); Back to School (1986); Hail Caesar (1994); Rented Lips (1987); Inside Christopher Nolan's Oppenheimer (2023); Lucky You (2007); Firstborn (1984); Hubert Selby Jr: It/ll Be Better Tomorrow (2006); One Summer in Austin: The Story of Filming 'A Scanner Darkly' (2006); Tuff Turf (1985); Friends & Lovers (1999); Weird Science (1985); Luck, Trust & Ketchup: Robert Altman in Carver Country (1993); A Fan's Guide to Spider-Man: Homecoming (2017); The Story Of Our Time: The Making Of Oppenheimer (2023); That's Adequate (1989); Bowfinger (1999); Up the Academy (1980); Chef (2014); Voom Portraits (2007); MoPOP Founders Award 2020 Honoring Alice in Chains (2020); Dear America: Letters Home from Vietnam (1987); Charlie: The Life and Art of Charles Chaplin (2003); Killers Kill, Dead Men Die (2007); Short Cuts (1993); Animal House: The Inside Story (2008); America (1986); A Century of Cinema (1994); Girls Just Want to Have Fun (1985); Marvel: 75 Years, from Pulp to Pop! (2014); Val (2021); Fertile La Toyah Video Magazine #2: The Kinky Issue! (1994); Baby It's You (1983); Celebrating Marvel's Stan Lee (2019); 2022 Rock & Roll Hall of Fame Induction Ceremony (2022); Chadwick Boseman: A Tribute for a King (2020); Love and Distrust (2010); Annie Leibovitz: Life Through a Lens (2007); The Nice Guys (2016); The Incredible Hulk (2008); Never Sleep Again: The Elm Street Legacy (2010)

See what else correlates with The number of movies Robert Downey Jr. appeared in

Ticket sales for New York Yankees games
Detailed data title: Total tickets sold in home games for the New York Yankees
Source: Baseball-Reference.com
See what else correlates with Ticket sales for New York Yankees games

Correlation r = 0.5062828 (Pearson correlation coefficient)
Correlation is a measure of how much the variables move together. If it is 0.99, when one goes up the other goes up. If it is 0.02, the connection is very weak or non-existent. If it is -0.99, then when one goes up the other goes down. If it is 1.00, you probably messed up your correlation function.

r2 = 0.2563222 (Coefficient of determination)
This means 25.6% of the change in the one variable (i.e., Ticket sales for New York Yankees games) is predictable based on the change in the other (i.e., The number of movies Robert Downey Jr. appeared in) over the 45 years from 1975 through 2019.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 0.00039. 0.0003876528547302295000000000
The p-value is a measure of how probable it is that we would randomly find a result this extreme. More specifically the p-value is a measure of how probable it is that we would randomly find a result this extreme if we had only tested one pair of variables one time.

But I am a p-villain. I absolutely did not test only one pair of variables one time. I correlated hundreds of millions of pairs of variables. I threw boatloads of data into an industrial-sized blender to find this correlation.

Who is going to stop me? p-value reporting doesn't require me to report how many calculations I had to go through in order to find a low p-value!
On average, you will find a correaltion as strong as 0.51 in 0.039% of random cases. Said differently, if you correlated 2,580 random variables Which I absolutely did.
with the same 44 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 44 because we have two variables measured over a period of 45 years. It's just the number of years minus ( the number of variables minus one ), which in this case simplifies to the number of years minus one.
you would randomly expect to find a correlation as strong as this one.

[ 0.25, 0.7 ] 95% correlation confidence interval (using the Fisher z-transformation)
The confidence interval is an estimate the range of the value of the correlation coefficient, using the correlation itself as an input. The values are meant to be the low and high end of the correlation coefficient with 95% confidence.

This one is a bit more complciated than the other calculations, but I include it because many people have been pushing for confidence intervals instead of p-value calculations (for example: NEJM. However, if you are dredging data, you can reliably find yourself in the 5%. That's my goal!


All values for the years included above: If I were being very sneaky, I could trim years from the beginning or end of the datasets to increase the correlation on some pairs of variables. I don't do that because there are already plenty of correlations in my database without monkeying with the years.

Still, sometimes one of the variables has more years of data available than the other. This page only shows the overlapping years. To see all the years, click on "See what else correlates with..." link above.
197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019
The number of movies Robert Downey Jr. appeared in (Movie appearances)100001001133423211454132411143375827231522213
Ticket sales for New York Yankees games (Tickets sold)128805020124302103090233587025377602627420161435020412202257980182182022145902268030242767026337002170480200644018637301748740241694016755601705260225088025803202955190329274030554403264910346581034656003775290409070042480704271080429866037193603765810365368035424103279590340162031938003063400315494034828603304400




Why this works

  1. Data dredging: I have 25,237 variables in my database. I compare all these variables against each other to find ones that randomly match up. That's 636,906,169 correlation calculations! This is called “data dredging.” Instead of starting with a hypothesis and testing it, I instead abused the data to see what correlations shake out. It’s a dangerous way to go about analysis, because any sufficiently large dataset will yield strong correlations completely at random.
  2. Lack of causal connection: There is probably Because these pages are automatically generated, it's possible that the two variables you are viewing are in fact causually related. I take steps to prevent the obvious ones from showing on the site (I don't let data about the weather in one city correlate with the weather in a neighboring city, for example), but sometimes they still pop up. If they are related, cool! You found a loophole.
    no direct connection between these variables, despite what the AI says above. This is exacerbated by the fact that I used "Years" as the base variable. Lots of things happen in a year that are not related to each other! Most studies would use something like "one person" in stead of "one year" to be the "thing" studied.
  3. Observations not independent: For many variables, sequential years are not independent of each other. If a population of people is continuously doing something every day, there is no reason to think they would suddenly change how they are doing that thing on January 1. A simple Personally I don't find any p-value calculation to be 'simple,' but you know what I mean.
    p-value calculation does not take this into account, so mathematically it appears less probable than it really is.
  4. Outlandish outliers: There are "outliers" in this data. In concept, "outlier" just means "way different than the rest of your dataset." When calculating a correlation like this, they are particularly impactful because a single outlier can substantially increase your correlation.

    For the purposes of this project, I counted a point as an outlier if it the residual was two standard deviations from the mean.

    (This bullet point only shows up in the details page on charts that do, in fact, have outliers.)
    They stand out on the scatterplot above: notice the dots that are far away from any other dots. I intentionally mishandeled outliers, which makes the correlation look extra strong.




Try it yourself

You can calculate the values on this page on your own! Try running the Python code to see the calculation results. Step 1: Download and install Python on your computer.

Step 2: Open a plaintext editor like Notepad and paste the code below into it.

Step 3: Save the file as "calculate_correlation.py" in a place you will remember, like your desktop. Copy the file location to your clipboard. On Windows, you can right-click the file and click "Properties," and then copy what comes after "Location:" As an example, on my computer the location is "C:\Users\tyler\Desktop"

Step 4: Open a command line window. For example, by pressing start and typing "cmd" and them pressing enter.

Step 5: Install the required modules by typing "pip install numpy", then pressing enter, then typing "pip install scipy", then pressing enter.

Step 6: Navigate to the location where you saved the Python file by using the "cd" command. For example, I would type "cd C:\Users\tyler\Desktop" and push enter.

Step 7: Run the Python script by typing "python calculate_correlation.py"

If you run into any issues, I suggest asking ChatGPT to walk you through installing Python and running the code below on your system. Try this question:

"Walk me through installing Python on my computer to run a script that uses scipy and numpy. Go step-by-step and ask me to confirm before moving on. Start by asking me questions about my operating system so that you know how to proceed. Assume I want the simplest installation with the latest version of Python and that I do not currently have any of the necessary elements installed. Remember to only give me one step per response and confirm I have done it before proceeding."


# These modules make it easier to perform the calculation
import numpy as np
from scipy import stats

# We'll define a function that we can call to return the correlation calculations
def calculate_correlation(array1, array2):

    # Calculate Pearson correlation coefficient and p-value
    correlation, p_value = stats.pearsonr(array1, array2)

    # Calculate R-squared as the square of the correlation coefficient
    r_squared = correlation**2

    return correlation, r_squared, p_value

# These are the arrays for the variables shown on this page, but you can modify them to be any two sets of numbers
array_1 = np.array([1,0,0,0,0,1,0,0,1,1,3,3,4,2,3,2,1,1,4,5,4,1,3,2,4,1,1,1,4,3,3,7,5,8,2,7,2,3,1,5,2,2,2,1,3,])
array_2 = np.array([1288050,2012430,2103090,2335870,2537760,2627420,1614350,2041220,2257980,1821820,2214590,2268030,2427670,2633700,2170480,2006440,1863730,1748740,2416940,1675560,1705260,2250880,2580320,2955190,3292740,3055440,3264910,3465810,3465600,3775290,4090700,4248070,4271080,4298660,3719360,3765810,3653680,3542410,3279590,3401620,3193800,3063400,3154940,3482860,3304400,])
array_1_name = "The number of movies Robert Downey Jr. appeared in"
array_2_name = "Ticket sales for New York Yankees games"

# Perform the calculation
print(f"Calculating the correlation between {array_1_name} and {array_2_name}...")
correlation, r_squared, p_value = calculate_correlation(array_1, array_2)

# Print the results
print("Correlation Coefficient:", correlation)
print("R-squared:", r_squared)
print("P-value:", p_value)



Reuseable content

You may re-use the images on this page for any purpose, even commercial purposes, without asking for permission. The only requirement is that you attribute Tyler Vigen. Attribution can take many different forms. If you leave the "tylervigen.com" link in the image, that satisfies it just fine. If you remove it and move it to a footnote, that's fine too. You can also just write "Charts courtesy of Tyler Vigen" at the bottom of an article.

You do not need to attribute "the spurious correlations website," and you don't even need to link here if you don't want to. I don't gain anything from pageviews. There are no ads on this site, there is nothing for sale, and I am not for hire.

For the record, I am just one person. Tyler Vigen, he/him/his. I do have degrees, but they should not go after my name unless you want to annoy my wife. If that is your goal, then go ahead and cite me as "Tyler Vigen, A.A. A.A.S. B.A. J.D." Otherwise it is just "Tyler Vigen."

When spoken, my last name is pronounced "vegan," like I don't eat meat.

Full license details.
For more on re-use permissions, or to get a signed release form, see tylervigen.com/permission.

Download images for these variables:


View another random correlation

How fun was this correlation?

Kudos for rating!


Correlation ID: 16596 · Black Variable ID: 26629 · Red Variable ID: 4416
about · subscribe · emailme@tylervigen.com · twitter

CC BY 4.0