about · email me · subscribe
Spurious correlation #4,106 · 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 Consolidated Edison's stock price (ED).  The chart goes from 2002 to 2022, and the two variables track closely in value over that time. Small Image

AI explanation

The increase in breweries led to a surge in beer production, creating a higher demand for electricity to power the brewing process. As a result, Consolidated Edison's stock price (ED) rose due to the increased need for their power services in brewery operations. "Looks like the stock market is tapping into the shocking connection between beer and electricity!"

Model: dalle-3
Prompt: Generate a comic-book-style illustration with muted colors and a dotted halftone pattern from the 1960s depicting a bustling city scene. The scene features a row of colorful breweries lining a busy street, with their chimneys expelling steam into the air. In the background, a stock market ticker shows the rising price of Consolidated Edison's stock (ED). The city lights glow brighter as evening falls, representing the increased demand for electricity to power the surge in beer production. 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 Consolidated Edison's stock price (ED). 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 funny image you would see on reddit A comic-book-style illustration with muted colors and a dotted halftone pattern from the 1960s A photo-realistic image Sci-fi fantacy Cyberpunk
ChatGPT: A comic-book-style illustration with muted colors and a dotted halftone pattern from the 1960s

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 Consolidated Edison's stock price (ED), in the following situation: The increase in breweries led to a surge in beer production, creating a higher demand for electricity to power the brewing process. As a result, Consolidated Edison's stock price (ED) rose due to the increased need for their power services in brewery operations. "Looks like the stock market is tapping into the shocking connection between beer and electricity!". Keep the description simple.
ChatGPT: A bustling city scene with a row of colorful breweries lining a busy street, their chimneys expelling steam into the air. In the background, a stock market ticker shows the rising price of Consolidated Edison's stock (ED), while the city lights glow brighter as evening falls, representing the increased demand for electricity to power the surge in beer production.

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 comic-book-style illustration with muted colors and a dotted halftone pattern from the 1960s ] and depicting this scene: A bustling city scene with a row of colorful breweries lining a busy street, their chimneys expelling steam into the air. In the background, a stock market ticker shows the rising price of Consolidated Edison's stock (ED), while the city lights glow brighter as evening falls, representing the increased demand for electricity to power the surge in beer production. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: Generate a comic-book-style illustration with muted colors and a dotted halftone pattern from the 1960s depicting a bustling city scene. The scene features a row of colorful breweries lining a busy street, with their chimneys expelling steam into the air. In the background, a stock market ticker shows the rising price of Consolidated Edison's stock (ED). The city lights glow brighter as evening falls, representing the increased demand for electricity to power the surge in beer production.

*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 Consolidated Edison's stock price (ED) to increase. Add a funny one-liner at the end.

AI academic paper

(Because p < 0.01)
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

The Journal of Fermentation Economics

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 silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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

Your research team used data from Brewers Association and LSEG Analytics (Refinitiv) to assess this nagging question. You found a correlation coefficient of 0.9427783 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]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Here is the title and abstract of the paper:
[[TITLE]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
**[[INTRODUCTION]]**

Craft beer and stock prices may seem like an odd pairing, but as the saying goes, there's no use crying over spilt beer, especially when it's seemingly linked to the financial markets. As financial researchers, we often find ourselves knee-deep in numbers and equations, but every now and then, we stumble upon unexpected connections, much like finding a hidden treasure in a sea of data. Our quest for knowledge led us to explore the correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. It turns out, this investigation has left us feeling hoppy and foamy with excitement, just like a perfectly poured pint!

The relationship between breweries and stock prices may seem as unlikely as a beer with no foamy head - but bear with us, and we'll hop straight into the frothy details. We sought to answer the burning question: is there a statistical connection between the craft beer boom and one of the nation's leading electric utility companies? Our hopped-up curiosity and pun-derful enthusiasm led us to pore over data from the Brewers Association and LSEG Analytics (Refinitiv). Once we dived into the data, we realized that this investigation wasn't just about fermenting ideas; it was about tapping into a whole new dimension of financial analysis.

Now, it's time to address the elephant in the brewery – the statistical methods. We won't merely skim the surface; we'll dive deep into the statistical ocean to uncover the bubbling secrets hidden within the data. As we delved into the numbers, we found ourselves in a brew-tiful relationship, statistically speaking. Our findings revealed a remarkably high correlation coefficient of 0.9427783, with a p-value of less than 0.01, over the years 2002 to 2022. It’s safe to say that the results left us feeling like we've struck gold in the stock market.

Interestingly, as the number of breweries continued to rise, Consolidated Edison's stock price followed suit – proving once and for all that the beer and power surge is more than just a cheeky dad joke; it's a robust statistical trend. In light of these findings, it seems that we've stumbled upon a pint-sized economic phenomenon that demands attention. Who knew that the beer industry could have such a lager-than-life impact on the stock market? Cheers to that, and let's raise a glass to the foam-tastic world of statistical analysis and its unexpected relationships with our favorite beverages and financial ventures.


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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 couple popular internet memes that are related to one of the topics.

Here is the title and abstract of the paper:
[[TITLE]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
Craft beer and stock prices may seem like an odd pairing, but as the saying goes, there's no use crying over spilt beer, especially when it's seemingly linked to the financial markets. As financial researchers, we often find ourselves knee-deep in numbers and equations, but every now and then, we stumble upon unexpected connections, much like finding a hidden treasure in a sea of data. Our quest for knowledge led us to explore the correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. It turns out, this investigation has left us feeling hoppy and foamy with excitement, just like a perfectly poured pint!
The relationship between breweries and stock prices may seem as unlikely as a beer with no foamy head - but bear with us, and we'll hop straight into the frothy details. We sought to answer the burning question: is there a statistical connection between the craft beer boom and one of the nation's leading electric utility companies? Our hopped-up curiosity and pun-derful enthusiasm led us to pore over data from the Brewers Association and LSEG Analytics (Refinitiv). Once we dived into the data, we realized that this investigation wasn't just about fermenting ideas; it was about tapping into a whole new dimension of financial analysis.
Now, it's time to address the elephant in the brewery – the statistical methods. We won't merely skim the surface; we'll dive deep into the statistical ocean to uncover the bubbling secrets hidden within the data. As we delved into the numbers, we found ourselves in a brew-tiful relationship, statistically speaking. Our findings revealed a remarkably high correlation coefficient of 0.9427783, with a p-value of less than 0.01, over the years 2002 to 2022. It’s safe to say that the results left us feeling like we've struck gold in the stock market.
Interestingly, as the number of breweries continued to rise, Consolidated Edison's stock price followed suit – proving once and for all that the beer and power surge is more than just a cheeky dad joke; it's a robust statistical trend. In light of these findings, it seems that we've stumbled upon a pint-sized economic phenomenon that demands attention. Who knew that the beer industry could have such a lager-than-life impact on the stock market? Cheers to that, and let's raise a glass to the foam-tastic world of statistical analysis and its unexpected relationships with our favorite beverages and financial ventures.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The connection between economic indicators and seemingly unrelated events has been a topic of interest for many researchers. In "Beerconomics: How Beer Explains the World," the authors delve into the economic, cultural, and social impact of the beer industry. Similarly, in "Stocks for the Long Run," the author explores the intricacies of stock market trends and the factors that can influence stock prices. However, amidst the seriousness of these academic works, there lies an element of humor that cannot be overlooked.

Speaking of humor, did you hear about the beer that couldn't hold its hops? It was a real lightweight! Now, back to the serious business of literature review.

While the correlation between the number of breweries in the United States and stock prices might sound like a tall tale, it's no laughing matter, as "Freakonomics: A Rogue Economist Explores the Hidden Side of Everything" suggests. In their chapter on unexpected correlations, the authors discuss how seemingly unrelated variables can be interconnected in surprising ways. However, this serious discussion could use a hint of comedic relief, don't you think?

And speaking of unexpected correlations, did you hear about the electrical engineer who went to the brewery? He couldn't resist Ohm-ing for a pint of ale! Sorry for the shocking pun, but a little bit of humor never hertz, does it?

Moving on to more serious literature, "Brewing Up a Business: Adventures in Entrepreneurship from the Founder of Dogfish Head Craft Brewery" sheds light on the entrepreneurial side of the craft beer industry, emphasizing the growth and impact of breweries in the United States. On the other hand, "A Random Walk Down Wall Street" provides an extensive analysis of stock market trends and the factors that influence stock prices. But let's not forget to inject a bit of levity into the mix, shall we?

Now, onto the more lighthearted side of literature, "The Hitchhiker's Guide to the Galaxy" and "Good Omens" explore unexpected connections and cosmic coincidences, although they don't directly touch on the stock market or breweries. However, in the spirit of whimsy, let's imagine the discovery of a beer planet where the inhabitants measure their wealth in kegs and stock options. After all, a little imagination never hurt anyone!

And speaking of unexpected connections, did you hear about the stock analyst who only invests in breweries? He claims it's the hops and dreams of the financial world! Okay, okay, I promise that was the last one. Let's get back to the serious literature review, shall we?


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. 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]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

[[INTRODUCTION]]
Craft beer and stock prices may seem like an odd pairing, but as the saying goes, there's no use crying over spilt beer, especially when it's seemingly linked to the financial markets. As financial researchers, we often find ourselves knee-deep in numbers and equations, but every now and then, we stumble upon unexpected connections, much like finding a hidden treasure in a sea of data. Our quest for knowledge led us to explore the correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. It turns out, this investigation has left us feeling hoppy and foamy with excitement, just like a perfectly poured pint!
The relationship between breweries and stock prices may seem as unlikely as a beer with no foamy head - but bear with us, and we'll hop straight into the frothy details. We sought to answer the burning question: is there a statistical connection between the craft beer boom and one of the nation's leading electric utility companies? Our hopped-up curiosity and pun-derful enthusiasm led us to pore over data from the Brewers Association and LSEG Analytics (Refinitiv). Once we dived into the data, we realized that this investigation wasn't just about fermenting ideas; it was about tapping into a whole new dimension of financial analysis.
Now, it's time to address the elephant in the brewery – the statistical methods. We won't merely skim the surface; we'll dive deep into the statistical ocean to uncover the bubbling secrets hidden within the data. As we delved into the numbers, we found ourselves in a brew-tiful relationship, statistically speaking. Our findings revealed a remarkably high correlation coefficient of 0.9427783, with a p-value of less than 0.01, over the years 2002 to 2022. It’s safe to say that the results left us feeling like we've struck gold in the stock market.
Interestingly, as the number of breweries continued to rise, Consolidated Edison's stock price followed suit – proving once and for all that the beer and power surge is more than just a cheeky dad joke; it's a robust statistical trend. In light of these findings, it seems that we've stumbled upon a pint-sized economic phenomenon that demands attention. Who knew that the beer industry could have such a lager-than-life impact on the stock market? Cheers to that, and let's raise a glass to the foam-tastic world of statistical analysis and its unexpected relationships with our favorite beverages and financial ventures.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

To brew up our methodology, we had to concoct a blend of statistical analyses as frothy as a well-poured pint of beer. First off, we wrangled the data on the number of breweries in the United States from the Brewers Association. We wanted to make sure our data wasn't just a bunch of hops and dreams, so we cross-referenced it with LSEG Analytics (Refinitiv) to ensure accuracy. After all, we couldn't risk the possibility of serving up a drafty dataset.

Next, we took a deep dive into Consolidated Edison's (ED) stock prices, ensuring we didn't get too "shocked" by any unexpected fluctuations. We wanted to make sure our findings weren't just a result of statistical ale-ments, so we carefully considered the potential impact of confounding variables – after all, we couldn't afford for our results to be as frothy as a flat beer.

After obtaining the data, we donned our metaphorical lab coats and unleashed an array of statistical tools to decipher the relationship between the number of breweries and Consolidated Edison's stock price. We utilized regression analysis to untangle the interwoven threads of causation and correlation, ensuring our approach was rock solid, or should we say, "hops" solid.

To validate our findings, we employed time series analysis to uncover any temporal patterns in the data. Our analysis needed to be as solid as a well-built fermentation tank to withstand the scrutiny of peer reviewers. After all, we couldn't afford to have our results turn out as disappointing as a pint with a lackluster head.

Finally, we crunched the numbers using sophisticated software that left no "mug" unturned. Our approach was as meticulous as a brewmaster perfecting a new recipe, ensuring that our results were as robust as a sturdy pint glass. In the end, we were left feeling more exhilarated than a beer aficionado stumbling upon a rare vintage – our methodology was as refreshing as an ice-cold brew on a hot summer day.

We'll continue with this methodology and will make sure to complete it according to the standards.


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. 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.9427783, r-squared of 0.8888308, 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]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
Craft beer and stock prices may seem like an odd pairing, but as the saying goes, there's no use crying over spilt beer, especially when it's seemingly linked to the financial markets. As financial researchers, we often find ourselves knee-deep in numbers and equations, but every now and then, we stumble upon unexpected connections, much like finding a hidden treasure in a sea of data. Our quest for knowledge led us to explore the correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. It turns out, this investigation has left us feeling hoppy and foamy with excitement, just like a perfectly poured pint!
The relationship between breweries and stock prices may seem as unlikely as a beer with no foamy head - but bear with us, and we'll hop straight into the frothy details. We sought to answer the burning question: is there a statistical connection between the craft beer boom and one of the nation's leading electric utility companies? Our hopped-up curiosity and pun-derful enthusiasm led us to pore over data from the Brewers Association and LSEG Analytics (Refinitiv). Once we dived into the data, we realized that this investigation wasn't just about fermenting ideas; it was about tapping into a whole new dimension of financial analysis.
Now, it's time to address the elephant in the brewery – the statistical methods. We won't merely skim the surface; we'll dive deep into the statistical ocean to uncover the bubbling secrets hidden within the data. As we delved into the numbers, we found ourselves in a brew-tiful relationship, statistically speaking. Our findings revealed a remarkably high correlation coefficient of 0.9427783, with a p-value of less than 0.01, over the years 2002 to 2022. It’s safe to say that the results left us feeling like we've struck gold in the stock market.
Interestingly, as the number of breweries continued to rise, Consolidated Edison's stock price followed suit – proving once and for all that the beer and power surge is more than just a cheeky dad joke; it's a robust statistical trend. In light of these findings, it seems that we've stumbled upon a pint-sized economic phenomenon that demands attention. Who knew that the beer industry could have such a lager-than-life impact on the stock market? Cheers to that, and let's raise a glass to the foam-tastic world of statistical analysis and its unexpected relationships with our favorite beverages and financial ventures.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The results of our investigation into the relationship between the number of breweries in the United States and Consolidated Edison's (ED) stock price have left us frothing with excitement. The statistical analysis revealed a jaw-dropping correlation coefficient of 0.9427783 and an r-squared value of 0.8888308 over the period from 2002 to 2022. And when it comes to statistical significance, the p-value of less than 0.01 suggests that this relationship is as real as a properly poured pint.

The connections we've unveiled between the craft beer industry and stock prices seem to have uncanny persistence, much like the foam on a freshly poured beer. It's safe to say that this correlation isn't just a flash in the pan – it's a long-lasting, sudsy phenomenon that refuses to dissipate like bubbles in your favorite brew. The "beer and power surge" is more than just a play on words; it's a robust and tangible relationship worthy of further exploration.

In accordance with our findings, we present Figure 1, a scatterplot that vividly illustrates the strong positive correlation between the number of breweries and Consolidated Edison's stock price. As you can see, the trendline slopes upward more steeply than a frosty mug of amber ale, further emphasizing the compelling relationship we've uncovered.

Now, before we raise our glasses in celebration, let's take a moment for a quick dad joke: Why did the statistical analyst go to the brewery? To get a "pint" of reference, of course! But in all seriousness, our results present an intriguing insight into the interconnectedness of seemingly unrelated sectors of the economy. It seems that when it comes to financial analysis, there's more brewing beneath the surface than meets the eye.


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. 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]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

[[LITERATURE REVIEW]]
The connection between economic indicators and seemingly unrelated events has been a topic of interest for many researchers. In "Beerconomics: How Beer Explains the World," the authors delve into the economic, cultural, and social impact of the beer industry. Similarly, in "Stocks for the Long Run," the author explores the intricacies of stock market trends and the factors that can influence stock prices. However, amidst the seriousness of these academic works, there lies an element of humor that cannot be overlooked.
Speaking of humor, did you hear about the beer that couldn't hold its hops? It was a real lightweight! Now, back to the serious business of literature review.
While the correlation between the number of breweries in the United States and stock prices might sound like a tall tale, it's no laughing matter, as "Freakonomics: A Rogue Economist Explores the Hidden Side of Everything" suggests. In their chapter on unexpected correlations, the authors discuss how seemingly unrelated variables can be interconnected in surprising ways. However, this serious discussion could use a hint of comedic relief, don't you think?
And speaking of unexpected correlations, did you hear about the electrical engineer who went to the brewery? He couldn't resist Ohm-ing for a pint of ale! Sorry for the shocking pun, but a little bit of humor never hertz, does it?
Moving on to more serious literature, "Brewing Up a Business: Adventures in Entrepreneurship from the Founder of Dogfish Head Craft Brewery" sheds light on the entrepreneurial side of the craft beer industry, emphasizing the growth and impact of breweries in the United States. On the other hand, "A Random Walk Down Wall Street" provides an extensive analysis of stock market trends and the factors that influence stock prices. But let's not forget to inject a bit of levity into the mix, shall we?
Now, onto the more lighthearted side of literature, "The Hitchhiker's Guide to the Galaxy" and "Good Omens" explore unexpected connections and cosmic coincidences, although they don't directly touch on the stock market or breweries. However, in the spirit of whimsy, let's imagine the discovery of a beer planet where the inhabitants measure their wealth in kegs and stock options. After all, a little imagination never hurt anyone!
And speaking of unexpected connections, did you hear about the stock analyst who only invests in breweries? He claims it's the hops and dreams of the financial world! Okay, okay, I promise that was the last one. Let's get back to the serious literature review, shall we?

[[RESULTS]]
The results of our investigation into the relationship between the number of breweries in the United States and Consolidated Edison's (ED) stock price have left us frothing with excitement. The statistical analysis revealed a jaw-dropping correlation coefficient of 0.9427783 and an r-squared value of 0.8888308 over the period from 2002 to 2022. And when it comes to statistical significance, the p-value of less than 0.01 suggests that this relationship is as real as a properly poured pint.
The connections we've unveiled between the craft beer industry and stock prices seem to have uncanny persistence, much like the foam on a freshly poured beer. It's safe to say that this correlation isn't just a flash in the pan – it's a long-lasting, sudsy phenomenon that refuses to dissipate like bubbles in your favorite brew. The "beer and power surge" is more than just a play on words; it's a robust and tangible relationship worthy of further exploration.
In accordance with our findings, we present Figure 1, a scatterplot that vividly illustrates the strong positive correlation between the number of breweries and Consolidated Edison's stock price. As you can see, the trendline slopes upward more steeply than a frosty mug of amber ale, further emphasizing the compelling relationship we've uncovered.
Now, before we raise our glasses in celebration, let's take a moment for a quick dad joke: Why did the statistical analyst go to the brewery? To get a "pint" of reference, of course! But in all seriousness, our results present an intriguing insight into the interconnectedness of seemingly unrelated sectors of the economy. It seems that when it comes to financial analysis, there's more brewing beneath the surface than meets the eye.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

Our findings have uncorked a world of opportunities for further exploration into the whimsical web of interconnectedness in the economy. The surprisingly high correlation coefficient of 0.9427783 between the number of breweries in the United States and Consolidated Edison's (ED) stock price over the period of 2002 to 2022 not only reaffirms the importance of lager datasets but also makes for a heady discovery in the realm of economic indicators. It seems that the dance of supply and demand in the beer industry has left quite the impression on the stock market, akin to a frothy head on a well-poured pint. Our results substantiate the prior research that has hinted at the unexpected correlations lurking within the economic landscape.

In the spirit of hoppy celebrations, our findings provide a refreshing sip of insight into the beer and stock market connection. This "beer and power surge" phenomenon has fermented beyond a mere frothy anecdote, demonstrating a robust and persistent relationship that is as invigorating as a cold brew on a hot day. The r-squared value of 0.8888308 underscores the strength of this correlation, much like the fortitude of a well-crafted ale in a competitive market. It’s safe to say that this correlation is no small beer – it’s a powerhouse of statistical significance worthy of raising a glass to.

The scatterplot (see Figure 1) further illuminates the compelling relationship between the number of breweries and Consolidated Edison's stock price, painting a picture as vivid as the flavors of a well-crafted beer. The upward slope of the trendline illustrates the buoyant ascent of stock price alongside the burgeoning presence of breweries, akin to the effervescence of bubbles in a freshly poured brew. Surely, this connection is no mere "ale-wife's tale"; it's a robust finding that invites us to tap into a keg of further research possibilities.

In conclusion, the interconnectedness of the craft beer industry and stock market proves to be more than a mere coincidence, leaving us with a brew-tiful mix of curiosity and excitement for the unexplored avenues of economic analysis. These results beckon us to delve deeper into the potential impact of other unexpected variables on the financial ecosystem, reinforcing the ethos that in the realm of economic research, there’s always more brewing beneath the surface than meets the eye. Cheers to that, and may our future endeavours yield frothy insights that leave us feeling hoppy and charged up about the boundless mysteries of the economy!


Model: gpt-3.5-turbo-1106
System prompt: You are a silly 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 The number of Breweries in the United States and Consolidated Edison's stock price (ED). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. 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]]
Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price

[[ABSTRACT]]
In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.

It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

[[INTRDUCTION]]
Craft beer and stock prices may seem like an odd pairing, but as the saying goes, there's no use crying over spilt beer, especially when it's seemingly linked to the financial markets. As financial researchers, we often find ourselves knee-deep in numbers and equations, but every now and then, we stumble upon unexpected connections, much like finding a hidden treasure in a sea of data. Our quest for knowledge led us to explore the correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. It turns out, this investigation has left us feeling hoppy and foamy with excitement, just like a perfectly poured pint!
The relationship between breweries and stock prices may seem as unlikely as a beer with no foamy head - but bear with us, and we'll hop straight into the frothy details. We sought to answer the burning question: is there a statistical connection between the craft beer boom and one of the nation's leading electric utility companies? Our hopped-up curiosity and pun-derful enthusiasm led us to pore over data from the Brewers Association and LSEG Analytics (Refinitiv). Once we dived into the data, we realized that this investigation wasn't just about fermenting ideas; it was about tapping into a whole new dimension of financial analysis.
Now, it's time to address the elephant in the brewery – the statistical methods. We won't merely skim the surface; we'll dive deep into the statistical ocean to uncover the bubbling secrets hidden within the data. As we delved into the numbers, we found ourselves in a brew-tiful relationship, statistically speaking. Our findings revealed a remarkably high correlation coefficient of 0.9427783, with a p-value of less than 0.01, over the years 2002 to 2022. It’s safe to say that the results left us feeling like we've struck gold in the stock market.
Interestingly, as the number of breweries continued to rise, Consolidated Edison's stock price followed suit – proving once and for all that the beer and power surge is more than just a cheeky dad joke; it's a robust statistical trend. In light of these findings, it seems that we've stumbled upon a pint-sized economic phenomenon that demands attention. Who knew that the beer industry could have such a lager-than-life impact on the stock market? Cheers to that, and let's raise a glass to the foam-tastic world of statistical analysis and its unexpected relationships with our favorite beverages and financial ventures.

[[RESULTS]]
The results of our investigation into the relationship between the number of breweries in the United States and Consolidated Edison's (ED) stock price have left us frothing with excitement. The statistical analysis revealed a jaw-dropping correlation coefficient of 0.9427783 and an r-squared value of 0.8888308 over the period from 2002 to 2022. And when it comes to statistical significance, the p-value of less than 0.01 suggests that this relationship is as real as a properly poured pint.
The connections we've unveiled between the craft beer industry and stock prices seem to have uncanny persistence, much like the foam on a freshly poured beer. It's safe to say that this correlation isn't just a flash in the pan – it's a long-lasting, sudsy phenomenon that refuses to dissipate like bubbles in your favorite brew. The "beer and power surge" is more than just a play on words; it's a robust and tangible relationship worthy of further exploration.
In accordance with our findings, we present Figure 1, a scatterplot that vividly illustrates the strong positive correlation between the number of breweries and Consolidated Edison's stock price. As you can see, the trendline slopes upward more steeply than a frosty mug of amber ale, further emphasizing the compelling relationship we've uncovered.
Now, before we raise our glasses in celebration, let's take a moment for a quick dad joke: Why did the statistical analyst go to the brewery? To get a "pint" of reference, of course! But in all seriousness, our results present an intriguing insight into the interconnectedness of seemingly unrelated sectors of the economy. It seems that when it comes to financial analysis, there's more brewing beneath the surface than meets the eye.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In conclusion, our research has bubbled to the surface a compelling relationship between the number of breweries in the United States and Consolidated Edison's (ED) stock price. The statistical analysis has brought to light a "beer and power surge" that is more than just frothy fun - it's a robust and tangible connection with a r-squared value that could quench even the most insatiable curiosity. It's clear that this correlation isn't just a "brew"-haha; it's a statistically significant and persistent phenomenon worthy of further investigation.

As we wrap up this sudsy saga, we can't help but marvel at the unexpected link between the craft beer industry and stock prices. Who would have thought that the rise of breweries could have such a "hops-pitable" impact on the stock market? It's a testament to the delightfully quirky world of statistical analysis where every statistical relationship can be a "hop-portunity" for discovery. And if nothing else, this research has certainly given us a "beer-ometer" to gauge the market's fizz!

Now, before we tap out of this discussion, let's part with a fitting dad joke: Why should you never trust atoms? Because they make up everything! Just like the humble atom, our findings suggest that there's more brewing in the interconnectedness of the economy than meets the eye - and with that, we'll "yeast" to no longer fermenting this area of study.

In the spirit of good science, we call for no further research in this area. After all, there's no need to cry over spilled beer when we've already raised a glass to this "ale"-ment of statistical analysis! Cheers to that!


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 Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Fermentation 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 Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price. Respond only with the name of a fictional organization.

ChatGPT:

The Institute for Fermentation Economics and Energy Relationships


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 Brewing Profits: A Sudsy Connection Between Breweries and Consolidated Edison's Stock Price with an abstract of In this paper, we present a comprehensive analysis of the surprising correlation between the number of breweries in the United States and Consolidated Edison's (ED) stock price. Utilizing data from the Brewers Association and LSEG Analytics (Refinitiv), we sought to uncover the foamy relationship between these seemingly unrelated variables. Our findings reveal a remarkably high correlation coefficient of 0.9427783 and p < 0.01 over the period of 2002 to 2022.
It appears that the burgeoning craft beer industry has more than just a frothy impact on the taste buds of enthusiasts; it also seems to have a tangible effect on the stock market. Interestingly, as the number of breweries continues to rise, Consolidated Edison's stock price follows suit, leading us to dub this phenomenon the "beer and power surge." Not to mention, this discovery has left us feeling hoppy and charged up about the whimsical interconnectedness of the economy - a real ale-ment of financial analysis. It seems that in this case, the yeast is more than just a leavening agent; it's a rising factor in the stock market.

ChatGPT:

Craft beer industry, Consolidated Edison stock price, breweries in the United States, correlation analysis, Brewers Association data, LSEG Analytics, stock market impact, beer and power surge, financial analysis, economic interconnectedness, rising factor in stock market

*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

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

See what else correlates with Consolidated Edison's stock price (ED)

Correlation r = 0.9427783 (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.8888308 (Coefficient of determination)
This means 88.9% of the change in the one variable (i.e., Consolidated Edison's stock price (ED)) 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.6E-10. 0.0000000001647176593721483000
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.94 in 1.6E-8% of random cases. Said differently, if you correlated 6,070,994,475 random variables You don't actually need 6 billion 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.86, 0.98 ] 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
Consolidated Edison's stock price (ED) (Stock price)40.1142.9543.0643.7646.4348.1248.673945.7349.7662.156.255.1566.163.8573.7284.7576.3290.5572.2785.35




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([40.11,42.95,43.06,43.76,46.43,48.12,48.67,39,45.73,49.76,62.1,56.2,55.15,66.1,63.85,73.72,84.75,76.32,90.55,72.27,85.35,])
array_1_name = "The number of Breweries in the United States"
array_2_name = "Consolidated Edison's stock price (ED)"

# 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 correlation rating is out of this world!


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

CC BY 4.0