about · email me · subscribe
Spurious correlation #2,405 · View random

A linear line chart with years as the X-axis and two variables on the Y-axis. The first variable is New York Yankees' victories and the second variable is Wins for the San Francisco Giants.  The chart goes from 1975 to 2022, and the two variables track closely in value over that time. Small Image

AI explanation

As the saying goes, "a rising tide lifts all boats," and in this case, the Yankees' victories were like a wave of inspiration for the Giants, propelling them to their own successes. It's as if the Yankees' win streak created a Major League 'winergy' that somehow reached all the way to San Francisco, sparking the Giants to play ball with renewed vigor and determination. In other words, the Yankees were knocking it out of the park, and the Giants couldn't help but catch that winning spirit!

Model: dalle-3
Prompt: Prompt: Create an image that illustrates the chain reaction of triumph between the New York Yankees and the San Francisco Giants. Show the bright lights and energy of Yankee Stadium, capturing the team's victory celebration as the crack of the bat echoes through the air. Emphasize the surge of triumphant energy as it travels across the country and reaches AT&T Park in San Francisco. Depict the Giants standing ready at the plate, with their confidence soaring as the invisible energy reaches them. Include the crack of their bats as baseballs soar into the stands, showcasing their series of wins inspired by the unexpected boost from their counterparts in New York. Capture the dynamic and uplifting nature of this cross-country baseball success. The depiction should include only scenes, people, and objects, it should not include text or speech bubbles.
This image generation prompt was also generated by AI, using the following sequence:

Model: gpt-3.5-turbo-1106
System prompt: You select one of a few potential scene descriptors that seems to go along with the variables described. You respond only with the scene descriptions provided and say nothing else.
User prompt: Here are two variables: New York Yankees' victories and Wins for the San Francisco Giants. Given these, which of the following image style descriptions seems most appropriate? Pick the one that seems to be related to one of the variables at hand. Please respond with only one of the following potential descriptions: An image that looks like it is a scene from 'Star Wars' Photorealism Cutsy art illustration Futuristic A Discovery magazine cover image
ChatGPT: A Discovery magazine cover image

Model: gpt-3.5-turbo-1106
System prompt: You describe simple visual scenes that depict the two variables stated. You combine both variables into one scene.
User prompt: Please describe a visual scene that prominently depicts both New York Yankees' victories and Wins for the San Francisco Giants, in the following situation: The Yankees' victories unleashed a "home run" energy that traveled all the way to San Francisco, powering up the Giants and giving them the "baseball mojo" they needed to secure wins. It's as if the Yankees' success sent a shockwave through the league, electrifying the Giants' bats and igniting a "grand slam" streak of triumphs. In a true display of "big league magic," the Yankees' wins somehow acted as a "pitch-perfect" catalyst for the Giants' own success, proving that in the wild world of baseball, anything can happen – even a cross-country wave of winning vibes. It's a tale of two cities, united by the unpredictable, inexplicable, and downright hilarious forces of the baseball universe.. Keep the description simple.
ChatGPT: Amid the bright lights of Yankee Stadium, the team's players erupt in cheers as they secure another victory, the crack of the bat echoing through the air. Their triumphant energy surges like a wave, traveling across the country to San Francisco. In AT&T Park, the San Francisco Giants stand ready at the plate, and as the invisible energy reaches them, their confidence soars. Suddenly, the crack of their bats rings out, sending baseballs soaring into the stands as they secure win after win, inspired by the unexpected boost from their counterparts in New York.

Model: gpt-3.5-turbo-1106
System prompt: You write and improve image generation prompts for DALLE-3. You maintain the same subjects, but enhance the visuals.
User prompt: Please respond with an image generation prompt that would be likely to create an interesting visual using DALLE-3, using the following style: [ A Discovery magazine cover image ] and depicting this scene: Amid the bright lights of Yankee Stadium, the team's players erupt in cheers as they secure another victory, the crack of the bat echoing through the air. Their triumphant energy surges like a wave, traveling across the country to San Francisco. In AT&T Park, the San Francisco Giants stand ready at the plate, and as the invisible energy reaches them, their confidence soars. Suddenly, the crack of their bats rings out, sending baseballs soaring into the stands as they secure win after win, inspired by the unexpected boost from their counterparts in New York. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: Prompt: Create an image that illustrates the chain reaction of triumph between the New York Yankees and the San Francisco Giants. Show the bright lights and energy of Yankee Stadium, capturing the team's victory celebration as the crack of the bat echoes through the air. Emphasize the surge of triumphant energy as it travels across the country and reaches AT&T Park in San Francisco. Depict the Giants standing ready at the plate, with their confidence soaring as the invisible energy reaches them. Include the crack of their bats as baseballs soar into the stands, showcasing their series of wins inspired by the unexpected boost from their counterparts in New York. Capture the dynamic and uplifting nature of this cross-country baseball success.

*Variations in the User Prompts from chart to chart are just the result of random number generation in Python. I wrote a few arrays of various styles and methods to ask questions to change up the results. Every time this site writes an explanation or generates an image, the script picks from each at random.

I sequence the requests into multiple prompts because I find GPT 3.5 to perform much better with short, well-managed contexts. Thus, I track the context directly in Python and only ask ChatGPT targeted questions.

Model: gpt-3.5-turbo-1106 (fine-tuned)
System prompt: You provide humorous responses in the form of plausible sounding explanations for correlations. You assume the correlation is causative for the purpose of the explanation even if it is ridiculous. You do not chat with the user, you only reply with the causal connection explanation and nothing else.
User prompt: Please make up a funny explanation for how increases in New York Yankees' victories positively influenced Wins for the San Francisco Giants. Include one good pun.

AI academic paper

(Because p < 0.01)
Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins

The Journal of Sports Synchronicity

Jan 2024
Quick note: This sequence is long and repetitive. That's how the prompt engineering works for this one. I manage the output in Python to format it into this PDF.




Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You write titles and abstracts of goofy academic research papers.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, and add unexpected twists in your writing.

Please draft the title and abstract of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns.

Include a pun in the title.

Your research team used data from Wikipedia and Baseball-Reference.com to assess this nagging question. You found a correlation coefficient of 0.5424641 and p < 0.01 for 1975 to 2022.

Please respond in this format (replace "Lorem ipsum dolor sit" with your title and abstract)

[[TITLE]]
Lorem ipsum dolor sit

[[ABSTRACT]]
Lorem ipsum dolor sit



ChatGPT:
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft the introduction section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the introduction section of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Here is the title and abstract of the paper:
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
Introduction

As the venerable Yogi Berra once said, "It's like déjà vu all over again." When it comes to the enigmatic connection between the triumphs of the New York Yankees and the wins of the San Francisco Giants, it seems we're in for a wild pitch in the world of sports analytics.

While some may think that attempting to find a correlation between the Yankees and the Giants is a statistical curveball, our research aims to knock it out of the park by exploring this seemingly pitch-perfect relationship, albeit with a generous helping of humor and a side of whimsy.

The combination of numbers and sports may bring to mind a mix of statistics and superstitions, but our study seeks to infuse a touch of levity into the realm of scholarly research. After all, who said academics can't hit a home run with an occasional pun or an unexpected twist in their hypotheses?

To tackle this intriguing conundrum, our research team rummaged through decades of data from Wikipedia and Baseball-Reference.com, and after hours of crunching numbers and combing through endless game logs, we've arrived at some truly eyebrow-raising findings. Brace yourselves, for we've discovered a correlation coefficient of 0.5424641 and a preposterously low p-value of less than 0.01, suggesting a statistically significant relationship that defies the conventions of sports analysis.

So, dear reader, prepare to embark on a rollercoaster ride through the world of baseball mysteries and statistical shenanigans. This study not only promises to uncover the peculiar synchronicity between these two beloved baseball squads but also offers a crackling commentary on the zany, offbeat side of sports analytics that might just leave you smiling in wonder.

With this paper, we aim to blend the rigors of scientific inquiry with a sprinkle of wit and a pinch of charm, inviting you to join us in unraveling the comically curious connection between the Yankees' victories and the Giants' wins. Strap in, as we coach you through this amusing and unexpected journey into the playful realm of sports statistics and the curious correlations that make science a grand slam of surprises.


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft a literature review section of an academic research paper, that starts out dry for the first few sentences but then becomes hilarious and goofy.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up a literature review section of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns.

Speak in the present tense for this section (the authors find...), as is common in academic research paper literature reviews. Name the sources in a format similar to this: In "Book," the authors find lorem and ipsum.

Make up the lorem and ipsum part, but make it sound related to the topic at hand.

Start by naming serious-sounding studies by authors like Smith, Doe, and Jones - but then quickly devolve. Name some real non-fiction books that would be related to the topic. Then name some real fiction books that sound like they could be related. Then cite some social media posts you read that seem to be related.

Here is the title and abstract of the paper:
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
Introduction
As the venerable Yogi Berra once said, "It's like déjà vu all over again." When it comes to the enigmatic connection between the triumphs of the New York Yankees and the wins of the San Francisco Giants, it seems we're in for a wild pitch in the world of sports analytics.
While some may think that attempting to find a correlation between the Yankees and the Giants is a statistical curveball, our research aims to knock it out of the park by exploring this seemingly pitch-perfect relationship, albeit with a generous helping of humor and a side of whimsy.
The combination of numbers and sports may bring to mind a mix of statistics and superstitions, but our study seeks to infuse a touch of levity into the realm of scholarly research. After all, who said academics can't hit a home run with an occasional pun or an unexpected twist in their hypotheses?
To tackle this intriguing conundrum, our research team rummaged through decades of data from Wikipedia and Baseball-Reference.com, and after hours of crunching numbers and combing through endless game logs, we've arrived at some truly eyebrow-raising findings. Brace yourselves, for we've discovered a correlation coefficient of 0.5424641 and a preposterously low p-value of less than 0.01, suggesting a statistically significant relationship that defies the conventions of sports analysis.
So, dear reader, prepare to embark on a rollercoaster ride through the world of baseball mysteries and statistical shenanigans. This study not only promises to uncover the peculiar synchronicity between these two beloved baseball squads but also offers a crackling commentary on the zany, offbeat side of sports analytics that might just leave you smiling in wonder.
With this paper, we aim to blend the rigors of scientific inquiry with a sprinkle of wit and a pinch of charm, inviting you to join us in unraveling the comically curious connection between the Yankees' victories and the Giants' wins. Strap in, as we coach you through this amusing and unexpected journey into the playful realm of sports statistics and the curious correlations that make science a grand slam of surprises.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The correlation between the triumphs of the New York Yankees and the wins of the San Francisco Giants has long perplexed sports enthusiasts and statisticians alike. Our study delves into this conundrum by examining a mix of rigorous academic research, whimsical observations, and a dash of good-natured banter. We begin by examining serious-sounding studies that initially set the stage for our lighthearted exploration of this quirky relationship.

Smith and Doe (2001) meticulously detailed the statistical nuances of baseball victories, inadvertently paving the way for our jovial jaunt into the realm of sports analytics. They probed the depths of winning streaks and batting averages with an earnestness that sets the tone for our comically curious investigation.

However, as we venture deeper, we stumble upon Jones' (2005) work that unexpectedly veers into the territory of wins and whimsy. Jones' study, though solemn in its approach, unknowingly presents the perfect segue into our effervescent examination of the Yankees' and Giants' wins.

Turning to more non-fiction literature, "Moneyball" by Michael Lewis provides a serious take on baseball analytics. While our paper injects a healthy dose of frivolity, the foundations laid by Lewis' seminal work contribute to the scholarly rigor of our study, albeit with a humorous twist.

On a fictional note, "The Art of Fielding" by Chad Harbach promises an insightful examination of baseball and its idiosyncrasies, inadvertently nudging us into the realm of sporting whimsy. While our findings are firmly grounded in empirical evidence, Harbach's novel inspires us to infuse a touch of charm into the exploration of correlations between the Yankees' victories and the Giants' wins.

In an unexpected turn, social media posts by avid baseball fans such as @BatFlipBuddy and @HomeRunHilarity surprisingly offer anecdotal insights that nudge our paper into the delightful domain of sports-related banter. While their musings lack the formality of academic research, they inject a punch of humor that mirrors our own approach to unraveling this zany phenomenon.

As we embark on this mirthful investigation, we invite our readers to embrace the offbeat, the whimsical, and the downright silly as we unravel the captivating correlation between the New York Yankees and the San Francisco Giants. With a twinkle in our eyes and a wink to Yogi Berra, we march ahead armed with statistics, laughter, and the spirit of the game, beckoning scholars and enthusiasts alike to join us in this jubilant journey.


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft the methodology section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the methodology section of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from Wikipedia and Baseball-Reference.com . You used data from 1975 to 2022

Make up the research methods you don't know. Make them a bit goofy and convoluted.

Here is the title, abstract, and introduction of the paper:
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

[[INTRODUCTION]]
Introduction
As the venerable Yogi Berra once said, "It's like déjà vu all over again." When it comes to the enigmatic connection between the triumphs of the New York Yankees and the wins of the San Francisco Giants, it seems we're in for a wild pitch in the world of sports analytics.
While some may think that attempting to find a correlation between the Yankees and the Giants is a statistical curveball, our research aims to knock it out of the park by exploring this seemingly pitch-perfect relationship, albeit with a generous helping of humor and a side of whimsy.
The combination of numbers and sports may bring to mind a mix of statistics and superstitions, but our study seeks to infuse a touch of levity into the realm of scholarly research. After all, who said academics can't hit a home run with an occasional pun or an unexpected twist in their hypotheses?
To tackle this intriguing conundrum, our research team rummaged through decades of data from Wikipedia and Baseball-Reference.com, and after hours of crunching numbers and combing through endless game logs, we've arrived at some truly eyebrow-raising findings. Brace yourselves, for we've discovered a correlation coefficient of 0.5424641 and a preposterously low p-value of less than 0.01, suggesting a statistically significant relationship that defies the conventions of sports analysis.
So, dear reader, prepare to embark on a rollercoaster ride through the world of baseball mysteries and statistical shenanigans. This study not only promises to uncover the peculiar synchronicity between these two beloved baseball squads but also offers a crackling commentary on the zany, offbeat side of sports analytics that might just leave you smiling in wonder.
With this paper, we aim to blend the rigors of scientific inquiry with a sprinkle of wit and a pinch of charm, inviting you to join us in unraveling the comically curious connection between the Yankees' victories and the Giants' wins. Strap in, as we coach you through this amusing and unexpected journey into the playful realm of sports statistics and the curious correlations that make science a grand slam of surprises.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

Sampling Procedure:
To navigate through this wild pitch of a research question, we started our journey by constructing a meticulously crafted dataset encompassing the performances of the New York Yankees and the San Francisco Giants from the 1975 season through to 2022. Our team scoured the vast expanses of the internet, tapping into the ever-reliable sources of Wikipedia and Baseball-Reference.com to obtain the nitty-gritty details of each game. Armed with our trusty spreadsheets, we wrangled every last box score and win-loss record with the determination of a base runner sliding into home plate, all while humming "Take Me Out to the Ball Game" for good measure.

Data Analysis:
Once we amassed this treasure trove of sporting statistics, we unleashed the power of statistical analysis with the finesse of a pitcher delivering a knuckleball. We employed a combination of correlation analysis, regression modeling, and a sprinkle of good ol' fashioned number-crunching to tease out the hidden patterns among the tangled web of wins and losses. With a twirl of our statistical baton, we conjured up a correlation coefficient of 0.5424641 that carried the weight of a grand slam, and a p-value of less than 0.01 that hit it out of the park in terms of significance.

Control Variables:
In our pursuit of scholarly amusement, we took into account various potential confounding factors that could have misled our exploration into the peculiar connection between the Yankees' victories and the Giants' wins. Weather conditions, player injuries, and the commercial availability of lucky team socks were all considered as potential variables that may have influenced the outcomes of these baseball showdowns.

Just for Kicks:
As an added layer of statistical frivolity, we decided to sprinkle a pinch of whimsy into our methodology by introducing the "Mascot Miracle Index" – an entirely fictional metric that gauged the collective mojo of the Yankees' and Giants' mascots throughout the seasons. While this may not have withstood the strict scrutiny of peer review, we can't deny the sheer delight in envisioning a duel between a pinstriped Yankee and a formidable San Francisco Giant.

In summary, our methodological approach combined the rigorous scrutiny of sports statistics with a generous sprinkling of baseball-themed absurdity, all aimed at unraveling the charmingly confounding correlation between the victories of the New York Yankees and the wins of the San Francisco Giants. Now, let's play ball!


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft the results section of an academic research paper. You speak in the past tense (you found...).
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the results section of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from Wikipedia and Baseball-Reference.com .

For the time period 1975 to 2022, you found a correlation 0.5424641, r-squared of 0.2942673, and p < 0.01.

One figure will be included. The figure (Fig. 1) is a scatterplot showing the strong correlation between the two variables. You don't need to specify where; I will add the figure.

Here is the title and abstract of the paper:
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
Introduction
As the venerable Yogi Berra once said, "It's like déjà vu all over again." When it comes to the enigmatic connection between the triumphs of the New York Yankees and the wins of the San Francisco Giants, it seems we're in for a wild pitch in the world of sports analytics.
While some may think that attempting to find a correlation between the Yankees and the Giants is a statistical curveball, our research aims to knock it out of the park by exploring this seemingly pitch-perfect relationship, albeit with a generous helping of humor and a side of whimsy.
The combination of numbers and sports may bring to mind a mix of statistics and superstitions, but our study seeks to infuse a touch of levity into the realm of scholarly research. After all, who said academics can't hit a home run with an occasional pun or an unexpected twist in their hypotheses?
To tackle this intriguing conundrum, our research team rummaged through decades of data from Wikipedia and Baseball-Reference.com, and after hours of crunching numbers and combing through endless game logs, we've arrived at some truly eyebrow-raising findings. Brace yourselves, for we've discovered a correlation coefficient of 0.5424641 and a preposterously low p-value of less than 0.01, suggesting a statistically significant relationship that defies the conventions of sports analysis.
So, dear reader, prepare to embark on a rollercoaster ride through the world of baseball mysteries and statistical shenanigans. This study not only promises to uncover the peculiar synchronicity between these two beloved baseball squads but also offers a crackling commentary on the zany, offbeat side of sports analytics that might just leave you smiling in wonder.
With this paper, we aim to blend the rigors of scientific inquiry with a sprinkle of wit and a pinch of charm, inviting you to join us in unraveling the comically curious connection between the Yankees' victories and the Giants' wins. Strap in, as we coach you through this amusing and unexpected journey into the playful realm of sports statistics and the curious correlations that make science a grand slam of surprises.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

Our investigation into the peculiar correlation between the New York Yankees' victories and the San Francisco Giants' wins has produced a result that we must admit has left us feeling rather blitzed – in a good way, of course! The data collected from 1975 to 2022 delivered a correlation coefficient of 0.5424641, an r-squared of 0.2942673, and a p-value of less than 0.01. It's fair to say that these findings have thrown us a bit of a curveball (pun intended), and we couldn't be more thrilled with the outcome.

One glance at Fig. 1, our scatterplot, would make even the most stoic statistician do a double-take. The points on the plot resemble a game of connect the dots, showcasing a strong correlation that caught us off guard, much like a knuckleball on a windy day. It's a testament to the unpredictability and, dare we say, magic of baseball statistics.

Upon realizing the significance of the correlation we uncovered, we couldn't help but see the humor in this unexpected connection – it's almost as if the baseball gods themselves have been joking around with us. The baseball diamond, it seems, has an amusing way of weaving narratives that delight and surprise us in equal measure.

In light of these results, we come to the conclusion that there may indeed be more to the victories of the Bronx Bombers and the wins of the Bay Area Boys than meets the eye. It's a mind-boggling realization, one that may leave us scratching our heads as if we just faced a knuckleball pitcher. Our findings prompt further inquiry into the mystical world of sports synchronicity, and we hope our research leaves a lasting impression on both the scientific and sporting communities.

Cheers to the unpredictability of the game and the delightful curiosity that statistics can unravel – it seems that in the world of sports analytics, there's always an unexpected home run waiting just around the corner.


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft the discussion section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the discussion section of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Limit your response to 500 tokens.

Here are the title, abstract, literature review, and results sections. Please harken back to 1-2 of the goofy items in the literature review, but pretend to take them completely seriously. Discuss how your results supported the prior research.

Do not write a conclusion. I will add a conclusion after this.

[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

[[LITERATURE REVIEW]]
The correlation between the triumphs of the New York Yankees and the wins of the San Francisco Giants has long perplexed sports enthusiasts and statisticians alike. Our study delves into this conundrum by examining a mix of rigorous academic research, whimsical observations, and a dash of good-natured banter. We begin by examining serious-sounding studies that initially set the stage for our lighthearted exploration of this quirky relationship.
Smith and Doe (2001) meticulously detailed the statistical nuances of baseball victories, inadvertently paving the way for our jovial jaunt into the realm of sports analytics. They probed the depths of winning streaks and batting averages with an earnestness that sets the tone for our comically curious investigation.
However, as we venture deeper, we stumble upon Jones' (2005) work that unexpectedly veers into the territory of wins and whimsy. Jones' study, though solemn in its approach, unknowingly presents the perfect segue into our effervescent examination of the Yankees' and Giants' wins.
Turning to more non-fiction literature, "Moneyball" by Michael Lewis provides a serious take on baseball analytics. While our paper injects a healthy dose of frivolity, the foundations laid by Lewis' seminal work contribute to the scholarly rigor of our study, albeit with a humorous twist.
On a fictional note, "The Art of Fielding" by Chad Harbach promises an insightful examination of baseball and its idiosyncrasies, inadvertently nudging us into the realm of sporting whimsy. While our findings are firmly grounded in empirical evidence, Harbach's novel inspires us to infuse a touch of charm into the exploration of correlations between the Yankees' victories and the Giants' wins.
In an unexpected turn, social media posts by avid baseball fans such as @BatFlipBuddy and @HomeRunHilarity surprisingly offer anecdotal insights that nudge our paper into the delightful domain of sports-related banter. While their musings lack the formality of academic research, they inject a punch of humor that mirrors our own approach to unraveling this zany phenomenon.
As we embark on this mirthful investigation, we invite our readers to embrace the offbeat, the whimsical, and the downright silly as we unravel the captivating correlation between the New York Yankees and the San Francisco Giants. With a twinkle in our eyes and a wink to Yogi Berra, we march ahead armed with statistics, laughter, and the spirit of the game, beckoning scholars and enthusiasts alike to join us in this jubilant journey.

[[RESULTS]]
Our investigation into the peculiar correlation between the New York Yankees' victories and the San Francisco Giants' wins has produced a result that we must admit has left us feeling rather blitzed – in a good way, of course! The data collected from 1975 to 2022 delivered a correlation coefficient of 0.5424641, an r-squared of 0.2942673, and a p-value of less than 0.01. It's fair to say that these findings have thrown us a bit of a curveball (pun intended), and we couldn't be more thrilled with the outcome.
One glance at Fig. 1, our scatterplot, would make even the most stoic statistician do a double-take. The points on the plot resemble a game of connect the dots, showcasing a strong correlation that caught us off guard, much like a knuckleball on a windy day. It's a testament to the unpredictability and, dare we say, magic of baseball statistics.
Upon realizing the significance of the correlation we uncovered, we couldn't help but see the humor in this unexpected connection – it's almost as if the baseball gods themselves have been joking around with us. The baseball diamond, it seems, has an amusing way of weaving narratives that delight and surprise us in equal measure.
In light of these results, we come to the conclusion that there may indeed be more to the victories of the Bronx Bombers and the wins of the Bay Area Boys than meets the eye. It's a mind-boggling realization, one that may leave us scratching our heads as if we just faced a knuckleball pitcher. Our findings prompt further inquiry into the mystical world of sports synchronicity, and we hope our research leaves a lasting impression on both the scientific and sporting communities.
Cheers to the unpredictability of the game and the delightful curiosity that statistics can unravel – it seems that in the world of sports analytics, there's always an unexpected home run waiting just around the corner.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

Our findings have indeed hit it out of the park, uncovering a correlation between the New York Yankees' victories and the San Francisco Giants' wins that is as surprising as a knuckleball on a windy day. To add a touch of seriousness to our discussion, our results align with the previous serious-sounding studies that inadvertently paved the way for our lighthearted exploration. Smith and Doe's meticulous attention to statistical nuances and Jones' unknowingly whimsical study set the stage for our effervescent investigation, much like a well-executed infield double play.

Our statistical analysis, akin to a well-executed 'Moneyball' play, revealed a correlation coefficient of 0.5424641 (a stat that's sure to make sabermetricians crack a smile) with a p-value of less than 0.01, signifying a noteworthy statistical significance that even the most stoic of statisticians can't help but appreciate. It's as if the data were hitting a walk-off home run, leaving us baffled yet gleeful.

Looking at our scatterplot, one can't help but marvel at the game of connect the dots unraveled before us. The points deftly resemble a path from the Bronx to the Bay Area, illustrating a correlation that caught us off guard, much like a surprise bunt in the bottom of the ninth. This unexpected connection, much like an 'Art of Fielding' play, underscores the mystical allure of baseball statistics, prodding us to embrace the delightful unpredictability of the game.

Our results support the previously unsuspected social media posts by @BatFlipBuddy and @HomeRunHilarity, infusing a punch of humor that mirrors our own approach. It's as if the twinkle in our eyes and the witty banter of informed fans have amplified our statistical revelations in a most delightful manner, adding an unexpected grand slam of insight to our findings.

In conclusion, our realization of the correlation between the Yankees' victories and the Giants' wins leaves us feeling as if we just faced a knuckleball pitcher – slightly bewildered yet thoroughly entertained. Our journey into the enchanting world of sports synchronicity has left us with an unexpected home run that embodies the spirit of both sports and scientific inquiry.

With a nod to Yogi Berra and a tip of the cap to the baseball gods, we invite scholars and enthusiasts to join us in acknowledging the delightful and perplexing turns of statistical analysis and the spirit of the game. After all, in the curious realm of sports analytics, it appears that unexpected connections and statistical synchronicities may hold the key to unraveling the enigmatic ties between the Yankees' triumphs and the Giants' wins.


Model: gpt-3.5-turbo-1106
System prompt: You are a researcher writing an academic paper.You draft the discussion section of goofy academic research papers that sounds like it belongs based on the title and abstract provided.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up a short conclusion of an academic research paper presenting the findings of the connection between New York Yankees' victories and Wins for the San Francisco Giants. Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Limit your response to 300 tokens. At the very end, assert that no more research is needed in this area.

Here are the title, abstract, introduction, and results sections.
[[TITLE]]
"Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins"

[[ABSTRACT]]
In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

[[INTRDUCTION]]
Introduction
As the venerable Yogi Berra once said, "It's like déjà vu all over again." When it comes to the enigmatic connection between the triumphs of the New York Yankees and the wins of the San Francisco Giants, it seems we're in for a wild pitch in the world of sports analytics.
While some may think that attempting to find a correlation between the Yankees and the Giants is a statistical curveball, our research aims to knock it out of the park by exploring this seemingly pitch-perfect relationship, albeit with a generous helping of humor and a side of whimsy.
The combination of numbers and sports may bring to mind a mix of statistics and superstitions, but our study seeks to infuse a touch of levity into the realm of scholarly research. After all, who said academics can't hit a home run with an occasional pun or an unexpected twist in their hypotheses?
To tackle this intriguing conundrum, our research team rummaged through decades of data from Wikipedia and Baseball-Reference.com, and after hours of crunching numbers and combing through endless game logs, we've arrived at some truly eyebrow-raising findings. Brace yourselves, for we've discovered a correlation coefficient of 0.5424641 and a preposterously low p-value of less than 0.01, suggesting a statistically significant relationship that defies the conventions of sports analysis.
So, dear reader, prepare to embark on a rollercoaster ride through the world of baseball mysteries and statistical shenanigans. This study not only promises to uncover the peculiar synchronicity between these two beloved baseball squads but also offers a crackling commentary on the zany, offbeat side of sports analytics that might just leave you smiling in wonder.
With this paper, we aim to blend the rigors of scientific inquiry with a sprinkle of wit and a pinch of charm, inviting you to join us in unraveling the comically curious connection between the Yankees' victories and the Giants' wins. Strap in, as we coach you through this amusing and unexpected journey into the playful realm of sports statistics and the curious correlations that make science a grand slam of surprises.

[[RESULTS]]
Our investigation into the peculiar correlation between the New York Yankees' victories and the San Francisco Giants' wins has produced a result that we must admit has left us feeling rather blitzed – in a good way, of course! The data collected from 1975 to 2022 delivered a correlation coefficient of 0.5424641, an r-squared of 0.2942673, and a p-value of less than 0.01. It's fair to say that these findings have thrown us a bit of a curveball (pun intended), and we couldn't be more thrilled with the outcome.
One glance at Fig. 1, our scatterplot, would make even the most stoic statistician do a double-take. The points on the plot resemble a game of connect the dots, showcasing a strong correlation that caught us off guard, much like a knuckleball on a windy day. It's a testament to the unpredictability and, dare we say, magic of baseball statistics.
Upon realizing the significance of the correlation we uncovered, we couldn't help but see the humor in this unexpected connection – it's almost as if the baseball gods themselves have been joking around with us. The baseball diamond, it seems, has an amusing way of weaving narratives that delight and surprise us in equal measure.
In light of these results, we come to the conclusion that there may indeed be more to the victories of the Bronx Bombers and the wins of the Bay Area Boys than meets the eye. It's a mind-boggling realization, one that may leave us scratching our heads as if we just faced a knuckleball pitcher. Our findings prompt further inquiry into the mystical world of sports synchronicity, and we hope our research leaves a lasting impression on both the scientific and sporting communities.
Cheers to the unpredictability of the game and the delightful curiosity that statistics can unravel – it seems that in the world of sports analytics, there's always an unexpected home run waiting just around the corner.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

As we bring this delightful romp through the whimsical world of sports statistics to a close, we must tip our hats to the awe-inspiring correlation between the New York Yankees' victories and the San Francisco Giants' wins. Our findings have not only left us astounded but have also solidified the notion that when it comes to baseball, there's more than meets the eye – it's a real curveball of a game!

While some may view our study as a statistical wild pitch, we stand firm in our conviction that the synchronicity between these two iconic teams is no laughing matter – well, except for when we consider the sheer joy and amusement it brings. It's as if the baseball gods themselves are playing an elaborate game of statistical chess, with the Yankees and Giants as their pawns in a grand, lighthearted experiment.

With a correlation coefficient that has us doing a double-take and a p-value so low it's practically scraping the floor (cue the limbo music!), we can confidently declare that uncovering this connection is, without a doubt, a home run for sports analytics. The statistical shenanigans at play are enough to leave even the most stoic researcher grinning from ear to ear, perhaps envisioning scatterplots taking on a life of their own and doing the conga across their computer screens.

As we bid adieu to this wacky, wonderful tale of statistical synchronicity, we firmly assert that no more research is needed in this area. It's time to sit back, relax, and enjoy the charmingly unpredictable nature of sports and statistics – after all, who said scholarly inquiry can't be a grand slam of good old-fashioned fun?


Model: gpt-3.5-turbo-1106
System prompt: You provide fictional names of academic journals. You say nothing else, and you do not chat with the user.
User prompt: Please provide the name of a funny but plausible sounding research, scientific, or academic journal that would publish a paper entited Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Sports Synchronicity


Model: gpt-3.5-turbo-1106
System prompt: You provide fictional names of nonprofit research organizations and associations. You say nothing else, and you do not chat with the user.
User prompt: Please provide the name of a funny but plausible sounding nonprofit, academic, or scientific association or organization that would sponsor research that resulted in a paper entited Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins. Respond only with the name of a fictional organization.

ChatGPT:

The Institute for Sports Synchronicity Studies


Model: gpt-3.5-turbo-1106
System prompt: You provide potential search keywords separated by commas. You say nothing else, and you do not chat with the user.
User prompt: Please provide potential search keywords for a paper titled Yankee Doodle Victory: The Curious Correlation Between New York Yankees' Triumphs and San Francisco Giants' Wins with an abstract of In this paper, we present a study that delves into the intriguing link between the success of the New York Yankees and the victories of the San Francisco Giants, adding a dash of whimsy to the world of sports analytics. Drawing upon data from Wikipedia and Baseball-Reference.com spanning from 1975 to 2022, our research team employed statistical analysis to unravel this puzzling relationship. Surprisingly, our findings revealed a correlation coefficient of 0.5424641 with a staggering p-value of less than 0.01, indicating a noteworthy statistical significance. Our study sheds light on the unexpected and, quite frankly, mind-boggling synchronicity between these two prominent baseball teams. With an abundance of puns and a sprinkle of humor, we aim to provide a lighthearted yet insightful perspective on this unconventional phenomenon, which may leave both sports enthusiasts and academics scratching their heads in amusement.

ChatGPT:

New York Yankees, San Francisco Giants, baseball teams, sports analytics, statistical analysis, correlation coefficient, p-value, baseball victories, sports synchronicity, baseball history, sports humor

*There is a bunch of Python happening behind the scenes to turn this prompt sequence into a PDF.



Random correlation

Discover a new correlation

View all correlations

View all research papers

Report an error


Data details

New York Yankees' victories
Detailed data title: New York Yankees' match victories count
Source: Wikipedia
See what else correlates with New York Yankees' victories

Wins for the San Francisco Giants
Detailed data title: The total number of season wins for the San Francisco Giants
Source: Baseball-Reference.com
See what else correlates with Wins for the San Francisco Giants

Correlation r = 0.5424641 (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.2942673 (Coefficient of determination)
This means 29.4% of the change in the one variable (i.e., Wins for the San Francisco Giants) is predictable based on the change in the other (i.e., New York Yankees' victories) over the 48 years from 1975 through 2022.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 6.81E-5. 0.0000680751945568275300000000
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.54 in 0.00681% of random cases. Said differently, if you correlated 14,690 random variables Which I absolutely did.
with the same 47 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 47 because we have two variables measured over a period of 48 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.31, 0.72 ] 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.
197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022
New York Yankees' victories (Match won)8397100100891035979918797908985746771768870799296114988795103101101959794891039597958584878491100103339299
Wins for the San Francisco Giants (Game wins)807475897175568779666283908392857572103556768908986979095100917576717288928694768884876473772910781




Why this works

  1. Data dredging: I have 25,153 variables in my database. I compare all these variables against each other to find ones that randomly match up. That's 632,673,409 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. Confounding variable: 2020 is particularly different from the other years on this graph. Confounding variables (like global pandemics) will cause two variables to look connected when in fact a "sneaky third" variable is influencing both of them behind the scenes.




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([83,97,100,100,89,103,59,79,91,87,97,90,89,85,74,67,71,76,88,70,79,92,96,114,98,87,95,103,101,101,95,97,94,89,103,95,97,95,85,84,87,84,91,100,103,33,92,99,])
array_2 = np.array([80,74,75,89,71,75,56,87,79,66,62,83,90,83,92,85,75,72,103,55,67,68,90,89,86,97,90,95,100,91,75,76,71,72,88,92,86,94,76,88,84,87,64,73,77,29,107,81,])
array_1_name = "New York Yankees' victories"
array_2_name = "Wins for the San Francisco Giants"

# 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?

Your rating is stellar!


Correlation ID: 2405 · Black Variable ID: 77 · Red Variable ID: 4321
about · subscribe · emailme@tylervigen.com · twitter

CC BY 4.0