about · email me · subscribe
Spurious correlation #5,898 · View random

A linear line chart with years as the X-axis and two variables on the Y-axis. The first variable is Annual US household spending on pork and the second variable is Lululemon's stock price (LULU).  The chart goes from 2008 to 2022, and the two variables track closely in value over that time. Small Image
Download png
, svg

AI explanation

As pork consumption rose, so did the demand for stretchy pants with forgiving waistbands, leading to higher profits for Lululemon. It's a classic case of bringing home the bacon and then needing pants with extra give!

Model: dalle-3
Prompt: Generate an image of a bustling neighborhood scene with a hyper-realistic representation of a family joyfully gathered around a dinner table, savoring a succulent pork roast. The surrounding environment should convey a sense of liveliness and prosperity, with people happily lining up outside a Lululemon store in the same neighborhood, eagerly purchasing stretchy pants. Both the increase in pork consumption and the demand for Lululemon reflect the thriving economy and rising stock price. Capture the harmonious coexistence of these two scenes to depict a visual correlation between rising pork spending and the success of Lululemon. 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: Annual US household spending on pork and Lululemon's stock price (LULU). 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: Celtic art Steampunk A scene from Skyrim Hyper-realistic Magic realism
ChatGPT: Hyper-realistic

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 Annual US household spending on pork and Lululemon's stock price (LULU), in the following situation: As pork consumption rose, so did the demand for stretchy pants with forgiving waistbands, leading to higher profits for Lululemon. It's a classic case of bringing home the bacon and then needing pants with extra give!. Keep the description simple.
ChatGPT: In a bustling neighborhood, a family is gathered around a dinner table enjoying a delicious pork roast as their annual household spending on pork increases. Meanwhile, in the same neighborhood, people are seen happily lining up outside a Lululemon store, eagerly purchasing their stretchy pants with forgiving waistbands, as the stock price for Lululemon (LULU) rises. The combination of these scenes visually represents the rise in pork consumption and the demand for Lululemon's products, resulting in higher profits for the company.

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: [ Hyper-realistic ] and depicting this scene: In a bustling neighborhood, a family is gathered around a dinner table enjoying a delicious pork roast as their annual household spending on pork increases. Meanwhile, in the same neighborhood, people are seen happily lining up outside a Lululemon store, eagerly purchasing their stretchy pants with forgiving waistbands, as the stock price for Lululemon (LULU) rises. The combination of these scenes visually represents the rise in pork consumption and the demand for Lululemon's products, resulting in higher profits for the company. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: Generate an image of a bustling neighborhood scene with a hyper-realistic representation of a family joyfully gathered around a dinner table, savoring a succulent pork roast. The surrounding environment should convey a sense of liveliness and prosperity, with people happily lining up outside a Lululemon store in the same neighborhood, eagerly purchasing stretchy pants. Both the increase in pork consumption and the demand for Lululemon reflect the thriving economy and rising stock price. Capture the harmonious coexistence of these two scenes to depict a visual correlation between rising pork spending and the success of Lululemon.

*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 Annual US household spending on pork caused Lululemon's stock price (LULU) to increase.

AI academic paper

(Because p < 0.01)
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

The International Journal of Porcine Economics

Jan 2024

Reminder: This paper is AI-generated. Not real!
Quick note: This sequence is long and repetitive. That's how the prompt engineering works for this one. I manage the output in Python to format it into this PDF.




Model: gpt-3.5-turbo-1106
System prompt: You are a 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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns.

Include a pun in the title.

Your research team used data from Bureau of Labor Statistics and LSEG Analytics (Refinitiv) to assess this nagging question. You found a correlation coefficient of 0.9678501 and p < 0.01 for 2008 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]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Here is the title and abstract of the paper:
[[TITLE]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:

[[INTRODUCTION]]

Imagine a world where the crispy sizzle of bacon and the soothing stretch of yoga pants intersect - where the savory scent of pork chops and the sound of stock prices reaching new highs coalesce. Yes, dear readers, welcome to the tantalizing realm of the intersection between annual US household spending on pork and the stock price of Lululemon (LULU).

As researchers, we often find ourselves delving into complex correlations, untangling webs of statistical significance, and struggling to make sense of the mysteries that lie within data. Yet, in all our scholarly pursuits, few can rival the porking lot of hidden connections we stumbled upon in this study.

In the words of George Bernard Shaw, "We are made wise not by the recollection of our past, but by the responsibility for our future bacon-eating habits." Okay, we may have indulged in some creative paraphrasing there, but the sentiment rings true - the choices we make in the grocery aisle may hold the key to predicting the ebb and flow of a clothing retailer's stock prices. The pork-laden puzzle that we set out to crack may seem like a quirky curiosity, but the statistical significance we unearthed left us wondering: is there more meat to this connection than meets the eye?

Thus, armed with data, a healthy dose of skepticism, and an insatiable appetite for unraveling eccentric correlations, we embarked on a porcine journey of discovery. The goal? To peel back the layers of pork spending and LULU's stock performance, and to uncover the sizzling story that lies within.

The following pages chronicle our adventure through the labyrinthine world of statistical analyses, where we left no piggy bank unturned, no piece of bacon unscrutinized, and no yoga pants un-stretched. So, buckle up and prepare for a pork-tacular ride through the wild, woolly, and perhaps surprisingly prescient world of pork spending and stock prices. Let's pig out on these findings, shall we?


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns.

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

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

Start by naming serious-sounding studies by authors like Smith, Doe, and Jones - but then quickly devolve. Name some real non-fiction books that would be related to the topic. Then name some real fiction books that sound like they could be related. Perhaps you also got inspiration from some board games that are vaugely related.

Here is the title and abstract of the paper:
[[TITLE]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
Imagine a world where the crispy sizzle of bacon and the soothing stretch of yoga pants intersect - where the savory scent of pork chops and the sound of stock prices reaching new highs coalesce. Yes, dear readers, welcome to the tantalizing realm of the intersection between annual US household spending on pork and the stock price of Lululemon (LULU).
As researchers, we often find ourselves delving into complex correlations, untangling webs of statistical significance, and struggling to make sense of the mysteries that lie within data. Yet, in all our scholarly pursuits, few can rival the porking lot of hidden connections we stumbled upon in this study.
In the words of George Bernard Shaw, "We are made wise not by the recollection of our past, but by the responsibility for our future bacon-eating habits." Okay, we may have indulged in some creative paraphrasing there, but the sentiment rings true - the choices we make in the grocery aisle may hold the key to predicting the ebb and flow of a clothing retailer's stock prices. The pork-laden puzzle that we set out to crack may seem like a quirky curiosity, but the statistical significance we unearthed left us wondering: is there more meat to this connection than meets the eye?
Thus, armed with data, a healthy dose of skepticism, and an insatiable appetite for unraveling eccentric correlations, we embarked on a porcine journey of discovery. The goal? To peel back the layers of pork spending and LULU's stock performance, and to uncover the sizzling story that lies within.
The following pages chronicle our adventure through the labyrinthine world of statistical analyses, where we left no piggy bank unturned, no piece of bacon unscrutinized, and no yoga pants un-stretched. So, buckle up and prepare for a pork-tacular ride through the wild, woolly, and perhaps surprisingly prescient world of pork spending and stock prices. Let's pig out on these findings, shall we?

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The swine-infused symphony of annual US household spending on pork and the stock price of Lululemon (LULU) has intrigued researchers for decades. The quest to untangle the enigmatic link between these seemingly unrelated phenomena has led scholars down a meandering path of statistical analyses and economic speculation. Smith et al. (2015) laid the groundwork for this investigation, highlighting the potential impact of consumer food expenditures on retail industry performance. In a similar vein, Doe's seminal work (2018) delved into the intricate dance between consumer habits and stock market trends, hinting at the gastronomic influences that may sway investor sentiment.

As the academic community grappled with the perplexing puzzle of pork spending and LULU's stock price, Jones (2020) introduced a thought-provoking thesis on the psychological underpinnings of consumer behavior. However, just when the field was poised for a breakthrough, the literature took an unexpected turn. Drawing inspiration from "Pork: A Global History" and "Yoga for Pigs: Finding Zen in the Sty," curious parallels began to emerge between the culinary world and the realm of retail investing.

Venturing into the realm of speculative fiction, "Bacon in the Rye" and "The Lululemon Conspiracy" added an air of whimsy to the scholarly discourse, intertwining the exploits of bacon enthusiasts and yoga aficionados with the intricacies of stock market machinations. Meanwhile, the cryptically named board games "Pigopoly" and "Stocks & Stretch Pants" hinted at the playful possibilities awaiting those bold enough to peer into the porcine-adjacent periphery of economic inquiry.

In a lovably ludicrous turn of events, these seemingly disparate threads converged, igniting the spark of curiosity that led to the present study's pioneering analysis. As we delve deeper into the meaty machinations of household pork spending and LULU's stock price, it becomes clear that the interplay between consumer consumables and retail investments may hold more succulent secrets than previously imagined. With a wink to the whimsical and a nod to the nonsensical, this paper seeks to uncloak the enigmatic bond between bacon bits and stock market hits. Let's ham it up and pig out on the revelatory tale that unfolds.


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from Bureau of Labor Statistics and LSEG Analytics (Refinitiv) . You used data from 2008 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]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

[[INTRODUCTION]]
Imagine a world where the crispy sizzle of bacon and the soothing stretch of yoga pants intersect - where the savory scent of pork chops and the sound of stock prices reaching new highs coalesce. Yes, dear readers, welcome to the tantalizing realm of the intersection between annual US household spending on pork and the stock price of Lululemon (LULU).
As researchers, we often find ourselves delving into complex correlations, untangling webs of statistical significance, and struggling to make sense of the mysteries that lie within data. Yet, in all our scholarly pursuits, few can rival the porking lot of hidden connections we stumbled upon in this study.
In the words of George Bernard Shaw, "We are made wise not by the recollection of our past, but by the responsibility for our future bacon-eating habits." Okay, we may have indulged in some creative paraphrasing there, but the sentiment rings true - the choices we make in the grocery aisle may hold the key to predicting the ebb and flow of a clothing retailer's stock prices. The pork-laden puzzle that we set out to crack may seem like a quirky curiosity, but the statistical significance we unearthed left us wondering: is there more meat to this connection than meets the eye?
Thus, armed with data, a healthy dose of skepticism, and an insatiable appetite for unraveling eccentric correlations, we embarked on a porcine journey of discovery. The goal? To peel back the layers of pork spending and LULU's stock performance, and to uncover the sizzling story that lies within.
The following pages chronicle our adventure through the labyrinthine world of statistical analyses, where we left no piggy bank unturned, no piece of bacon unscrutinized, and no yoga pants un-stretched. So, buckle up and prepare for a pork-tacular ride through the wild, woolly, and perhaps surprisingly prescient world of pork spending and stock prices. Let's pig out on these findings, shall we?

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

For this study, we deployed a multi-faceted methodology that incorporated elements of statistical analysis, econometric modeling, and some good old-fashioned porcine intuition. Our first step involved collecting data from the Bureau of Labor Statistics to meticulously catalogue and crunch the numbers on annual US household spending on pork from 2008 to 2022. Now, this wasn't just a matter of bringing home the bacon – we had to account for all types of pork products, from the humble pork chop to the snazzy pancetta, and everything in between. We urged our data collection team to really ham it up and leave no pork belly unscanned, vowing to shun any data that was anything less than squeal-y clean.

Next, we turned to LSEG Analytics (Refinitiv) to obtain the daily stock prices of LULU over the same period. Our dedicated team of number crunchers spared no effort in ensuring that every zig and zag of LULU's stock price was captured, leaving no yoga pose unexamined and no downward dog unmarked in our dataset. It was a labor of love, but we knew that our endeavor to pork around with the stock market demanded nothing less than inch-perfect precision.

With our data in hand, we set sail for the choppy, uncharted waters of statistical analysis. Armed with regression models, correlation matrices, and an excess of coffee, we set out to uncover the hidden threads that linked the pork-spending habits of US households to the undulating waves of LULU's stock price. We had to slice through the fat, trim the outliers, and ensure that our conclusions were robust enough to withstand the most skeptical scrutiny.

Our statistical odyssey led us to the discovery of a correlation coefficient of 0.9678501, with a p-value that screamed "statistically significant" faster than a bacon strip bursts into sizzling symphonies on a hot skillet.
This finding lent weight to our hypothesis that there exists a notable bond between pork spending and LULU's stock performance, sending ripples through the normally sedate waters of economic research.

To ensure the reliability of our results, we also implemented various sensitivity analyses, stress-testing our models against a battery of scenarios that ranged from the mundane to the outright ridiculous. We dared to ask unconventional questions: What if bacon prices skyrocketed? What if yoga pants suddenly became unfashionable? What if pigs learned how to invest in the stock market? By subjecting our findings to these extreme hypotheticals, we not only showcased the robustness of our results but also indulged in a bit of porcine daydreaming along the way.

In summary, our methodology was a carefully curated blend of data wrangling, statistical acrobatics, and a touch of whimsy, all in the pursuit of uncovering the hidden ties that bind pork spending and LULU's stock price. We're proud to say that our methodology didn't just bring home the bacon – it served up a true feast of insight, proving that when it comes to research, a little porcine playfulness can go a long way.


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from Bureau of Labor Statistics and LSEG Analytics (Refinitiv) .

For the time period 2008 to 2022, you found a correlation 0.9678501, r-squared of 0.9367339, 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]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
Imagine a world where the crispy sizzle of bacon and the soothing stretch of yoga pants intersect - where the savory scent of pork chops and the sound of stock prices reaching new highs coalesce. Yes, dear readers, welcome to the tantalizing realm of the intersection between annual US household spending on pork and the stock price of Lululemon (LULU).
As researchers, we often find ourselves delving into complex correlations, untangling webs of statistical significance, and struggling to make sense of the mysteries that lie within data. Yet, in all our scholarly pursuits, few can rival the porking lot of hidden connections we stumbled upon in this study.
In the words of George Bernard Shaw, "We are made wise not by the recollection of our past, but by the responsibility for our future bacon-eating habits." Okay, we may have indulged in some creative paraphrasing there, but the sentiment rings true - the choices we make in the grocery aisle may hold the key to predicting the ebb and flow of a clothing retailer's stock prices. The pork-laden puzzle that we set out to crack may seem like a quirky curiosity, but the statistical significance we unearthed left us wondering: is there more meat to this connection than meets the eye?
Thus, armed with data, a healthy dose of skepticism, and an insatiable appetite for unraveling eccentric correlations, we embarked on a porcine journey of discovery. The goal? To peel back the layers of pork spending and LULU's stock performance, and to uncover the sizzling story that lies within.
The following pages chronicle our adventure through the labyrinthine world of statistical analyses, where we left no piggy bank unturned, no piece of bacon unscrutinized, and no yoga pants un-stretched. So, buckle up and prepare for a pork-tacular ride through the wild, woolly, and perhaps surprisingly prescient world of pork spending and stock prices. Let's pig out on these findings, shall we?

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

Our intrepid foray into the world of swine and stocks has yielded some truly bacon-tastic results! After analyzing the data from 2008 to 2022, we found a staggering correlation coefficient of 0.9678501 between annual US household spending on pork and Lululemon's stock price (LULU). This remarkably high correlation coefficient suggests a strong positive relationship between the two variables.

The r-squared value of 0.9367339 indicates that a whopping 93.67% of the variance in LULU's stock price can be explained by changes in annual pork spending. It seems that the world of yoga pants and pork chops is intricately woven together in a way that few could have imagined. This porktastic relationship is certainly nothing to snort at!

With a p-value less than 0.01, our findings are statistically significant, leaving us with little doubt that there is some serious meat to this connection. In other words, this correlation is no hogwash – it's the real, sizzling deal!

The scatterplot presented in Figure 1 visually captures the strong positive correlation between annual US household spending on pork and LULU's stock price. The data points are tightly clustered around a clear upward trend, mirroring the burgeoning bond between pork-loving households and Lululemon enthusiasts. It's a sight to behold, and it leaves us with no choice but to exclaim, "When pigs fly, Lululemon's stock price soars!"

In conclusion, our results paint a vivid picture of the unexpected and undeniably ham-azing relationship between pork spending and Lululemon's stock performance. This paper serves as a beacon of hope for all those who dare to dream of a world where swine and stock prices unite in a stunning symphony of statistical significance. So, let's raise a toast – or should we say a pork chop? – to the porcine predicament that has left us oinking with excitement over these revelatory findings.

The link between annual US household spending on pork and LULU's stock price is no longer a mere idle curiosity; it's a bona fide statistical phenomenon. It seems that in the world of finance, as in life, where there’s a swill, there's a way.


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Limit your response to 500 tokens.

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

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

[[TITLE]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

[[LITERATURE REVIEW]]
The swine-infused symphony of annual US household spending on pork and the stock price of Lululemon (LULU) has intrigued researchers for decades. The quest to untangle the enigmatic link between these seemingly unrelated phenomena has led scholars down a meandering path of statistical analyses and economic speculation. Smith et al. (2015) laid the groundwork for this investigation, highlighting the potential impact of consumer food expenditures on retail industry performance. In a similar vein, Doe's seminal work (2018) delved into the intricate dance between consumer habits and stock market trends, hinting at the gastronomic influences that may sway investor sentiment.
As the academic community grappled with the perplexing puzzle of pork spending and LULU's stock price, Jones (2020) introduced a thought-provoking thesis on the psychological underpinnings of consumer behavior. However, just when the field was poised for a breakthrough, the literature took an unexpected turn. Drawing inspiration from "Pork: A Global History" and "Yoga for Pigs: Finding Zen in the Sty," curious parallels began to emerge between the culinary world and the realm of retail investing.
Venturing into the realm of speculative fiction, "Bacon in the Rye" and "The Lululemon Conspiracy" added an air of whimsy to the scholarly discourse, intertwining the exploits of bacon enthusiasts and yoga aficionados with the intricacies of stock market machinations. Meanwhile, the cryptically named board games "Pigopoly" and "Stocks & Stretch Pants" hinted at the playful possibilities awaiting those bold enough to peer into the porcine-adjacent periphery of economic inquiry.
In a lovably ludicrous turn of events, these seemingly disparate threads converged, igniting the spark of curiosity that led to the present study's pioneering analysis. As we delve deeper into the meaty machinations of household pork spending and LULU's stock price, it becomes clear that the interplay between consumer consumables and retail investments may hold more succulent secrets than previously imagined. With a wink to the whimsical and a nod to the nonsensical, this paper seeks to uncloak the enigmatic bond between bacon bits and stock market hits. Let's ham it up and pig out on the revelatory tale that unfolds.

[[RESULTS]]
Our intrepid foray into the world of swine and stocks has yielded some truly bacon-tastic results! After analyzing the data from 2008 to 2022, we found a staggering correlation coefficient of 0.9678501 between annual US household spending on pork and Lululemon's stock price (LULU). This remarkably high correlation coefficient suggests a strong positive relationship between the two variables.
The r-squared value of 0.9367339 indicates that a whopping 93.67% of the variance in LULU's stock price can be explained by changes in annual pork spending. It seems that the world of yoga pants and pork chops is intricately woven together in a way that few could have imagined. This porktastic relationship is certainly nothing to snort at!
With a p-value less than 0.01, our findings are statistically significant, leaving us with little doubt that there is some serious meat to this connection. In other words, this correlation is no hogwash – it's the real, sizzling deal!
The scatterplot presented in Figure 1 visually captures the strong positive correlation between annual US household spending on pork and LULU's stock price. The data points are tightly clustered around a clear upward trend, mirroring the burgeoning bond between pork-loving households and Lululemon enthusiasts. It's a sight to behold, and it leaves us with no choice but to exclaim, "When pigs fly, Lululemon's stock price soars!"
In conclusion, our results paint a vivid picture of the unexpected and undeniably ham-azing relationship between pork spending and Lululemon's stock performance. This paper serves as a beacon of hope for all those who dare to dream of a world where swine and stock prices unite in a stunning symphony of statistical significance. So, let's raise a toast – or should we say a pork chop? – to the porcine predicament that has left us oinking with excitement over these revelatory findings.
The link between annual US household spending on pork and LULU's stock price is no longer a mere idle curiosity; it's a bona fide statistical phenomenon. It seems that in the world of finance, as in life, where there’s a swill, there's a way.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

Our results have brought home the bacon, so to speak, by providing robust support for prior research that hinted at the tantalizing tapestry of ties between pork spending and Lululemon's stock performance. Smith et al. (2015) set the stage for our porcine pursuits, and our findings have piggybacked on their foundational work by confirming the significant impact of consumer food expenditures on retail industry performance.

Doe's (2018) exploration into the intricate dance between consumer habits and stock market trends has also received a pig-endorsement from our study. Our results not only corroborate but also amplify the gastronomic influences that appear to sway investor sentiment, bringing to light the meaty implications of consumer consumables on the stock market.

As for Jones' (2020) psychological underpinnings of consumer behavior, we've unearthed evidence suggesting that the connection between household pork spending and Lululemon's stock price transcends mere economic conjecture, delving into the psychological realm of consumer preferences and market dynamics. It's safe to say that the bacon bits of wisdom from the literature have not been wasted; in fact, they've proven to be a sizzling beacon guiding our porcine path.

In a lovably ludicrous turn of events, our study has saluted the whimsy and nonsensicality that pervaded prior literature, affirming that playful ponderings have indeed led to serious statistical revelations. We've proven that "Pigopoly" and "Stocks & Stretch Pants" were not mere flights of fancy but rather uncanny predictors of the bacon-infused bonds between pork spending and Lululemon's stock price. It turns out that these seemingly disparate threads weren't just hogwash – they were key ingredients in unraveling the culinary and financial tapestry that binds these two seemingly unrelated worlds.

Our findings, represented in the unmistakably bacon-themed scatterplot, not only splice through the preconceived notions of statistical predictability but also lay bare the succulent secrets hidden within the undoubtedly ham-azing relationship between pork spending and Lululemon's stock performance. In doing so, we have not only confirmed the prior research's inklings but also smothered any remaining doubts with a hearty helping of statistical significance.

In essence, this discussion-wrapped pork loin of findings highlights the zesty pork-pacity of household spending influencing Lululemon's stock price. It seems that the stock market isn't the only thing that can experience boom cycles – it's the swill, and a way, of finance. So, let's raise our pork chops to this captivating confluence of consumer spending and stock prices and savor the succulence of statistical discovery.


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 Annual US household spending on pork and Lululemon's stock price (LULU). Make lots of jokes, goofy observations, and puns. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

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

Here are the title, abstract, introduction, and results sections.
[[TITLE]]
Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price

[[ABSTRACT]]
This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

[[INTRDUCTION]]
Imagine a world where the crispy sizzle of bacon and the soothing stretch of yoga pants intersect - where the savory scent of pork chops and the sound of stock prices reaching new highs coalesce. Yes, dear readers, welcome to the tantalizing realm of the intersection between annual US household spending on pork and the stock price of Lululemon (LULU).
As researchers, we often find ourselves delving into complex correlations, untangling webs of statistical significance, and struggling to make sense of the mysteries that lie within data. Yet, in all our scholarly pursuits, few can rival the porking lot of hidden connections we stumbled upon in this study.
In the words of George Bernard Shaw, "We are made wise not by the recollection of our past, but by the responsibility for our future bacon-eating habits." Okay, we may have indulged in some creative paraphrasing there, but the sentiment rings true - the choices we make in the grocery aisle may hold the key to predicting the ebb and flow of a clothing retailer's stock prices. The pork-laden puzzle that we set out to crack may seem like a quirky curiosity, but the statistical significance we unearthed left us wondering: is there more meat to this connection than meets the eye?
Thus, armed with data, a healthy dose of skepticism, and an insatiable appetite for unraveling eccentric correlations, we embarked on a porcine journey of discovery. The goal? To peel back the layers of pork spending and LULU's stock performance, and to uncover the sizzling story that lies within.
The following pages chronicle our adventure through the labyrinthine world of statistical analyses, where we left no piggy bank unturned, no piece of bacon unscrutinized, and no yoga pants un-stretched. So, buckle up and prepare for a pork-tacular ride through the wild, woolly, and perhaps surprisingly prescient world of pork spending and stock prices. Let's pig out on these findings, shall we?

[[RESULTS]]
Our intrepid foray into the world of swine and stocks has yielded some truly bacon-tastic results! After analyzing the data from 2008 to 2022, we found a staggering correlation coefficient of 0.9678501 between annual US household spending on pork and Lululemon's stock price (LULU). This remarkably high correlation coefficient suggests a strong positive relationship between the two variables.
The r-squared value of 0.9367339 indicates that a whopping 93.67% of the variance in LULU's stock price can be explained by changes in annual pork spending. It seems that the world of yoga pants and pork chops is intricately woven together in a way that few could have imagined. This porktastic relationship is certainly nothing to snort at!
With a p-value less than 0.01, our findings are statistically significant, leaving us with little doubt that there is some serious meat to this connection. In other words, this correlation is no hogwash – it's the real, sizzling deal!
The scatterplot presented in Figure 1 visually captures the strong positive correlation between annual US household spending on pork and LULU's stock price. The data points are tightly clustered around a clear upward trend, mirroring the burgeoning bond between pork-loving households and Lululemon enthusiasts. It's a sight to behold, and it leaves us with no choice but to exclaim, "When pigs fly, Lululemon's stock price soars!"
In conclusion, our results paint a vivid picture of the unexpected and undeniably ham-azing relationship between pork spending and Lululemon's stock performance. This paper serves as a beacon of hope for all those who dare to dream of a world where swine and stock prices unite in a stunning symphony of statistical significance. So, let's raise a toast – or should we say a pork chop? – to the porcine predicament that has left us oinking with excitement over these revelatory findings.
The link between annual US household spending on pork and LULU's stock price is no longer a mere idle curiosity; it's a bona fide statistical phenomenon. It seems that in the world of finance, as in life, where there’s a swill, there's a way.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In wrapping up our analysis of the curious correlation between annual US household spending on pork and Lululemon's stock price, it's clear that there's more to this pig tale than meets the eye. The statistically significant relationship we've uncovered is no porky pie – it's a pig's hog heaven of a discovery! Our findings suggest that when it comes to predicting Lululemon's stock performance, following the money trail may lead straight to the piggy bank.

It's no coincidence that as households indulge in pork products, Lululemon's stock price experiences an upward stretch worthy of the most limber yoga pants. The statistical bond between these two seemingly disparate variables is not just a statistical oddity; it's a bacon-wrapped revelation that has left us feeling like we've stumbled upon the hog's pot of gold.

So, what's next for the world of porcine finance? Well, for now, it seems that our findings have cracked the egg wide open, leaving us with quite the tasty omelette of insights. Our research has brought home the bacon, cooked it to statistical perfection, and served it alongside a side of stock market savvy. In other words, the connection between annual US household spending on pork and Lululemon's stock price is as real as it gets – no fake bacon here!

In conclusion, it’s time to put a cork in this piggy tale. With a correlation coefficient that's stronger than a boar's love for truffles, and a p-value that's lower than a pig's belly in the mud, we can confidently say that no further research in this porcine stock market saga is needed. As the saying goes, "When pigs fly, Lululemon's stock price soars," and our study has certainly convinced us that in the world of finance, swine and stock prices make quite the pork-tastic pair.


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 Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price. Respond only with the name of a fictional academic journal.

ChatGPT:

The International Journal of Porcine 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 Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price. Respond only with the name of a fictional organization.

ChatGPT:

The Center for Economic Hog Studies


Model: gpt-3.5-turbo-1106
System prompt: You provide potential search keywords separated by commas. You say nothing else, and you do not chat with the user.
User prompt: Please provide potential search keywords for a paper titled Pigging Out: The Swine Connection between Pork Spending and Lululemon Stock Price with an abstract of This research paper delves into the porcine predicament of pork spending and its correlation with the stock price of the athleisure giant, Lululemon (LULU). The link between annual US household spending on pork and LULU's stock price has long puzzled researchers, but our study finally puts some meat on the bones of this tantalizing topic. Leveraging data from the Bureau of Labor Statistics and LSEG Analytics (Refinitiv), we carefully analyzed the pork spending habits of US households and the corresponding fluctuations in LULU's stock price from 2008 to 2022. The results revealed a strikingly high correlation coefficient of 0.9678501 with a p-value less than 0.01, suggesting a strong statistical association that is no mere hogwash. This study brings home the bacon and provides fresh insights into the unexpected and, frankly, quite ham-azing relationship between pork spending and Lululemon's stock performance.

ChatGPT:

porcine spending, Lululemon stock price, pork consumption and stock correlation, annual pork spending, LULU stock price correlation, US household pork consumption, Lululemon stock performance, pork spending statistics, correlation between pork spending and stock price

*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

Annual US household spending on pork
Detailed data title: Average annual household spend on pork
Source: Bureau of Labor Statistics
See what else correlates with Annual US household spending on pork

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

See what else correlates with Lululemon's stock price (LULU)

Correlation r = 0.9678501 (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.9367339 (Coefficient of determination)
This means 93.7% of the change in the one variable (i.e., Lululemon's stock price (LULU)) is predictable based on the change in the other (i.e., Annual US household spending on pork) over the 15 years from 2008 through 2022.

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

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

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

Just to be clear: I'm being completely transparent about the calculations. There is no math trickery. This is just how statistics shakes out when you calculate hundreds of millions of random correlations.
with the same 14 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 14 because we have two variables measured over a period of 15 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.9, 0.99 ] 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.
200820092010201120122013201420152016201720182019202020212022
Annual US household spending on pork (Household spend)163168149162166170177165169181180187214223246
Lululemon's stock price (LULU) (Stock price)23.73.9815.4434.747.577.7359.0856.0153.7165.9477.31118.89232.9351.67392.2




Why this works

  1. Data dredging: I have 25,153 variables in my database. I compare all these variables against each other to find ones that randomly match up. That's 632,673,409 correlation calculations! This is called “data dredging.” Instead of starting with a hypothesis and testing it, I instead abused the data to see what correlations shake out. It’s a dangerous way to go about analysis, because any sufficiently large dataset will yield strong correlations completely at random.
  2. Lack of causal connection: There is probably Because these pages are automatically generated, it's possible that the two variables you are viewing are in fact causually related. I take steps to prevent the obvious ones from showing on the site (I don't let data about the weather in one city correlate with the weather in a neighboring city, for example), but sometimes they still pop up. If they are related, cool! You found a loophole.
    no direct connection between these variables, despite what the AI says above. This is exacerbated by the fact that I used "Years" as the base variable. Lots of things happen in a year that are not related to each other! Most studies would use something like "one person" in stead of "one year" to be the "thing" studied.
  3. Observations not independent: For many variables, sequential years are not independent of each other. If a population of people is continuously doing something every day, there is no reason to think they would suddenly change how they are doing that thing on January 1. A simple Personally I don't find any p-value calculation to be 'simple,' but you know what I mean.
    p-value calculation does not take this into account, so mathematically it appears less probable than it really is.
  4. Y-axis doesn't start at zero: I truncated the Y-axes of the graph above. I also used a line graph, which makes the visual connection stand out more than it deserves. Nothing against line graphs. They are great at telling a story when you have linear data! But visually it is deceptive because the only data is at the points on the graph, not the lines on the graph. In between each point, the data could have been doing anything. Like going for a random walk by itself!
    Mathematically what I showed is true, but it is intentionally misleading. Below is the same chart but with both Y-axes starting at zero.
  5. Outlandish outliers: There are "outliers" in this data. In concept, "outlier" just means "way different than the rest of your dataset." When calculating a correlation like this, they are particularly impactful because a single outlier can substantially increase your correlation.

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

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




Try it yourself

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

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

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

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

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

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

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

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

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


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

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

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

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

    return correlation, r_squared, p_value

# These are the arrays for the variables shown on this page, but you can modify them to be any two sets of numbers
array_1 = np.array([163,168,149,162,166,170,177,165,169,181,180,187,214,223,246,])
array_2 = np.array([23.7,3.98,15.44,34.7,47.5,77.73,59.08,56.01,53.71,65.94,77.31,118.89,232.9,351.67,392.2,])
array_1_name = "Annual US household spending on pork"
array_2_name = "Lululemon's stock price (LULU)"

# 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: 5898 · Black Variable ID: 19890 · Red Variable ID: 1735
about · subscribe · emailme@tylervigen.com · twitter

CC BY 4.0