about · email me · subscribe
Spurious correlation #1,828 · View random

A linear line chart with years as the X-axis and two variables on the Y-axis. The first variable is Number of public school students in 9th grade and the second variable is Bank of America's stock price (BAC).  The chart goes from 2002 to 2022, and the two variables track closely in value over that time. Small Image
Download png
, svg

AI explanation

As the number of 9th graders enrolled in public school rises, so does the demand for school supplies. This spike in demand leads to an unexpected boon for Bank of America, as students and parents rush to open new savings accounts to budget for the academic year. It's truly a case of BAC-to-school banking, where even the slightest increase in young scholars translates to greater interest in the stock market.

Model: dalle-3
Prompt: [ Concept art ] Generate an image depicting a group of 9th-grade high school students engaged in an animated conversation about their future career aspirations within a classroom setting. Meanwhile, a large digital display mounted on the wall prominently shows the real-time stock market performance chart of Bank of America, reflecting a steady upward trend. The students' enthusiasm and the positive economic indicator visually convey the hopeful prospects for their future endeavors. 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: Number of public school students in 9th grade and Bank of America's stock price. 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: Cyber folk Cute 2D animation Sci-fi fantacy Low poly Concept art
ChatGPT: Concept art

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 Number of public school students in 9th grade and Bank of America's stock price together. Keep the description simple.
ChatGPT: A group of high school students in 9th grade excitedly discussing their future career goals and aspirations while sitting in a classroom. At the same time, a digital display on the wall shows the Bank of America's stock price steadily increasing, reflecting the optimistic economic outlook for their future endeavors.

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: [ Concept art ] and depicting this scene: A group of high school students in 9th grade excitedly discussing their future career goals and aspirations while sitting in a classroom. At the same time, a digital display on the wall shows the Bank of America's stock price steadily increasing, reflecting the optimistic economic outlook for their future endeavors. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: [ Concept art ] Generate an image depicting a group of 9th-grade high school students engaged in an animated conversation about their future career aspirations within a classroom setting. Meanwhile, a large digital display mounted on the wall prominently shows the real-time stock market performance chart of Bank of America, reflecting a steady upward trend. The students' enthusiasm and the positive economic indicator visually convey the hopeful prospects for their future endeavors.

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

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

Model: gpt-3.5-turbo-1106 (fine-tuned)
System prompt: You provide humorous responses in the form of plausible sounding explanations for correlations. You assume the correlation is causative for the purpose of the explanation even if it is ridiculous. You do not chat with the user, you only reply with the causal connection explanation and nothing else.
User prompt: Please make up a funny explanation for how increases in Number of public school students in 9th grade positively influenced Bank of America's stock price (BAC). Include one good pun.

AI academic paper

(Because p < 0.01)
Number Crunching: The 9th Grade Effect on Bank of America's Stock Price

The Journal of Adolescent 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 dry but witty academic researcher. You speak in the passive voice, and your writing sounds like it belongs in a medical or economics journal.You write titles and abstracts of goofy academic research papers.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, and add unexpected twists in your writing.

Please draft the title and abstract of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, jokes, goofy observations, and puns.

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

Your research team used data from National Center for Education Statistics and LSEG Analytics (Refinitiv) to assess this nagging question. You found a correlation coefficient of 0.8153019 and p < 0.01 for 2002 to 2022.

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

[[TITLE]]
Lorem ipsum dolor sit

[[ABSTRACT]]
Lorem ipsum dolor sit



ChatGPT:
[[TITLE]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.


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

Please make up the introduction section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, 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]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
[[INTRODUCTION]]

The world of finance is a realm of constant flux and unpredictable forces, much like the behavior of excited particles in a quantum physics experiment--or the mood swings of a caffeinated lab rat. Over the years, researchers have delved deep into the labyrinthine maze of financial variables, tirelessly seeking out patterns and connections that often seem as elusive as the perfect cup of coffee on a Monday morning.

Among the myriad factors that sway the stock market, one might not expect the number of 9th grade students in public schools to be among the key players. However, as Albert Einstein famously said, "The most beautiful thing we can experience is the mysterious." In line with this sentiment, this study seeks to unravel the mystery behind the potential relationship between the enrollment of 9th graders and the stock price of Bank of America (BAC).

In the pursuit of this perplexing connection, we conducted an exhaustive analysis spanning two decades, employing data from the esteemed National Center for Education Statistics and LSEG Analytics (Refinitiv). The period from 2002 to 2022 was scrutinized, leaving no stone unturned in our quest for statistical significance.

The correlation coefficient, a stalwart measure of association, revealed a striking value of 0.8153019. This number, while lacking the flair of a Hollywood film, holds profound implications for the intersecting domains of education and finance. Furthermore, the p-value emerged with the dramatic flair of a magician pulling a rabbit out of a hat, demonstrating a statistically significant relationship with a value less than 0.01.

While the elusive specter of causality still eludes our grasp, the robustness of this association beckons researchers to unravel its enigmatic nature. Like Sherlock Holmes facing a perplexing case, we find ourselves at a crossroads, with more questions than answers. The implications of this unexpected link between 9th grade enrollment and a financial giant's stock price add a layer of intrigue to the already enigmatic world of market dynamics.

In conclusion, the unforeseen entanglement of 9th grade student numbers and a banking behemoth's stock price serves as a vibrant reminder of the capricious nature of financial markets. Like a jigsaw puzzle missing a few crucial pieces, the enigma of these findings invites further exploration and scrutiny. The unexpected convergence of seemingly unrelated variables underscores the kaleidoscopic nature of modern finance, reminding us that, in this complex world, even the most unlikely candidates may hold unsuspecting sway.


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

Please make up a literature review section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, jokes, goofy observations, and puns.

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

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

Start by naming serious-sounding studies by authors like Smith, Doe, and Jones - but then quickly devolve. Name some real non-fiction books that would be related to the topic. Then name some real fiction books that sound like they could be related. Then name some movies that you watched that are tangentially related to the topic.

Here is the title and abstract of the paper:
[[TITLE]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
The world of finance is a realm of constant flux and unpredictable forces, much like the behavior of excited particles in a quantum physics experiment--or the mood swings of a caffeinated lab rat. Over the years, researchers have delved deep into the labyrinthine maze of financial variables, tirelessly seeking out patterns and connections that often seem as elusive as the perfect cup of coffee on a Monday morning.
Among the myriad factors that sway the stock market, one might not expect the number of 9th grade students in public schools to be among the key players. However, as Albert Einstein famously said, "The most beautiful thing we can experience is the mysterious." In line with this sentiment, this study seeks to unravel the mystery behind the potential relationship between the enrollment of 9th graders and the stock price of Bank of America (BAC).
In the pursuit of this perplexing connection, we conducted an exhaustive analysis spanning two decades, employing data from the esteemed National Center for Education Statistics and LSEG Analytics (Refinitiv). The period from 2002 to 2022 was scrutinized, leaving no stone unturned in our quest for statistical significance.
The correlation coefficient, a stalwart measure of association, revealed a striking value of 0.8153019. This number, while lacking the flair of a Hollywood film, holds profound implications for the intersecting domains of education and finance. Furthermore, the p-value emerged with the dramatic flair of a magician pulling a rabbit out of a hat, demonstrating a statistically significant relationship with a value less than 0.01.
While the elusive specter of causality still eludes our grasp, the robustness of this association beckons researchers to unravel its enigmatic nature. Like Sherlock Holmes facing a perplexing case, we find ourselves at a crossroads, with more questions than answers. The implications of this unexpected link between 9th grade enrollment and a financial giant's stock price add a layer of intrigue to the already enigmatic world of market dynamics.
In conclusion, the unforeseen entanglement of 9th grade student numbers and a banking behemoth's stock price serves as a vibrant reminder of the capricious nature of financial markets. Like a jigsaw puzzle missing a few crucial pieces, the enigma of these findings invites further exploration and scrutiny. The unexpected convergence of seemingly unrelated variables underscores the kaleidoscopic nature of modern finance, reminding us that, in this complex world, even the most unlikely candidates may hold unsuspecting sway.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The captivating amalgamation of 9th-grade student enrollment and the stock price of Bank of America (BAC) has commanded the attention of researchers and enthusiasts alike. The labyrinthine nuances of this unconventional relationship have spurred investigations that seek to unravel its enigmatic nature. In their seminal work, Smith and Doe (2015) delved into the unsuspected intersection of demographic trends and financial dynamics, providing a conceptual framework for understanding such unorthodox associations.

Jones and Smith (2018) further explored the realm of unorthodox market indicators, shedding light on the potential linkages between seemingly disparate variables. Their systematic analysis underscored the need to embrace unconventional perspectives in financial research, as the market's tapestry reveals unexpected threads at every turn. The works of these esteemed scholars laid the foundation for our current investigation, beckoning us to entertain the possibility of unanticipated correlations between 9th-grade enrollment and a significant player in the financial arena.

Venturing beyond the traditional boundaries of finance and education, researchers have drawn inspiration from various sources that offer unique insights into the idiosyncrasies of market dynamics. In "Freakonomics" (Levitt and Dubner, 2005), the authors expound upon the unanticipated forces that shape economic phenomena, encouraging readers to see beyond the facade of conventional wisdom.

Shifting gears to a more imaginative realm, the fiction novel "Moneyball" (Lewis, 2003) weaves a captivating narrative around the unpredictability of success in the world of professional baseball. While seemingly unrelated to our current inquiry, the underlying themes of unexpected correlations and unconventional indicators resonate with the unorthodox pairing of 9th-grade students and stock prices.

In the cinematic universe, "The Big Short" provides a cinematic portrayal of the intricate web of financial markets, offering a dramatic narrative that mirrors the enigmatic nature of our findings. While the protagonists' pursuits may differ from our own, the underlying theme of unraveling complex financial intricacies resonates with our quest to decipher the unexpected entanglement of 9th-grade enrollment and a banking giant's stock price.

As we navigate the uncharted waters of this intriguing academic pursuit, it becomes increasingly evident that serendipity and unpredictability often reign supreme in the world of finance. The works of esteemed scholars and the subtle echoes from fictional narratives and cinematic portrayals converge to underscore the multifaceted nature of our investigation, reminding us that even the most unanticipated correlations may hold unsuspecting sway in the tapestry of modern finance.


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

Please make up the methodology section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, 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 National Center for Education Statistics and LSEG Analytics (Refinitiv) . You used data from 2002 to 2022

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

Here is the title, abstract, and introduction of the paper:
[[TITLE]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

[[INTRODUCTION]]
The world of finance is a realm of constant flux and unpredictable forces, much like the behavior of excited particles in a quantum physics experiment--or the mood swings of a caffeinated lab rat. Over the years, researchers have delved deep into the labyrinthine maze of financial variables, tirelessly seeking out patterns and connections that often seem as elusive as the perfect cup of coffee on a Monday morning.
Among the myriad factors that sway the stock market, one might not expect the number of 9th grade students in public schools to be among the key players. However, as Albert Einstein famously said, "The most beautiful thing we can experience is the mysterious." In line with this sentiment, this study seeks to unravel the mystery behind the potential relationship between the enrollment of 9th graders and the stock price of Bank of America (BAC).
In the pursuit of this perplexing connection, we conducted an exhaustive analysis spanning two decades, employing data from the esteemed National Center for Education Statistics and LSEG Analytics (Refinitiv). The period from 2002 to 2022 was scrutinized, leaving no stone unturned in our quest for statistical significance.
The correlation coefficient, a stalwart measure of association, revealed a striking value of 0.8153019. This number, while lacking the flair of a Hollywood film, holds profound implications for the intersecting domains of education and finance. Furthermore, the p-value emerged with the dramatic flair of a magician pulling a rabbit out of a hat, demonstrating a statistically significant relationship with a value less than 0.01.
While the elusive specter of causality still eludes our grasp, the robustness of this association beckons researchers to unravel its enigmatic nature. Like Sherlock Holmes facing a perplexing case, we find ourselves at a crossroads, with more questions than answers. The implications of this unexpected link between 9th grade enrollment and a financial giant's stock price add a layer of intrigue to the already enigmatic world of market dynamics.
In conclusion, the unforeseen entanglement of 9th grade student numbers and a banking behemoth's stock price serves as a vibrant reminder of the capricious nature of financial markets. Like a jigsaw puzzle missing a few crucial pieces, the enigma of these findings invites further exploration and scrutiny. The unexpected convergence of seemingly unrelated variables underscores the kaleidoscopic nature of modern finance, reminding us that, in this complex world, even the most unlikely candidates may hold unsuspecting sway.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

In this study, a concoction of methodological ingredients was stirred together to brew the potion of analysis. The number of public school students in 9th grade, extracted from the National Center for Education Statistics, waltzed with the stock price of Bank of America (BAC), sourced from LSEG Analytics (Refinitiv), forming the elusive tango of data intertwining.

Firstly, to capture the essence of a 20-year period from 2002 to 2022, a systematic and exhaustive data collection effort akin to a squirrel hoarding nuts for winter was undertaken. This involved scavenging the vast expanse of the internet and data repositories, utilizing algorithms and meticulous keyword searches, akin to an archeologist sifting through layers of earth in search of ancient artifacts, to amass a comprehensive dataset that encapsulated the fluctuating fortunes of 9th grade enrollments and BAC stock prices.

The process of data wrangling and cleaning resembled the work of a fastidious librarian meticulously organizing a chaotic library, ensuring that each datum was accounted for and devoid of errors or inconsistencies. Once the dataset was scrubbed clean, it underwent a series of statistical rituals, including correlation analyses and regression incantations, in order to unveil the relationship between the two seemingly disparate variables.

The statistical software, acting as the magician's wand in this mystical endeavor, conjured the correlation coefficient, a measure of the strength and direction of the linear relationship between the variables. This mystical number, with its cloak of significance, cast light on the dance of 9th grade students and BAC stock prices, providing a numerical insight into their seemingly enchanted connection.

Furthermore, the incantation of the p-value, a tool of statistical sorcery, was invoked to determine the probability of observing such a strong relationship between the variables by mere chance. Its diminutive value, akin to finding a needle in a haystack, signaled the presence of a significant association that beckoned further exploration.

In summary, this methodological tapestry, woven with threads of thorough data collection, meticulous cleaning, and statistical sorcery, provided the framework for unraveling the mysterious entanglement of 9th grade student numbers and the stock price of a financial titan.


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

Please make up the results section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, 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 National Center for Education Statistics and LSEG Analytics (Refinitiv) .

For the time period 2002 to 2022, you found a correlation 0.8153019, r-squared of 0.6647172, 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]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
The world of finance is a realm of constant flux and unpredictable forces, much like the behavior of excited particles in a quantum physics experiment--or the mood swings of a caffeinated lab rat. Over the years, researchers have delved deep into the labyrinthine maze of financial variables, tirelessly seeking out patterns and connections that often seem as elusive as the perfect cup of coffee on a Monday morning.
Among the myriad factors that sway the stock market, one might not expect the number of 9th grade students in public schools to be among the key players. However, as Albert Einstein famously said, "The most beautiful thing we can experience is the mysterious." In line with this sentiment, this study seeks to unravel the mystery behind the potential relationship between the enrollment of 9th graders and the stock price of Bank of America (BAC).
In the pursuit of this perplexing connection, we conducted an exhaustive analysis spanning two decades, employing data from the esteemed National Center for Education Statistics and LSEG Analytics (Refinitiv). The period from 2002 to 2022 was scrutinized, leaving no stone unturned in our quest for statistical significance.
The correlation coefficient, a stalwart measure of association, revealed a striking value of 0.8153019. This number, while lacking the flair of a Hollywood film, holds profound implications for the intersecting domains of education and finance. Furthermore, the p-value emerged with the dramatic flair of a magician pulling a rabbit out of a hat, demonstrating a statistically significant relationship with a value less than 0.01.
While the elusive specter of causality still eludes our grasp, the robustness of this association beckons researchers to unravel its enigmatic nature. Like Sherlock Holmes facing a perplexing case, we find ourselves at a crossroads, with more questions than answers. The implications of this unexpected link between 9th grade enrollment and a financial giant's stock price add a layer of intrigue to the already enigmatic world of market dynamics.
In conclusion, the unforeseen entanglement of 9th grade student numbers and a banking behemoth's stock price serves as a vibrant reminder of the capricious nature of financial markets. Like a jigsaw puzzle missing a few crucial pieces, the enigma of these findings invites further exploration and scrutiny. The unexpected convergence of seemingly unrelated variables underscores the kaleidoscopic nature of modern finance, reminding us that, in this complex world, even the most unlikely candidates may hold unsuspecting sway.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The analysis of the relationship between the number of public school students in 9th grade and Bank of America's stock price (BAC) yielded intriguing results. Over the 20-year period from 2002 to 2022, the correlation coefficient between these seemingly disparate variables was found to be a substantial 0.8153019, indicating a strong positive relationship. This finding suggests that as the number of 9th grade students in public schools fluctuated, there were corresponding movements in the stock price of Bank of America. The r-squared value of 0.6647172 further reinforces the robustness of this association, indicating that approximately 66.47% of the variability in BAC stock price can be explained by changes in 9th grade enrollment.

The results also revealed a statistically significant p-value of less than 0.01, indicating a high level of confidence in the relationship between these variables. The findings of this study underscore the unpredictability of financial markets and the potential for unorthodox indicators to have an impact on stock prices. The unexpected emergence of a strong link between 9th grade enrollment and the stock price of a major financial institution challenges traditional notions of market analysis and calls for a reevaluation of the variables that shape our economic landscape.

The scatterplot (Fig. 1) visually depicts the strong positive correlation between the number of public school students in 9th grade and Bank of America's stock price, providing a compelling illustration of the connection uncovered by this research.

These results shine a light on the enigmatic nature of financial markets, reminding us that, in the words of Sir Arthur Conan Doyle, "It is a capital mistake to theorize before one has data." The unexpected intertwining of 9th grade student enrollment and a banking giant's stock price serves as a testament to the complex interplay of variables in the realm of finance, prompting further inquiry into the factors that shape market dynamics.


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

Please make up the discussion section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, 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]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

[[LITERATURE REVIEW]]
The captivating amalgamation of 9th-grade student enrollment and the stock price of Bank of America (BAC) has commanded the attention of researchers and enthusiasts alike. The labyrinthine nuances of this unconventional relationship have spurred investigations that seek to unravel its enigmatic nature. In their seminal work, Smith and Doe (2015) delved into the unsuspected intersection of demographic trends and financial dynamics, providing a conceptual framework for understanding such unorthodox associations.
Jones and Smith (2018) further explored the realm of unorthodox market indicators, shedding light on the potential linkages between seemingly disparate variables. Their systematic analysis underscored the need to embrace unconventional perspectives in financial research, as the market's tapestry reveals unexpected threads at every turn. The works of these esteemed scholars laid the foundation for our current investigation, beckoning us to entertain the possibility of unanticipated correlations between 9th-grade enrollment and a significant player in the financial arena.
Venturing beyond the traditional boundaries of finance and education, researchers have drawn inspiration from various sources that offer unique insights into the idiosyncrasies of market dynamics. In "Freakonomics" (Levitt and Dubner, 2005), the authors expound upon the unanticipated forces that shape economic phenomena, encouraging readers to see beyond the facade of conventional wisdom.
Shifting gears to a more imaginative realm, the fiction novel "Moneyball" (Lewis, 2003) weaves a captivating narrative around the unpredictability of success in the world of professional baseball. While seemingly unrelated to our current inquiry, the underlying themes of unexpected correlations and unconventional indicators resonate with the unorthodox pairing of 9th-grade students and stock prices.
In the cinematic universe, "The Big Short" provides a cinematic portrayal of the intricate web of financial markets, offering a dramatic narrative that mirrors the enigmatic nature of our findings. While the protagonists' pursuits may differ from our own, the underlying theme of unraveling complex financial intricacies resonates with our quest to decipher the unexpected entanglement of 9th-grade enrollment and a banking giant's stock price.
As we navigate the uncharted waters of this intriguing academic pursuit, it becomes increasingly evident that serendipity and unpredictability often reign supreme in the world of finance. The works of esteemed scholars and the subtle echoes from fictional narratives and cinematic portrayals converge to underscore the multifaceted nature of our investigation, reminding us that even the most unanticipated correlations may hold unsuspecting sway in the tapestry of modern finance.

[[RESULTS]]
The analysis of the relationship between the number of public school students in 9th grade and Bank of America's stock price (BAC) yielded intriguing results. Over the 20-year period from 2002 to 2022, the correlation coefficient between these seemingly disparate variables was found to be a substantial 0.8153019, indicating a strong positive relationship. This finding suggests that as the number of 9th grade students in public schools fluctuated, there were corresponding movements in the stock price of Bank of America. The r-squared value of 0.6647172 further reinforces the robustness of this association, indicating that approximately 66.47% of the variability in BAC stock price can be explained by changes in 9th grade enrollment.
The results also revealed a statistically significant p-value of less than 0.01, indicating a high level of confidence in the relationship between these variables. The findings of this study underscore the unpredictability of financial markets and the potential for unorthodox indicators to have an impact on stock prices. The unexpected emergence of a strong link between 9th grade enrollment and the stock price of a major financial institution challenges traditional notions of market analysis and calls for a reevaluation of the variables that shape our economic landscape.
The scatterplot (Fig. 1) visually depicts the strong positive correlation between the number of public school students in 9th grade and Bank of America's stock price, providing a compelling illustration of the connection uncovered by this research.
These results shine a light on the enigmatic nature of financial markets, reminding us that, in the words of Sir Arthur Conan Doyle, "It is a capital mistake to theorize before one has data." The unexpected intertwining of 9th grade student enrollment and a banking giant's stock price serves as a testament to the complex interplay of variables in the realm of finance, prompting further inquiry into the factors that shape market dynamics.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

The results of this study contribute to the burgeoning literature on the interplay between unconventional indicators and market dynamics. Our findings align with the prior research that has illuminated the unexpected complexities of financial phenomena, echoing the prescient insights of Smith and Doe (2015) and the compelling analyses of Jones and Smith (2018). While the unorthodox pairing of 9th-grade student enrollment and a major financial institution's stock price may have initially raised eyebrows, our study has bolstered the growing body of evidence supporting the existence of tangible connections between seemingly divergent variables.

As Levitt and Dubner (2005) poignantly observed in "Freakonomics," the hidden forces that shape economic circumstances often defy conventional wisdom, inviting researchers to explore the uncharted territories of unpredictability. The notion of unforeseen correlations and the impact of unconventional factors on market dynamics, reminiscent of the captivating narrative woven in "Moneyball" (Lewis, 2003), resonates with the unanticipated bond uncovered between 9th-grade student enrollment and Bank of America's stock price.

The robust correlation coefficient and the statistically significant p-value unearthed in our analysis underscore the compelling nature of this unanticipated association, reinforcing the imperative to embrace unconventional perspectives in financial research. These findings underscore the potential of unorthodox indicators to play a pivotal role in shaping the intricate fabric of market dynamics, akin to the dramatic unraveling of financial intricacies portrayed in "The Big Short."

While the idiosyncratic nature of this association may prompt raised eyebrows and incredulous expressions, the statistical rigor of our analysis compels us to acknowledge the underlying significance of this peculiar juxtaposition. The visual representation of this relationship in the scatterplot (Fig. 1) serves as a stark visual testament to the tangible bond between 9th grade student enrollment and the stock price of a banking stalwart.

In conclusion, the unexpected intertwining of 9th grade student enrollment and Bank of America's stock price encapsulates the complexity and nuance of modern finance, defying the confines of conventional market analysis and beckoning researchers to delve deeper into the unanticipated avenues that shape our economic landscape. As we navigate the uncharted waters of this unforeseen correlation, we are reminded of the insightful words of Sir Arthur Conan Doyle, serving as a siren call for further exploration and analysis in this unorthodox realm of financial dynamics.


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

Please make up a short conclusion of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Bank of America's stock price (BAC). Make it seem dry like academic research paper, but with lots of subtle hidden offhand remarks, 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]]
"Number Crunching: The 9th Grade Effect on Bank of America's Stock Price"

[[ABSTRACT]]
This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

[[INTRDUCTION]]
The world of finance is a realm of constant flux and unpredictable forces, much like the behavior of excited particles in a quantum physics experiment--or the mood swings of a caffeinated lab rat. Over the years, researchers have delved deep into the labyrinthine maze of financial variables, tirelessly seeking out patterns and connections that often seem as elusive as the perfect cup of coffee on a Monday morning.
Among the myriad factors that sway the stock market, one might not expect the number of 9th grade students in public schools to be among the key players. However, as Albert Einstein famously said, "The most beautiful thing we can experience is the mysterious." In line with this sentiment, this study seeks to unravel the mystery behind the potential relationship between the enrollment of 9th graders and the stock price of Bank of America (BAC).
In the pursuit of this perplexing connection, we conducted an exhaustive analysis spanning two decades, employing data from the esteemed National Center for Education Statistics and LSEG Analytics (Refinitiv). The period from 2002 to 2022 was scrutinized, leaving no stone unturned in our quest for statistical significance.
The correlation coefficient, a stalwart measure of association, revealed a striking value of 0.8153019. This number, while lacking the flair of a Hollywood film, holds profound implications for the intersecting domains of education and finance. Furthermore, the p-value emerged with the dramatic flair of a magician pulling a rabbit out of a hat, demonstrating a statistically significant relationship with a value less than 0.01.
While the elusive specter of causality still eludes our grasp, the robustness of this association beckons researchers to unravel its enigmatic nature. Like Sherlock Holmes facing a perplexing case, we find ourselves at a crossroads, with more questions than answers. The implications of this unexpected link between 9th grade enrollment and a financial giant's stock price add a layer of intrigue to the already enigmatic world of market dynamics.
In conclusion, the unforeseen entanglement of 9th grade student numbers and a banking behemoth's stock price serves as a vibrant reminder of the capricious nature of financial markets. Like a jigsaw puzzle missing a few crucial pieces, the enigma of these findings invites further exploration and scrutiny. The unexpected convergence of seemingly unrelated variables underscores the kaleidoscopic nature of modern finance, reminding us that, in this complex world, even the most unlikely candidates may hold unsuspecting sway.

[[RESULTS]]
The analysis of the relationship between the number of public school students in 9th grade and Bank of America's stock price (BAC) yielded intriguing results. Over the 20-year period from 2002 to 2022, the correlation coefficient between these seemingly disparate variables was found to be a substantial 0.8153019, indicating a strong positive relationship. This finding suggests that as the number of 9th grade students in public schools fluctuated, there were corresponding movements in the stock price of Bank of America. The r-squared value of 0.6647172 further reinforces the robustness of this association, indicating that approximately 66.47% of the variability in BAC stock price can be explained by changes in 9th grade enrollment.
The results also revealed a statistically significant p-value of less than 0.01, indicating a high level of confidence in the relationship between these variables. The findings of this study underscore the unpredictability of financial markets and the potential for unorthodox indicators to have an impact on stock prices. The unexpected emergence of a strong link between 9th grade enrollment and the stock price of a major financial institution challenges traditional notions of market analysis and calls for a reevaluation of the variables that shape our economic landscape.
The scatterplot (Fig. 1) visually depicts the strong positive correlation between the number of public school students in 9th grade and Bank of America's stock price, providing a compelling illustration of the connection uncovered by this research.
These results shine a light on the enigmatic nature of financial markets, reminding us that, in the words of Sir Arthur Conan Doyle, "It is a capital mistake to theorize before one has data." The unexpected intertwining of 9th grade student enrollment and a banking giant's stock price serves as a testament to the complex interplay of variables in the realm of finance, prompting further inquiry into the factors that shape market dynamics.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In light of the findings presented, it is evident that the relationship between the number of public school students in 9th grade and Bank of America's stock price is not a mere fluke or statistical hiccup. The substantial correlation coefficient and the statistically significant p-value reveal a significant association that cannot be brushed off with the nonchalance of a cat swatting at a toy mouse. While the causal mechanism behind this connection remains as cryptic as an unsolved algebraic equation, the implications for financial analysis bear the weight of a black hole's gravitational pull.

The inexorable intertwining of 9th grade enrollment and BAC stock price serves as a gentle, yet persistent, reminder that the tendrils of influence in financial markets extend far and wide, much like an overenthusiastic vine in a botanical garden. This unexpected concurrence challenges our conventional understanding of market dynamics, compelling researchers to expand their investigative toolkit beyond the ordinary and into the realm of the extraordinary.

In the grand symphony of financial variables, the number of 9th grade students in public schools may be but a humble piccolo, yet its melodic resonance with the stock price of a banking behemoth demands our attention. As we bid adieu to this exploration, it is with a certain solemnity that we assert: no further excursions along this particular avenue of inquiry are needed, for the enigma of the 9th grade effect on Bank of America's stock price has been uncovered and laid bare for the curious eyes of the academic community.


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 Number Crunching: The 9th Grade Effect on Bank of America's Stock Price. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Adolescent 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 Number Crunching: The 9th Grade Effect on Bank of America's Stock Price. Respond only with the name of a fictional organization.

ChatGPT:

The Society for Adolescent Financial Impact 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 Number Crunching: The 9th Grade Effect on Bank of America's Stock Price with an abstract of This paper examines the potential relationship between the number of public school students in 9th grade and the stock price of Bank of America (BAC). Utilizing data from the National Center for Education Statistics and LSEG Analytics (Refinitiv), we conducted a thorough analysis of a 20-year period from 2002 to 2022. Our findings reveal a striking correlation coefficient of 0.8153019 and a statistically significant p-value of less than 0.01, suggesting a robust association between these seemingly disparate variables. While the causality of this association remains obscure, the implications for financial market analysis are intriguing and warrant further investigation. This unexpected link between 9th grade enrollment and a major financial institution's stock price highlights the complexity and unpredictability of market dynamics and the potential for unconventional indicators to play a role in the world of finance.

ChatGPT:

9th grade enrollment, Bank of America stock price, stock market analysis, National Center for Education Statistics, LSEG Analytics, Refinitiv, 20-year data analysis, market dynamics, financial institution, unusual indicators, correlation coefficient, causality, statistical significance, public school students, finance, unconventional variables, financial market, association, investigation.

*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

Number of public school students in 9th grade
Detailed data title: 9th grade enrollment in public elementary and secondary schools
Source: National Center for Education Statistics
See what else correlates with Number of public school students in 9th grade

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

See what else correlates with Bank of America's stock price (BAC)

Correlation r = 0.8153019 (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.6647172 (Coefficient of determination)
This means 66.5% of the change in the one variable (i.e., Bank of America's stock price (BAC)) is predictable based on the change in the other (i.e., Number of public school students in 9th grade) over the 21 years from 2002 through 2022.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 6.7E-6. 0.0000067146168213668090000000
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.82 in 0.00067% of random cases. Said differently, if you correlated 148,929 random variables You don't actually need 148 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 20 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 20 because we have two variables measured over a period of 21 years. It's just the number of years minus ( the number of variables minus one ), which in this case simplifies to the number of years minus one.
you would randomly expect to find a correlation as strong as this one.

[ 0.59, 0.92 ] 95% correlation confidence interval (using the Fisher z-transformation)
The confidence interval is an estimate the range of the value of the correlation coefficient, using the correlation itself as an input. The values are meant to be the low and high end of the correlation coefficient with 95% confidence.

This one is a bit more complciated than the other calculations, but I include it because many people have been pushing for confidence intervals instead of p-value calculations (for example: NEJM. However, if you are dredging data, you can reliably find yourself in the 5%. That's my goal!


All values for the years included above: If I were being very sneaky, I could trim years from the beginning or end of the datasets to increase the correlation on some pairs of variables. I don't do that because there are already plenty of correlations in my database without monkeying with the years.

Still, sometimes one of the variables has more years of data available than the other. This page only shows the overlapping years. To see all the years, click on "See what else correlates with..." link above.
200220032004200520062007200820092010201120122013201420152016201720182019202020212022
Number of public school students in 9th grade (Students)410472041902404281340428712042599104199830412255040800204007860395699039752603979520403253040194803986170399557040044404044230401373041685204139010
Bank of America's stock price (BAC) (Stock price)31.1634.9639.8846.6646.9253.441.5313.9215.2413.855.7512.0515.6917.9916.4522.629.7524.0835.3530.4645.09




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.




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([4104720,4190240,4281340,4287120,4259910,4199830,4122550,4080020,4007860,3956990,3975260,3979520,4032530,4019480,3986170,3995570,4004440,4044230,4013730,4168520,4139010,])
array_2 = np.array([31.16,34.96,39.88,46.66,46.92,53.4,41.53,13.92,15.24,13.85,5.75,12.05,15.69,17.99,16.45,22.6,29.75,24.08,35.35,30.46,45.09,])
array_1_name = "Number of public school students in 9th grade"
array_2_name = "Bank of America's stock price (BAC)"

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

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



Reuseable content

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

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

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

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

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

Download images for these variables:


View another random correlation

How fun was this correlation?

You're the rating guru we've been waiting for!


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

CC BY 4.0