about · email me · subscribe
Spurious correlation #2,388 · 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 Breweries in the United States and the second variable is Boeing's stock price (BA).  The chart goes from 2002 to 2022, and the two variables track closely in value over that time. Small Image
Download png
, svg

AI explanation

As the number of breweries in the United States increased, so did the demand for beer. This led to more people wanting to travel to visit different breweries, boosting the need for airplanes. With Boeing being a major supplier of aircraft, their stock price naturally rose as they scrambled to keep up with the beer-fueled travel craze. It's a brew-tiful example of how hops, barley, and aviation can all come together to lift stocks to new heights.

Model: dalle-3
Prompt: [ A meme ] Depict a Boeing 737 Max soaring through a clear blue sky, adorned with colorful craft beer brewery logos. Below, a vibrant landscape unfolds, with numerous breweries dotting the map and a bustling stock market ticker displaying Boeing's stock price shooting upwards. 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: The number of Breweries in the United States and Boeing's stock price (BA). 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: a meme a funny image you would see on reddit An image that looks like it is a scene from A Disney Movie Voxel art Cyberpunk
ChatGPT: A meme

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 The number of Breweries in the United States and Boeing's stock price (BA), in the following situation: Imagine a world where airplane passengers demand a higher quality in-flight beer selection. As more breweries open, airlines scramble to offer a variety of craft beer options to cater to their passengers' discerning palates. This unexpected competition among airlines leads to a surge in demand for new and upgraded aircrafts from Boeing, ultimately boosting their stock price. It seems like the sky's the limit for this unusual connection!. Keep the description simple.
ChatGPT: Amidst a backdrop of blue skies, a Boeing 737 Max gracefully soars through the air, its vibrant exterior emblazoned with logos of various craft breweries. Below, a bustling landscape unfolds, showcasing a rising number of breweries opening up across the United States. In the foreground, a stock market ticker prominently displays Boeing's stock price chart surging upward, reflecting the unexpected demand for new aircrafts driven by the expanding craft beer industry.

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 meme ] and depicting this scene: Amidst a backdrop of blue skies, a Boeing 737 Max gracefully soars through the air, its vibrant exterior emblazoned with logos of various craft breweries. Below, a bustling landscape unfolds, showcasing a rising number of breweries opening up across the United States. In the foreground, a stock market ticker prominently displays Boeing's stock price chart surging upward, reflecting the unexpected demand for new aircrafts driven by the expanding craft beer industry. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: [ A meme ] Depict a Boeing 737 Max soaring through a clear blue sky, adorned with colorful craft beer brewery logos. Below, a vibrant landscape unfolds, with numerous breweries dotting the map and a bustling stock market ticker displaying Boeing's stock price shooting upwards.

*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 an increase in The number of Breweries in the United States caused Boeing's stock price (BA) to increase.

AI academic paper

(Because p < 0.01)
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

The Journal of Gastronomic Economics

Jan 2024

Reminder: This paper is AI-generated. Not real!
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 witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). Make lots of jokes, goofy observations, and puns.

Make the title punny if you can come up with clever pun. If not, make it sound serious.

Your research team used data from Brewers Association and LSEG Analytics (Refinitiv) to assess this nagging question. You found a correlation coefficient of 0.9103156 and p < 0.01 for 2002 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
Introduction

Pour yourself a pint and get ready to embark on a frothy, hop-laden journey into the uncharted territory of market dynamics. In this paper, we explore the tantalizing relationship between the number of breweries in the United States and the stock price of Boeing, affectionately known as "BA" in the financial world. While it may seem like a peculiar pairing at first glance, our investigation reveals a surprisingly robust link that has investors scratching their heads and beer enthusiasts raising their glasses in surprise.

As the craft beer industry bubbled and fizzed its way into the American market over the past two decades, little did we know that it may have been secretly influencing the stock prices of aircraft giant Boeing. With precision and rigor that would make a brewmaster proud, we meticulously examined data from the Brewers Association and LSEG Analytics (Refinitiv) spanning from 2002 to 2022. What we discovered was nothing short of astonishing – a correlation coefficient of 0.9103156 that not only raised eyebrows but also raised the question: what on earth do breweries have to do with Boeing's stock price?

This revelatory finding sent shockwaves through the financial and brewing communities, prompting both seasoned investors and beer aficionados to contemplate the unexpected dance between barley and Boeing. Our statistical analysis, with a p-value of less than 0.01, left no room for doubt – there is an undeniable connection between the burgeoning craft beer scene and the fluctuating fortunes of Boeing's stock.

But before we dive headfirst into this captivating correlation, it is imperative to acknowledge the inherently whimsical nature of this investigation. We are, after all, delving into uncharted territory where malt meets market and hops hobnob with stock prices. It is with this blend of curiosity and skepticism that we approach our findings, fully cognizant of the need to approach the data with a brewer's precision and a statistician's rigor.

As we journey into the hoppy labyrinth of causality, we invite you to join us in savoring the unexpected interplay between the spirited world of craft brewing and the heady heights of stock market performance. So, grab a cold one and fasten your seatbelt – we're about to take off on a flight of fancy with Boeing and brews as our unlikely co-pilots in this ale-phabet soup of economic exploration.


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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 name a few real TV shows that sound like they might be relevant to the topic that you watched as research.

Here is the title and abstract of the paper:
[[TITLE]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
Introduction
Pour yourself a pint and get ready to embark on a frothy, hop-laden journey into the uncharted territory of market dynamics. In this paper, we explore the tantalizing relationship between the number of breweries in the United States and the stock price of Boeing, affectionately known as "BA" in the financial world. While it may seem like a peculiar pairing at first glance, our investigation reveals a surprisingly robust link that has investors scratching their heads and beer enthusiasts raising their glasses in surprise.
As the craft beer industry bubbled and fizzed its way into the American market over the past two decades, little did we know that it may have been secretly influencing the stock prices of aircraft giant Boeing. With precision and rigor that would make a brewmaster proud, we meticulously examined data from the Brewers Association and LSEG Analytics (Refinitiv) spanning from 2002 to 2022. What we discovered was nothing short of astonishing – a correlation coefficient of 0.9103156 that not only raised eyebrows but also raised the question: what on earth do breweries have to do with Boeing's stock price?
This revelatory finding sent shockwaves through the financial and brewing communities, prompting both seasoned investors and beer aficionados to contemplate the unexpected dance between barley and Boeing. Our statistical analysis, with a p-value of less than 0.01, left no room for doubt – there is an undeniable connection between the burgeoning craft beer scene and the fluctuating fortunes of Boeing's stock.
But before we dive headfirst into this captivating correlation, it is imperative to acknowledge the inherently whimsical nature of this investigation. We are, after all, delving into uncharted territory where malt meets market and hops hobnob with stock prices. It is with this blend of curiosity and skepticism that we approach our findings, fully cognizant of the need to approach the data with a brewer's precision and a statistician's rigor.
As we journey into the hoppy labyrinth of causality, we invite you to join us in savoring the unexpected interplay between the spirited world of craft brewing and the heady heights of stock market performance. So, grab a cold one and fasten your seatbelt – we're about to take off on a flight of fancy with Boeing and brews as our unlikely co-pilots in this ale-phabet soup of economic exploration.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

In their seminal work, Smith and Doe (2008) examined the relationship between industrial manufacturer stock prices and unconventional market factors. While their study delved into the impact of weather patterns and even celebrity endorsements on stock performance, they may have overlooked the effervescent influence of craft beer on the aerospace industry. Furthermore, Jones (2012) conducted a comprehensive analysis of consumer preferences and their implications for stock market dynamics, but missed an opportunity to tap into the frothy world of brewery proliferation as a potential market driver.

Moving beyond the traditional bounds of financial literature, a number of non-fiction works shed light on the rapid evolution of the craft brewing industry and its societal impact. For instance, "The Audacity of Hops: The History of America's Craft Beer Revolution" by Maureen Ogle and "Bitter Brew: The Rise and Fall of Anheuser-Busch and America's Kings of Beer" by William Knoedelseder provide in-depth explorations of the craft beer movement, offering a hearty brew of historical context and economic implications.

In the realm of fiction, Orwell's classic "1984" may not seem immediately relevant to our investigation, but one cannot discount the proverbial "Big Beer" looming over the craft brewing scene. Perhaps the most unlikely contender, J.K. Rowling's "Harry Potter" series, unexpectedly dabbles in the notion of magical brews and elixirs, sparking whimsical associations with the mystical forces at play in stock market fluctuations.

Additionally, a number of television programs, such as "Brew Dogs" and "Brew Masters," provide insightful glimpses into the art and science of craft brewing. Although these shows may not directly address stock market dynamics, they certainly contribute to a deeper understanding of the cultural and commercial nuances surrounding the beer industry, which undoubtedly impact the broader economic landscape.

As we navigate this ale-phabet soup of literature, it becomes evident that the intersection of breweries and stock prices is an underexplored area ripe for further investigation. So, with a "hoppy" mindset and a "flight of fancy," we turn to the empirical evidence and theoretical frameworks that will help us navigate this tantalizingly unexpected relationship.


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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 Brewers Association and LSEG Analytics (Refinitiv) . You used data from 2002 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

[[INTRODUCTION]]
Introduction
Pour yourself a pint and get ready to embark on a frothy, hop-laden journey into the uncharted territory of market dynamics. In this paper, we explore the tantalizing relationship between the number of breweries in the United States and the stock price of Boeing, affectionately known as "BA" in the financial world. While it may seem like a peculiar pairing at first glance, our investigation reveals a surprisingly robust link that has investors scratching their heads and beer enthusiasts raising their glasses in surprise.
As the craft beer industry bubbled and fizzed its way into the American market over the past two decades, little did we know that it may have been secretly influencing the stock prices of aircraft giant Boeing. With precision and rigor that would make a brewmaster proud, we meticulously examined data from the Brewers Association and LSEG Analytics (Refinitiv) spanning from 2002 to 2022. What we discovered was nothing short of astonishing – a correlation coefficient of 0.9103156 that not only raised eyebrows but also raised the question: what on earth do breweries have to do with Boeing's stock price?
This revelatory finding sent shockwaves through the financial and brewing communities, prompting both seasoned investors and beer aficionados to contemplate the unexpected dance between barley and Boeing. Our statistical analysis, with a p-value of less than 0.01, left no room for doubt – there is an undeniable connection between the burgeoning craft beer scene and the fluctuating fortunes of Boeing's stock.
But before we dive headfirst into this captivating correlation, it is imperative to acknowledge the inherently whimsical nature of this investigation. We are, after all, delving into uncharted territory where malt meets market and hops hobnob with stock prices. It is with this blend of curiosity and skepticism that we approach our findings, fully cognizant of the need to approach the data with a brewer's precision and a statistician's rigor.
As we journey into the hoppy labyrinth of causality, we invite you to join us in savoring the unexpected interplay between the spirited world of craft brewing and the heady heights of stock market performance. So, grab a cold one and fasten your seatbelt – we're about to take off on a flight of fancy with Boeing and brews as our unlikely co-pilots in this ale-phabet soup of economic exploration.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

Data Collection:
Initially, our research team scoured the vast expanse of the internet like ardent treasure hunters in search of golden nuggets. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) over the period from 2002 to 2022, we managed to capture a comprehensive snapshot of the number of breweries in the United States and Boeing's stock price (BA). We then proceeded to feast on this data buffet like a group of famished statisticians at an all-you-can-eat data festival.

Outlandish Accounting for Exogenous Factors:
To ensure our study accounted for all possible variables, we conducted an exhaustive review of extraneous factors that could influence both the craft beer industry and Boeing's stock performance. We delved into the peculiar world of zymurgy and aerodynamics, concocting a wild concoction of potential confounding variables that included air traffic, hops prices, consumer sentiment, alcohol consumption patterns, and even the weather patterns that might impact beer sales. This exercise was reminiscent of trying to catch butterflies in a thunderstorm, but we persisted with the same determination that propels a brewer through the arduous process of creating a perfect IPA.

The Statistical Brew:
In blending our data, we harnessed the power of statistical wizardry, utilizing a robust blend of time series analysis, correlation tests, and a dash of regression modeling. We finely calibrated our statistical cauldron, ensuring that every measurement and test was executed with the precision of a master brewer crafting a sought-after microbrew. Our models underwent rigorous stress testing, not unlike subjecting a new beer recipe to relentless taste tests at a bustling brewery.

Elaborate Sensitivity Analysis:
An integral part of our methodological concoction involved subjecting our findings to an array of sensitivity analyses. We implemented various scenarios resembling a brewer experimenting with different fermentation temperatures and hop schedules, probing the resilience of our results to changes in methodology and assumptions. This exercise provided a critical temperature check on the veracity of our findings, akin to gauging the impact of different brewing techniques on the flavor profile of a beloved brew.

Robustness Checks and Validation:
Having brewed our initial models, we subjected them to a rigorous battery of robustness checks and validations, akin to an attentive brewmaster ensuring that each batch of beer adheres to the highest standards of quality. We scrutinized our results from every conceivable angle, applying statistical jiu-jitsu to wrestle with any potential weaknesses or biases lurking in our analysis. This painstaking process ensured that our findings were as robust and reliable as a well-crafted lager – impossible to shake or stir into uncertainty.

Ethical Diligence:
Finally, like responsible academic bartenders, we undertook steps to ensure the ethical integrity of our analysis. Our team upheld the principles of transparency and intellectual honesty, providing a clear view of our research process, no different than a brewery offering a full disclosure of its ingredients and brewing methods. We built our study on the bedrock of integrity, ensuring that our findings were as invigorating and untainted as a freshly tapped keg of premium craft beer.


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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 Brewers Association and LSEG Analytics (Refinitiv) .

For the time period 2002 to 2022, you found a correlation 0.9103156, r-squared of 0.8286745, 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
Introduction
Pour yourself a pint and get ready to embark on a frothy, hop-laden journey into the uncharted territory of market dynamics. In this paper, we explore the tantalizing relationship between the number of breweries in the United States and the stock price of Boeing, affectionately known as "BA" in the financial world. While it may seem like a peculiar pairing at first glance, our investigation reveals a surprisingly robust link that has investors scratching their heads and beer enthusiasts raising their glasses in surprise.
As the craft beer industry bubbled and fizzed its way into the American market over the past two decades, little did we know that it may have been secretly influencing the stock prices of aircraft giant Boeing. With precision and rigor that would make a brewmaster proud, we meticulously examined data from the Brewers Association and LSEG Analytics (Refinitiv) spanning from 2002 to 2022. What we discovered was nothing short of astonishing – a correlation coefficient of 0.9103156 that not only raised eyebrows but also raised the question: what on earth do breweries have to do with Boeing's stock price?
This revelatory finding sent shockwaves through the financial and brewing communities, prompting both seasoned investors and beer aficionados to contemplate the unexpected dance between barley and Boeing. Our statistical analysis, with a p-value of less than 0.01, left no room for doubt – there is an undeniable connection between the burgeoning craft beer scene and the fluctuating fortunes of Boeing's stock.
But before we dive headfirst into this captivating correlation, it is imperative to acknowledge the inherently whimsical nature of this investigation. We are, after all, delving into uncharted territory where malt meets market and hops hobnob with stock prices. It is with this blend of curiosity and skepticism that we approach our findings, fully cognizant of the need to approach the data with a brewer's precision and a statistician's rigor.
As we journey into the hoppy labyrinth of causality, we invite you to join us in savoring the unexpected interplay between the spirited world of craft brewing and the heady heights of stock market performance. So, grab a cold one and fasten your seatbelt – we're about to take off on a flight of fancy with Boeing and brews as our unlikely co-pilots in this ale-phabet soup of economic exploration.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The results of our analysis revealed a staggering correlation between the number of breweries in the United States and Boeing's stock price (BA). Our research, fueled by a blend of hops and hypothesis testing, yielded a correlation coefficient of 0.9103156. This means the relationship between the two variables is about as strong as an imperial stout!

Our findings also uncovered an r-squared value of 0.8286745, indicating that approximately 82.87% of the variation in Boeing's stock price can be explained by the number of breweries in the US. To put it simply, the ale-ffect of breweries on Boeing's stock price is no small beer—it's the real malt deal!

The p-value of less than 0.01 further reinforced the robustness of this association, making it statistically significant and leaving little room for skepticism. This p-value is so low, it’s practically basement-level—clear evidence that there's more to this relationship than mere coincidence.

For a visual depiction of this brew-tiful correlation, please refer to Figure 1, which showcases a scatterplot illustrating the strong and unmistakable relationship between the number of breweries and Boeing's stock price. It's a sight to behold, much like a perfectly poured pint of craft beer!

In summary, our findings provide compelling evidence of a symbiotic link between the frothy world of craft brewing and the turbulence of the stock market. These unexpected bedfellows have brewed up a heady mix of economic intrigue that demands further exploration and analysis. As we raise our glasses to toast to these revelatory results, we invite investors and beer enthusiasts alike to ponder the implications of this unlikely, yet undeniable, connection. Cheers to the ale-chemical blend of beer and Boeing that has bubbled to the surface of economic discourse!


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

[[LITERATURE REVIEW]]
In their seminal work, Smith and Doe (2008) examined the relationship between industrial manufacturer stock prices and unconventional market factors. While their study delved into the impact of weather patterns and even celebrity endorsements on stock performance, they may have overlooked the effervescent influence of craft beer on the aerospace industry. Furthermore, Jones (2012) conducted a comprehensive analysis of consumer preferences and their implications for stock market dynamics, but missed an opportunity to tap into the frothy world of brewery proliferation as a potential market driver.
Moving beyond the traditional bounds of financial literature, a number of non-fiction works shed light on the rapid evolution of the craft brewing industry and its societal impact. For instance, "The Audacity of Hops: The History of America's Craft Beer Revolution" by Maureen Ogle and "Bitter Brew: The Rise and Fall of Anheuser-Busch and America's Kings of Beer" by William Knoedelseder provide in-depth explorations of the craft beer movement, offering a hearty brew of historical context and economic implications.
In the realm of fiction, Orwell's classic "1984" may not seem immediately relevant to our investigation, but one cannot discount the proverbial "Big Beer" looming over the craft brewing scene. Perhaps the most unlikely contender, J.K. Rowling's "Harry Potter" series, unexpectedly dabbles in the notion of magical brews and elixirs, sparking whimsical associations with the mystical forces at play in stock market fluctuations.
Additionally, a number of television programs, such as "Brew Dogs" and "Brew Masters," provide insightful glimpses into the art and science of craft brewing. Although these shows may not directly address stock market dynamics, they certainly contribute to a deeper understanding of the cultural and commercial nuances surrounding the beer industry, which undoubtedly impact the broader economic landscape.
As we navigate this ale-phabet soup of literature, it becomes evident that the intersection of breweries and stock prices is an underexplored area ripe for further investigation. So, with a "hoppy" mindset and a "flight of fancy," we turn to the empirical evidence and theoretical frameworks that will help us navigate this tantalizingly unexpected relationship.

[[RESULTS]]
The results of our analysis revealed a staggering correlation between the number of breweries in the United States and Boeing's stock price (BA). Our research, fueled by a blend of hops and hypothesis testing, yielded a correlation coefficient of 0.9103156. This means the relationship between the two variables is about as strong as an imperial stout!
Our findings also uncovered an r-squared value of 0.8286745, indicating that approximately 82.87% of the variation in Boeing's stock price can be explained by the number of breweries in the US. To put it simply, the ale-ffect of breweries on Boeing's stock price is no small beer—it's the real malt deal!
The p-value of less than 0.01 further reinforced the robustness of this association, making it statistically significant and leaving little room for skepticism. This p-value is so low, it’s practically basement-level—clear evidence that there's more to this relationship than mere coincidence.
For a visual depiction of this brew-tiful correlation, please refer to Figure 1, which showcases a scatterplot illustrating the strong and unmistakable relationship between the number of breweries and Boeing's stock price. It's a sight to behold, much like a perfectly poured pint of craft beer!
In summary, our findings provide compelling evidence of a symbiotic link between the frothy world of craft brewing and the turbulence of the stock market. These unexpected bedfellows have brewed up a heady mix of economic intrigue that demands further exploration and analysis. As we raise our glasses to toast to these revelatory results, we invite investors and beer enthusiasts alike to ponder the implications of this unlikely, yet undeniable, connection. Cheers to the ale-chemical blend of beer and Boeing that has bubbled to the surface of economic discourse!

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

Our findings have bubbled up a frothy brew of intrigue, confirming and expanding upon prior research that may have overlooked the effervescent influence of craft beer on stock market dynamics. Just as Smith and Doe (2008) explored unconventional market factors, our study has unearthed the hop-pening relationship between the number of breweries in the United States and Boeing's stock price (BA), shedding light on a unique market driver that may have been overlooked in previous research.

Jones (2012) may have missed a golden opportunity to tap into the frothy world of brewery proliferation and its potential impact on stock performance. Our results, with a correlation coefficient of 0.9103156, highlight the robust association between the burgeoning craft beer industry and the fluctuation in Boeing's stock prices, providing a spirited approach to understanding economic trends and market dynamics. The literature has hinted at this unexpected relationship, but our study has uncorked the true depth of this connection, leaving no doubt that these variables are truly "high-gravity" influencers of each other's movements in the market.

Our findings confirmed that the number of breweries in the US explains approximately 82.87% of the variation in Boeing's stock price. That's right—craft beer's influence can account for over 80% of the stock price fluctuations. It's like the alpha hop in a robust IPA—a dominant force that cannot be overlooked. This substantiates the unexpected influence of craft beer on Boeing's stock price, showcasing a unique market synergy that demands further attention.

Furthermore, the statistically significant p-value, lower than the final gravity of the most potent beer, provides firm evidence that the relationship we've unveiled is no mere coincidence. The robustness of this association is clearer than the transparency of a lager, leaving little room for doubt. The correlation may be as clear as a filtered pilsner, but the implications are as nuanced as the subtle notes in a barrel-aged stout.

In conclusion, our study has brought to light a symbiotic link between the world of craft brewing and the turbulence of the stock market that demands further exploration and analysis. This ale-chemical blend of beer and Boeing represents a captivating interplay of economic forces, offering investors and beer enthusiasts alike a fresh perspective on market dynamics. Let's raise our glasses to this revelatory connection, and toast to the unexpected confluence of hops and stocks that has emerged from our analysis. Cheers to the wort-y investigation of an academic brew that has undoubtedly fermented into a rich tapestry of market insights!


Model: gpt-3.5-turbo-1106
System prompt: You are a witty academic researcher. Your writing sounds like it belongs in a statistics journal.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 The number of Breweries in the United States and Boeing's stock price (BA). 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]]
The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price

[[ABSTRACT]]
This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

[[INTRDUCTION]]
Introduction
Pour yourself a pint and get ready to embark on a frothy, hop-laden journey into the uncharted territory of market dynamics. In this paper, we explore the tantalizing relationship between the number of breweries in the United States and the stock price of Boeing, affectionately known as "BA" in the financial world. While it may seem like a peculiar pairing at first glance, our investigation reveals a surprisingly robust link that has investors scratching their heads and beer enthusiasts raising their glasses in surprise.
As the craft beer industry bubbled and fizzed its way into the American market over the past two decades, little did we know that it may have been secretly influencing the stock prices of aircraft giant Boeing. With precision and rigor that would make a brewmaster proud, we meticulously examined data from the Brewers Association and LSEG Analytics (Refinitiv) spanning from 2002 to 2022. What we discovered was nothing short of astonishing – a correlation coefficient of 0.9103156 that not only raised eyebrows but also raised the question: what on earth do breweries have to do with Boeing's stock price?
This revelatory finding sent shockwaves through the financial and brewing communities, prompting both seasoned investors and beer aficionados to contemplate the unexpected dance between barley and Boeing. Our statistical analysis, with a p-value of less than 0.01, left no room for doubt – there is an undeniable connection between the burgeoning craft beer scene and the fluctuating fortunes of Boeing's stock.
But before we dive headfirst into this captivating correlation, it is imperative to acknowledge the inherently whimsical nature of this investigation. We are, after all, delving into uncharted territory where malt meets market and hops hobnob with stock prices. It is with this blend of curiosity and skepticism that we approach our findings, fully cognizant of the need to approach the data with a brewer's precision and a statistician's rigor.
As we journey into the hoppy labyrinth of causality, we invite you to join us in savoring the unexpected interplay between the spirited world of craft brewing and the heady heights of stock market performance. So, grab a cold one and fasten your seatbelt – we're about to take off on a flight of fancy with Boeing and brews as our unlikely co-pilots in this ale-phabet soup of economic exploration.

[[RESULTS]]
The results of our analysis revealed a staggering correlation between the number of breweries in the United States and Boeing's stock price (BA). Our research, fueled by a blend of hops and hypothesis testing, yielded a correlation coefficient of 0.9103156. This means the relationship between the two variables is about as strong as an imperial stout!
Our findings also uncovered an r-squared value of 0.8286745, indicating that approximately 82.87% of the variation in Boeing's stock price can be explained by the number of breweries in the US. To put it simply, the ale-ffect of breweries on Boeing's stock price is no small beer—it's the real malt deal!
The p-value of less than 0.01 further reinforced the robustness of this association, making it statistically significant and leaving little room for skepticism. This p-value is so low, it’s practically basement-level—clear evidence that there's more to this relationship than mere coincidence.
For a visual depiction of this brew-tiful correlation, please refer to Figure 1, which showcases a scatterplot illustrating the strong and unmistakable relationship between the number of breweries and Boeing's stock price. It's a sight to behold, much like a perfectly poured pint of craft beer!
In summary, our findings provide compelling evidence of a symbiotic link between the frothy world of craft brewing and the turbulence of the stock market. These unexpected bedfellows have brewed up a heady mix of economic intrigue that demands further exploration and analysis. As we raise our glasses to toast to these revelatory results, we invite investors and beer enthusiasts alike to ponder the implications of this unlikely, yet undeniable, connection. Cheers to the ale-chemical blend of beer and Boeing that has bubbled to the surface of economic discourse!

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In conclusion, our research has tapped into a fascinating relationship between the number of breweries in the United States and Boeing's stock price, and the results are nothing short of intoxicating! The foam-tastic correlation coefficient of 0.9103156 has left us hoppy and astounded, resembling the feeling of discovering a rare, sought-after brew. Our findings, like a well-crafted ale, offer a rich and complex taste of the interconnectedness between seemingly unrelated variables.

It's clear that the craft beer industry is not just brewing great beers; it's also brewing up some unexpected market movements. This brewery-Boeing boogie has left us pondering the ales and lows of stock price fluctuations in a whole new light. It's as if the stock market has been hopped up on this hoppy influence all along! Who would have thought that ales and BA stocks could have so much in common? It seems they're both experts in creating buzz!

As we wrap up this investigation, it's worth raising a glass to the recommendation that investors keep an eye on the pulse of the craft beer scene as they navigate the turbulences of the stock market. After all, you never know when a pale ale might pale in comparison to the impact of breweries on Boeing's stock price! Speaking of which, we believe our findings have quenched the thirst for further research in this area. It's time to raise a toast to the end of this frothy journey, and declare that no more research is needed in this particular field - we've filled our steins to the brim with such brew-tiful results! Cheers to statistical serendipity!


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 The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Gastronomic Economics


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 The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price. Respond only with the name of a fictional organization.

ChatGPT:

The Center for Brew-tastic Economics and Aeronautic 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 The Brews and the Bulls: Exploring the Ale-Phabet Soup of Breweries and Boeing's Stock Price with an abstract of This research examines the frothy relationship between the number of breweries in the United States and Boeing's stock price (BA). Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv) from 2002 to 2022, our study revealed a striking correlation coefficient of 0.9103156 and a statistically significant p-value of less than 0.01. Our findings suggest a robust association between the burgeoning craft beer industry and the fluctuations in Boeing's stock prices. We delve into the hoppy conundrum of causality and consider potential implications for investors seeking to tap into this unexpected relationship. Our analysis sheds light on the unforeseen interplay between the hops in beer and the highs and lows of stock market performance, offering a spirited approach to understanding economic trends and market dynamics.

ChatGPT:

number of breweries, Boeing stock price, craft beer industry, Brewers Association, LSEG Analytics, Refinitiv, correlation coefficient, stock market performance, economic trends, market dynamics, causality

*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

The number of Breweries in the United States
Detailed data title: Number of Breweries in the United States
Source: Brewers Association
See what else correlates with The number of Breweries in the United States

Boeing's stock price (BA)
Detailed data title: Opening price of The Boeing Company (BA) on the first trading day of the year
Source: LSEG Analytics (Refinitiv)
Additional Info: Via Microsoft Excel Stockhistory function

See what else correlates with Boeing's stock price (BA)

Correlation r = 0.9103156 (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.8286745 (Coefficient of determination)
This means 82.9% of the change in the one variable (i.e., Boeing's stock price (BA)) is predictable based on the change in the other (i.e., The number of Breweries in the United States) over the 21 years from 2002 through 2022.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 1.03E-8. 0.0000000103462752786083540000
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.91 in 1.03E-6% of random cases. Said differently, if you correlated 96,653,141 random variables You don't actually need 96 million variables to find a correlation like this one. I don't have that many variables in my database. You can also correlate variables that are not independent. I do this a lot.

p-value calculations are useful for understanding the probability of a result happening by chance. They are most useful when used to highlight the risk of a fluke outcome. For example, if you calculate a p-value of 0.30, the risk that the result is a fluke is high. It is good to know that! But there are lots of ways to get a p-value of less than 0.01, as evidenced by this project.

In this particular case, the values are so extreme as to be meaningless. That's why no one reports p-values with specificity after they drop below 0.01.

Just to be clear: I'm being completely transparent about the calculations. There is no math trickery. This is just how statistics shakes out when you calculate hundreds of millions of random correlations.
with the same 20 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 20 because we have two variables measured over a period of 21 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.79, 0.96 ] 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.
200220032004200520062007200820092010201120122013201420152016201720182019202020212022
The number of Breweries in the United States (Number of breweries)157516291635161217411805189619332131252526703162401448475780676777228557909293849709
Boeing's stock price (BA) (Stock price)38.543342.551.8570.488.987.5742.855.7266.1574.776.55136.01131.07141.38156.3295.75316.19328.55210204




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.




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([1575,1629,1635,1612,1741,1805,1896,1933,2131,2525,2670,3162,4014,4847,5780,6767,7722,8557,9092,9384,9709,])
array_2 = np.array([38.54,33,42.5,51.85,70.4,88.9,87.57,42.8,55.72,66.15,74.7,76.55,136.01,131.07,141.38,156.3,295.75,316.19,328.55,210,204,])
array_1_name = "The number of Breweries in the United States"
array_2_name = "Boeing's stock price (BA)"

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

You're the correlation whisperer we needed!


Correlation ID: 2388 · Black Variable ID: 34 · Red Variable ID: 1613
about · subscribe · emailme@tylervigen.com · twitter

CC BY 4.0