about · email me · subscribe
Spurious correlation #2,635 · 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 Alnylam Pharmaceuticals' stock price (ALNY).  The chart goes from 2005 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 hops. This led to a hop shortage, creating a golden opportunity for Alnylam Pharmaceuticals to develop a revolutionary genetically modified super hop. Investors hopped on board, causing a surge in ALNY stock price as they ale-gedly saw the potential for hoppy returns.

Model: dalle-3
Prompt: Generate an image of a brewery with stacks of barrels filled with hops and barley. In the center, display a stock ticker for Alnylam Pharmaceuticals' (ALNY) prominently featured on a board, showing a steady climb in price. Show brewers working diligently amidst the barrels, with investors raising their glasses in celebration. The scene should emanate excitement and possibility as the brewery and biopharmaceutical industries merge, creating a buzz of opportunity and growth. 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 Alnylam Pharmaceuticals' stock price (ALNY). 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 funny image macro inspired by bauhaus An image that looks like it is a scene from 'Star Wars' a funny image macro
ChatGPT: a funny image macro

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 Alnylam Pharmaceuticals' stock price (ALNY), in the following situation: As the number of breweries in the US hops up, so does the demand for hops and barley, causing a spike in prices. This put the froth on top of Alnylam Pharmaceuticals' stock as investors realized the potential for genetically modified yeast to produce key pharmaceutical ingredients. The market fermented with excitement, leading to a cascade of investments in ALNY as people hopped on the idea of beer-fueled biotech breakthroughs. This created a brew-tiful synergy between the brewing industry and pharmaceuticals, highlighting the yeast potential for stock price elevation. The hopportunity for growth bubbled up, leaving investors feeling ale-ive and raising a pint to the unexpected link between breweries and biopharmaceuticals.. Keep the description simple.
ChatGPT: Imagine a bustling brewery with stacks of barrels filled with hops and barley. As the brewers work diligently, the stock ticker for Alnylam Pharmaceuticals' (ALNY) prominently displayed on a board nearby shows a steady climb in price. Investors are raising their glasses in celebration, recognizing the potential for genetically modified yeast to revolutionize pharmaceutical production. The air is filled with excitement as the brewery and biopharmaceutical worlds merge, creating a buzz of opportunity and growth.

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 funny image macro ] and depicting this scene: Imagine a bustling brewery with stacks of barrels filled with hops and barley. As the brewers work diligently, the stock ticker for Alnylam Pharmaceuticals' (ALNY) prominently displayed on a board nearby shows a steady climb in price. Investors are raising their glasses in celebration, recognizing the potential for genetically modified yeast to revolutionize pharmaceutical production. The air is filled with excitement as the brewery and biopharmaceutical worlds merge, creating a buzz of opportunity and growth. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: Generate an image of a brewery with stacks of barrels filled with hops and barley. In the center, display a stock ticker for Alnylam Pharmaceuticals' (ALNY) prominently featured on a board, showing a steady climb in price. Show brewers working diligently amidst the barrels, with investors raising their glasses in celebration. The scene should emanate excitement and possibility as the brewery and biopharmaceutical industries merge, creating a buzz of opportunity and growth.

*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 Alnylam Pharmaceuticals' stock price (ALNY) to increase.

AI academic paper

(Because p < 0.01)
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

The Journal of Intoxication Studies

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 goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

Make the title seem 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.8841796 and p < 0.01 for 2005 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]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

Here is the title and abstract of the paper:
[[TITLE]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
[[INTRODUCTION]]

Picture this: a bunch of economists walk into a bar full of stockbrokers, and the only thing they can agree on is the need for a good pint of beer. Little did they know, this seemingly casual decision may have a frothy impact on their stock portfolios - and here we are, unraveling the sudsy truth. As we embark on this hoppy journey of financial analysis, we aim to explore the unexpected correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY).

It's no secret that the worlds of finance and craft brewing have been brewing up quite the storm in recent years. With a rising tide of craft breweries and a fervent investment atmosphere, it's time to suds out whether there's more to this relationship than meets the eye. So, grab yourself a cold one and let's dive into the enticing world where hops meet stock options.

Now, before we get too hoppy about our findings, we must acknowledge the seriousness of financial research and the complexities of market dynamics. However, that doesn't mean we can't mix in a dash of humor and a pint of unexpected revelations along the way. After all, what's the fun in research if you can't crack a few ale-related puns?

As we unravel the intertwining fortunes of the brewing industry and pharmaceutical stocks, let's not forget the wise words of Benjamin Franklin: "Beer is proof that God loves us and wants us to be happy." Well, Mr. Franklin, we're about to see if that happiness extends to stock prices too. Now, let's tap into the heart of our findings and see if there's more to this barley believable connection than meets the pint.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). 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 some movies that you watched that are tangentially related to the topic.

Here is the title and abstract of the paper:
[[TITLE]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
Picture this: a bunch of economists walk into a bar full of stockbrokers, and the only thing they can agree on is the need for a good pint of beer. Little did they know, this seemingly casual decision may have a frothy impact on their stock portfolios - and here we are, unraveling the sudsy truth. As we embark on this hoppy journey of financial analysis, we aim to explore the unexpected correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY).
It's no secret that the worlds of finance and craft brewing have been brewing up quite the storm in recent years. With a rising tide of craft breweries and a fervent investment atmosphere, it's time to suds out whether there's more to this relationship than meets the eye. So, grab yourself a cold one and let's dive into the enticing world where hops meet stock options.
Now, before we get too hoppy about our findings, we must acknowledge the seriousness of financial research and the complexities of market dynamics. However, that doesn't mean we can't mix in a dash of humor and a pint of unexpected revelations along the way. After all, what's the fun in research if you can't crack a few ale-related puns?
As we unravel the intertwining fortunes of the brewing industry and pharmaceutical stocks, let's not forget the wise words of Benjamin Franklin: "Beer is proof that God loves us and wants us to be happy." Well, Mr. Franklin, we're about to see if that happiness extends to stock prices too. Now, let's tap into the heart of our findings and see if there's more to this barley believable connection than meets the pint.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The literature surrounding the relationship between industries as diverse as craft brewing and pharmaceuticals can be likened to the experience of tasting a complex beer - initially intriguing, and potentially revealing unexpected flavors. In "Smith et al.'s Brews and Bulls: Uncovering the Uncharted Territory of Brewery Stocks," the authors find lorem and ipsum. Similarly, Doe and Jones' study "Hoppy Returns: Exploring the Financial Impact of Craft Breweries" delves into the financial implications of the craft beer revolution, with a particular focus on lorem and ipsum.

Now that we've covered the serious academic studies, let's throw in a dash of unpredictability by integrating some non-fiction books that could potentially shed light on this peculiar relationship. Tom Standage's "A History of the World in 6 Glasses" offers a thematic exploration of the social, cultural, and economic impact of beverages, including beer, on human civilization. In a tangentially related vein, John Holl's "The American Craft Beer Cookbook" provides a flavorful journey through the world of craft brewing, offering up recipes and anecdotes that might just mirror the complexities of financial markets.

Continuing in this off-kilter direction, let's take a ludicrous leap into the realm of fiction with V.E. Schwab's "A Darker Shade of Magic." While not explicitly tied to the financial world, the interdimensional adventures depicted in this novel might just parallel the multidimensional nature of our research. On a more grounded note, Joshua Schimel's "Writing Science: How to Write Papers That Get Cited and Proposals That Get Funded" provides invaluable tips for crafting engaging and impactful research papers - a skill much needed in the interplay between academia and the delightful unpredictability of financial oddities.

But wait, we're not done meandering just yet! Let's veer into the world of movies, where the tangential connections to our research take on a cinematic flair. The Financial Disasterpiece Theater's "Brews, Bulls, and the Big Short" masterfully intertwines the world of craft beer with the financial eccentricities depicted in "The Big Short," offering a visually stimulating and ale-borate analogy to our research pursuit. And if we're going for a more literal interpretation, perhaps Judd Apatow's "The 40-Year-Old Virgin" might slyly nudge at the notion of patiently waiting for a stock market breakthrough with the same determination as aging a fine brew.

As we tip our hats to the eclectic tapestry of resources that have helped shape our understanding of this intertwined web of industries, it's clear that the path to uncovering the unexpected connections between breweries and stock prices is nothing short of a wild ride. So, let's hop to it and better acquaint ourselves with the frothy undercurrents of financial and brewing dynamics!


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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 2005 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]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

[[INTRODUCTION]]
Picture this: a bunch of economists walk into a bar full of stockbrokers, and the only thing they can agree on is the need for a good pint of beer. Little did they know, this seemingly casual decision may have a frothy impact on their stock portfolios - and here we are, unraveling the sudsy truth. As we embark on this hoppy journey of financial analysis, we aim to explore the unexpected correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY).
It's no secret that the worlds of finance and craft brewing have been brewing up quite the storm in recent years. With a rising tide of craft breweries and a fervent investment atmosphere, it's time to suds out whether there's more to this relationship than meets the eye. So, grab yourself a cold one and let's dive into the enticing world where hops meet stock options.
Now, before we get too hoppy about our findings, we must acknowledge the seriousness of financial research and the complexities of market dynamics. However, that doesn't mean we can't mix in a dash of humor and a pint of unexpected revelations along the way. After all, what's the fun in research if you can't crack a few ale-related puns?
As we unravel the intertwining fortunes of the brewing industry and pharmaceutical stocks, let's not forget the wise words of Benjamin Franklin: "Beer is proof that God loves us and wants us to be happy." Well, Mr. Franklin, we're about to see if that happiness extends to stock prices too. Now, let's tap into the heart of our findings and see if there's more to this barley believable connection than meets the pint.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

To navigate the foamy waters of our research, we employed a concoction of quantitative and statistical methods that could make even the most seasoned brewmaster raise an eyebrow. Our initial step involved harnessing the power of the internet - not just for watching kitten videos, but for sourcing data from reputable organizations. We primarily relied on data from the Brewers Association, the go-to source for all things beer-related, and LSEG Analytics (Refinitiv) because, let's be honest, what's more reliable than financial data from a company with a name that sounds like it belongs on a craft beer label?

We must admit, filtering through years of data from 2005 to 2022 was akin to searching for the perfect microbrew in a sea of mass-produced lagers (not that there's anything wrong with them, but you get the idea). Once we had amassed our brewtiful dataset, we eagerly donned our data analysis hats and dove headfirst into the analytical cauldron like we were trying to perfect a complex blend of hops and malt.

Now, to uncover the hoppy tryst between breweries and stock prices, we employed an assortment of statistical techniques, including regression analysis and time series modeling. We wanted to ensure our approach wasn't just hopped up on caffeine but had enough stoutness to stand up to the scrutinizing gaze of the academic community. Just like a finely crafted brew, we wanted our analysis to have depth, complexity, and, most importantly, a delightful finish.

To add a dash of novelty (and maybe a sprinkle of whimsy), we also ventured into the realm of sentiment analysis. We scraped online reviews, social media chatter, and perhaps a few dad jokes about beer and stocks from across the digital landscape. Because, let's face it, every research paper could do with a side of levity—after all, who doesn't love a bit of wit with their statistical analysis?

In the spirit of full disclosure, we must confess that our methodological journey through this boozy labyrinth included a few detours and wrong turns. Sometimes we felt like we were stumbling through a maze of beer bottles, trying to find the one with the perfect blend of hops and barley. But the setbacks only fueled our determination to uncork the truth behind the interplay of breweries and stock prices.

And just like trying to pour the perfect pint, our methodology was a blend of precision, patience, and a touch of artistry. We aimed to capture the effervescent essence of the brewing world and, in doing so, shed light on the unexpected connections it shares with the realm of high finance.

As we raise our metaphorical glasses to the methodology that steered our research, let's remember that just like a well-crafted beer, this study is a labor of love, dedication, and an unyielding thirst for knowledge. Cheers to the methods that helped us ferment our findings, and may they stand the test of time like a fine vintage of ale.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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 2005 to 2022, you found a correlation 0.8841796, r-squared of 0.7817736, 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]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
Picture this: a bunch of economists walk into a bar full of stockbrokers, and the only thing they can agree on is the need for a good pint of beer. Little did they know, this seemingly casual decision may have a frothy impact on their stock portfolios - and here we are, unraveling the sudsy truth. As we embark on this hoppy journey of financial analysis, we aim to explore the unexpected correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY).
It's no secret that the worlds of finance and craft brewing have been brewing up quite the storm in recent years. With a rising tide of craft breweries and a fervent investment atmosphere, it's time to suds out whether there's more to this relationship than meets the eye. So, grab yourself a cold one and let's dive into the enticing world where hops meet stock options.
Now, before we get too hoppy about our findings, we must acknowledge the seriousness of financial research and the complexities of market dynamics. However, that doesn't mean we can't mix in a dash of humor and a pint of unexpected revelations along the way. After all, what's the fun in research if you can't crack a few ale-related puns?
As we unravel the intertwining fortunes of the brewing industry and pharmaceutical stocks, let's not forget the wise words of Benjamin Franklin: "Beer is proof that God loves us and wants us to be happy." Well, Mr. Franklin, we're about to see if that happiness extends to stock prices too. Now, let's tap into the heart of our findings and see if there's more to this barley believable connection than meets the pint.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The results of our investigation revealed a robust and statistically significant correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). From 2005 to 2022, we found a correlation coefficient of 0.8841796. That's a p-value so low, even a beer mug could lift it!

The r-squared value of 0.7817736 indicates that approximately 78.18% of the variation in ALNY stock price can be explained by the number of breweries. It's as if the breweries and the stock price are toasting to their close relationship.

Our findings are visually captured in Fig. 1, where the scatterplot showcases the strong positive correlation between the number of breweries and ALNY stock price. It's like a perfectly poured pint – you can't help but appreciate the beauty of the relationship.

In summary, our results provide compelling evidence of the connection between the brewing industry and pharmaceutical stocks. However, we caution investors not to make hasty decisions based solely on this correlation. After all, as any good brewer would tell you, it takes time and patience to craft something truly valuable.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

[[LITERATURE REVIEW]]
The literature surrounding the relationship between industries as diverse as craft brewing and pharmaceuticals can be likened to the experience of tasting a complex beer - initially intriguing, and potentially revealing unexpected flavors. In "Smith et al.'s Brews and Bulls: Uncovering the Uncharted Territory of Brewery Stocks," the authors find lorem and ipsum. Similarly, Doe and Jones' study "Hoppy Returns: Exploring the Financial Impact of Craft Breweries" delves into the financial implications of the craft beer revolution, with a particular focus on lorem and ipsum.
Now that we've covered the serious academic studies, let's throw in a dash of unpredictability by integrating some non-fiction books that could potentially shed light on this peculiar relationship. Tom Standage's "A History of the World in 6 Glasses" offers a thematic exploration of the social, cultural, and economic impact of beverages, including beer, on human civilization. In a tangentially related vein, John Holl's "The American Craft Beer Cookbook" provides a flavorful journey through the world of craft brewing, offering up recipes and anecdotes that might just mirror the complexities of financial markets.
Continuing in this off-kilter direction, let's take a ludicrous leap into the realm of fiction with V.E. Schwab's "A Darker Shade of Magic." While not explicitly tied to the financial world, the interdimensional adventures depicted in this novel might just parallel the multidimensional nature of our research. On a more grounded note, Joshua Schimel's "Writing Science: How to Write Papers That Get Cited and Proposals That Get Funded" provides invaluable tips for crafting engaging and impactful research papers - a skill much needed in the interplay between academia and the delightful unpredictability of financial oddities.
But wait, we're not done meandering just yet! Let's veer into the world of movies, where the tangential connections to our research take on a cinematic flair. The Financial Disasterpiece Theater's "Brews, Bulls, and the Big Short" masterfully intertwines the world of craft beer with the financial eccentricities depicted in "The Big Short," offering a visually stimulating and ale-borate analogy to our research pursuit. And if we're going for a more literal interpretation, perhaps Judd Apatow's "The 40-Year-Old Virgin" might slyly nudge at the notion of patiently waiting for a stock market breakthrough with the same determination as aging a fine brew.
As we tip our hats to the eclectic tapestry of resources that have helped shape our understanding of this intertwined web of industries, it's clear that the path to uncovering the unexpected connections between breweries and stock prices is nothing short of a wild ride. So, let's hop to it and better acquaint ourselves with the frothy undercurrents of financial and brewing dynamics!

[[RESULTS]]
The results of our investigation revealed a robust and statistically significant correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). From 2005 to 2022, we found a correlation coefficient of 0.8841796. That's a p-value so low, even a beer mug could lift it!
The r-squared value of 0.7817736 indicates that approximately 78.18% of the variation in ALNY stock price can be explained by the number of breweries. It's as if the breweries and the stock price are toasting to their close relationship.
Our findings are visually captured in Fig. 1, where the scatterplot showcases the strong positive correlation between the number of breweries and ALNY stock price. It's like a perfectly poured pint – you can't help but appreciate the beauty of the relationship.
In summary, our results provide compelling evidence of the connection between the brewing industry and pharmaceutical stocks. However, we caution investors not to make hasty decisions based solely on this correlation. After all, as any good brewer would tell you, it takes time and patience to craft something truly valuable.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

Our findings offer a refreshing perspective on the interconnected world of financial markets and seemingly unrelated industries, adding a newfound fizz to the understanding of stock price dynamics. The statistically significant correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY) provides a compelling glimpse into the unexpected connections that can emerge between diverse sectors. It's as if the craft beer industry and pharmaceutical stocks have been secretly clinking glasses behind the scenes, whispering about the impact they have on each other.

This study's results are in line with previous research by Smith et al. and Doe and Jones, reaffirming the supposition that the craft beer revolution could indeed have palpable financial implications. It's like the perfect blend of hops and financial acumen coming together, creating a harmonious symphony of data that's enough to make even the most stoic researcher crack a grin.

Our statistical analysis, with a correlation coefficient of 0.8841796 and a p-value so low, it would be mistaken for a spilled beer, reinforces the notion that the number of breweries holds a brew-tal influence on the movement of ALNY stock. It's as if the stock price is taking a page out of a brewer's book, fermenting and bubbling with excitement in response to the activity in the brewing industry.

The r-squared value of 0.7817736 further solidifies the robustness of our findings, indicating that approximately 78.18% of the variation in ALNY stock price can be explained by the number of breweries. It's like the breweries and the stock price are engaging in a lively dance, each step closely tied to the other in a synchronized display of market dynamics.

These results are further mirrored in the scatterplot (Fig. 1), which visually captures the strong positive correlation between the number of breweries and ALNY stock price. It's as harmonious as a perfectly poured pint, with each data point swirling together in a delightful display of statistical elegance – a veritable masterpiece brewed from numbers and market intricacies.

In summary, our findings serve as a testament to the interconnectedness of industries and the captivating allure of unexpected correlations. However, just as in brewing, we must exercise patience and thoughtful consideration in our interpretation of these findings. As any seasoned brewmaster would caution, the true value lies in carefully crafting our insights over time, allowing the flavors of the market to develop into a robust and well-rounded understanding. So, as we embark on further exploration of such unconventional connections, let's raise a glass to the potential for greater insight and a good dad joke or two to keep the spirits high. Cheers!


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.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 Alnylam Pharmaceuticals' stock price (ALNY). You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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]]
Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price

[[ABSTRACT]]
When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.

We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?

In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

[[INTRDUCTION]]
Picture this: a bunch of economists walk into a bar full of stockbrokers, and the only thing they can agree on is the need for a good pint of beer. Little did they know, this seemingly casual decision may have a frothy impact on their stock portfolios - and here we are, unraveling the sudsy truth. As we embark on this hoppy journey of financial analysis, we aim to explore the unexpected correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY).
It's no secret that the worlds of finance and craft brewing have been brewing up quite the storm in recent years. With a rising tide of craft breweries and a fervent investment atmosphere, it's time to suds out whether there's more to this relationship than meets the eye. So, grab yourself a cold one and let's dive into the enticing world where hops meet stock options.
Now, before we get too hoppy about our findings, we must acknowledge the seriousness of financial research and the complexities of market dynamics. However, that doesn't mean we can't mix in a dash of humor and a pint of unexpected revelations along the way. After all, what's the fun in research if you can't crack a few ale-related puns?
As we unravel the intertwining fortunes of the brewing industry and pharmaceutical stocks, let's not forget the wise words of Benjamin Franklin: "Beer is proof that God loves us and wants us to be happy." Well, Mr. Franklin, we're about to see if that happiness extends to stock prices too. Now, let's tap into the heart of our findings and see if there's more to this barley believable connection than meets the pint.

[[RESULTS]]
The results of our investigation revealed a robust and statistically significant correlation between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). From 2005 to 2022, we found a correlation coefficient of 0.8841796. That's a p-value so low, even a beer mug could lift it!
The r-squared value of 0.7817736 indicates that approximately 78.18% of the variation in ALNY stock price can be explained by the number of breweries. It's as if the breweries and the stock price are toasting to their close relationship.
Our findings are visually captured in Fig. 1, where the scatterplot showcases the strong positive correlation between the number of breweries and ALNY stock price. It's like a perfectly poured pint – you can't help but appreciate the beauty of the relationship.
In summary, our results provide compelling evidence of the connection between the brewing industry and pharmaceutical stocks. However, we caution investors not to make hasty decisions based solely on this correlation. After all, as any good brewer would tell you, it takes time and patience to craft something truly valuable.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In conclusion, our research has uncorked a noteworthy relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). The statistically significant correlation coefficient of 0.8841796 suggests that when it comes to investing, it might just be better to think with your beer goggles on. Perhaps we should consider renaming it "Alnylager Pharmaceuticals" at this point!

Our findings raise a glass to the interconnectedness of seemingly disparate industries, proving that a love for craft beer can pour some serious profits into your financial portfolio. It's like the stock market is saying, "Hoppy days are here again!"

So, to all the investors out there, remember that diversifying your portfolio with a touch of brew-tiful enthusiasm could be the key to fermenting success. After all, as any good dad would say, "Why did the beer go to school? Because it wanted to be a little hoppier!"

In light of these findings, it's safe to say that no more research is needed in this area. 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 Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Intoxication Studies


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 Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price. Respond only with the name of a fictional organization.

ChatGPT:

The Society for Beverage Economics and Analysis


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 Pour Decisions: The Ale-Effect of Breweries on Alnylam Pharmaceuticals' Stock Price with an abstract of When it comes to the interconnectedness of industries, it's often said that "beer makes everything better" - but does it also boost stock prices? This study delves into the frothy world of brewing and the financial market, specifically examining the relationship between the number of breweries in the United States and the stock price of Alnylam Pharmaceuticals (ALNY). With the help of data from the Brewers Association and LSEG Analytics (Refinitiv), our research team embarked on an investigation that's sure to make your interest hop.
We discovered a statistically significant correlation coefficient of 0.8841796 and p < 0.01 when analyzing data from 2005 to 2022. That's right, the number of breweries appears to have a brew-tal impact on the movement of ALNY stock! This finding may brew some excitement among beer enthusiasts looking to diversify their portfolios - after all, who wouldn't want to tap into potential profits driven by the craft beer craze?
In conclusion, while it's important to approach financial research with a serious demeanor, it's equally crucial to raise a glass and appreciate the unexpected correlations that emerge. Our findings highlight the interconnectedness between seemingly unrelated industries and provide a refreshing perspective on the complex dynamics of the market. So, next time you're considering your investment choices, remember: a well-crafted brew may just be the yeast of your worries when it comes to financial success.

ChatGPT:

Alnylam Pharmaceuticals, stock price, breweries, United States, correlation, financial market, Brewers Association, LSEG Analytics, Refinitiv, craft beer, investment, interconnectedness, industry dynamics, stock market, portfolio diversification

*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

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

See what else correlates with Alnylam Pharmaceuticals' stock price (ALNY)

Correlation r = 0.8841796 (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.7817736 (Coefficient of determination)
This means 78.2% of the change in the one variable (i.e., Alnylam Pharmaceuticals' stock price (ALNY)) is predictable based on the change in the other (i.e., The number of Breweries in the United States) over the 18 years from 2005 through 2022.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 1.1E-6. 0.0000011253792018750116000000
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.88 in 0.00011% of random cases. Said differently, if you correlated 888,589 random variables You don't actually need 888 thousand 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 17 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 17 because we have two variables measured over a period of 18 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.71, 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.
200520062007200820092010201120122013201420152016201720182019202020212022
The number of Breweries in the United States (Number of breweries)161217411805189619332131252526703162401448475780676777228557909293849709
Alnylam Pharmaceuticals' stock price (ALNY) (Stock price)7.6713.3921.82924.7717.849.918.3318.9564.2597.9792.1838.15128.3271.3115.57130.69171.06




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([1612,1741,1805,1896,1933,2131,2525,2670,3162,4014,4847,5780,6767,7722,8557,9092,9384,9709,])
array_2 = np.array([7.67,13.39,21.8,29,24.77,17.84,9.91,8.33,18.95,64.25,97.97,92.18,38.15,128.32,71.3,115.57,130.69,171.06,])
array_1_name = "The number of Breweries in the United States"
array_2_name = "Alnylam Pharmaceuticals' stock price (ALNY)"

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

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



Reuseable content

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

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

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

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

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

Download images for these variables:


View another random correlation

How fun was this correlation?

Your rating skills are top-notch!


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

CC BY 4.0