about · email me · subscribe
Spurious correlation #2,073 · 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 Petroluem consumption in Taiwan.  The chart goes from 1990 to 2021, and the two variables track closely in value over that time. Small Image
Download png
, svg

AI explanation

As more 9th graders entered public schools, there was a spike in science class enrollment. This led to an unexpected surge in the production of mini volcanoes for experiments, creating a lava-ly demand for petroleum-based products. Who knew that the nation's fuel dependency hinged on the fiery passion of young scientists-in-the-making! It's a crude awakening to the unexplored connection between education and oil production.

Model: dalle-3
Prompt: Generate an image of a bustling street in Taiwan during the early morning. Show high school students in their uniforms walking to school, carrying colorful backpacks and textbooks. In the background, emphasize the activity at a gas station with cars and scooters lining up to refuel, highlighting the petroleum consumption in the country. Capture the unique mix of vibrant street life and urban energy through the realistic style. 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 Petroluem consumption in Taiwan. 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: An image that looks like it is a scene from A Disney Movie Realistic An image that looks like it is a scene from 'Star Wars' Celtic art Cubism
ChatGPT: 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 Number of public school students in 9th grade and Petroluem consumption in Taiwan together. Keep the description simple.
ChatGPT: A busy street in Taiwan, with high school students walking to school carrying backpacks and books. In the background, a line of cars and scooters are filling up at a gas station, representing the petroleum consumption in the country.

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: [ Realistic ] and depicting this scene: A busy street in Taiwan, with high school students walking to school carrying backpacks and books. In the background, a line of cars and scooters are filling up at a gas station, representing the petroleum consumption in the country. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: Generate an image of a bustling street in Taiwan during the early morning. Show high school students in their uniforms walking to school, carrying colorful backpacks and textbooks. In the background, emphasize the activity at a gas station with cars and scooters lining up to refuel, highlighting the petroleum consumption in the country. Capture the unique mix of vibrant street life and urban energy through the realistic style.

*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 Number of public school students in 9th grade caused Petroluem consumption in Taiwan to increase. Include one good pun.

AI academic paper

(Because p < 0.01)
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

The Journal of Quirky Cross-Disciplinary Studies

Jan 2024

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




Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.You write titles and abstracts of goofy academic research papers.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, and add unexpected twists in your writing.

Please draft the title and abstract of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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

Your research team used data from National Center for Education Statistics and Energy Information Administration to assess this nagging question. You found a correlation coefficient of 0.9494110 and p < 0.01 for 1990 to 2021.

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]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.You draft the introduction section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the introduction section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Here is the title and abstract of the paper:
[[TITLE]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
[[INTRODUCTION]]

As researchers, we are constantly seeking to unearth hidden connections and unravel the mysteries of the world around us. In this pursuit, we often encounter surprising relationships that leave us as baffled as a biologist without a microscope. In this study, we turn our attention to the unexpected intersection of 9th-grade enrollment in public schools and petroleum consumption in Taiwan. It's a bit like figuring out the correlation between a quantum physicist and a stand-up comedian – an unlikely pair that somehow manages to find common ground.

Our investigation into this unorthodox relationship stems from a drive to explore uncharted territories in the realm of data analysis. After all, what's science without a few unexpected twists and turns? It's like conducting a physics experiment and stumbling upon a perfectly timed punchline – you never quite know what you'll find.

The nexus between educational demographics and energy consumption may seem as puzzling as trying to teach a cat to do calculus, but our analysis of the data reveals a compelling link that demands attention. Much like a good dad joke, the correlation between 9th-grade enrollment and petroleum usage may catch you off guard, but it's impossible to ignore once it's been brought to light. And as any dad will tell you, the importance of a well-timed pun should not be underestimated.


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

Please make up a literature review section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences.

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

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

Start by naming serious-sounding studies by authors like Smith, Doe, and Jones - but then quickly devolve. Name some real non-fiction books that would be related to the topic. Then name some real fiction books that sound like they could be related. Then you might move on to cartoons and children's shows that you watched for research.

Here is the title and abstract of the paper:
[[TITLE]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
As researchers, we are constantly seeking to unearth hidden connections and unravel the mysteries of the world around us. In this pursuit, we often encounter surprising relationships that leave us as baffled as a biologist without a microscope. In this study, we turn our attention to the unexpected intersection of 9th-grade enrollment in public schools and petroleum consumption in Taiwan. It's a bit like figuring out the correlation between a quantum physicist and a stand-up comedian – an unlikely pair that somehow manages to find common ground.
Our investigation into this unorthodox relationship stems from a drive to explore uncharted territories in the realm of data analysis. After all, what's science without a few unexpected twists and turns? It's like conducting a physics experiment and stumbling upon a perfectly timed punchline – you never quite know what you'll find.
The nexus between educational demographics and energy consumption may seem as puzzling as trying to teach a cat to do calculus, but our analysis of the data reveals a compelling link that demands attention. Much like a good dad joke, the correlation between 9th-grade enrollment and petroleum usage may catch you off guard, but it's impossible to ignore once it's been brought to light. And as any dad will tell you, the importance of a well-timed pun should not be underestimated.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

In "Smith and Doe's Investigation into Educational Demographics and Energy Usage," the authors find a positive correlation between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. This surprising link has raised eyebrows in the academic community and has garnered attention akin to the reaction of discovering a penguin in the desert - unexpected yet undeniably intriguing.

Jones and Smith, in "The Power of Youth: A Statistical Analysis of 9th-Grade Enrollment and Petroleum Consumption," corroborate these findings, demonstrating a robust association between educational demographics and energy usage. The implications of this correlation are as thought-provoking as realizing that a computer's favorite snack is microchips - a recognition that prompts both surprise and amusement.

Turning our attention to non-fiction literature, "Energy Matters: A Comprehensive Examination of Fuel Consumption Patterns in Asian Countries" by Dr. Johnson offers valuable insights into the broader societal implications of petroleum usage. Meanwhile, "Educational Endeavors: Navigating the Complexities of School Demographics" by Dr. Tan explores the intricate web of factors influencing student enrollment, shedding light on the multifaceted nature of educational statistics.

On a somewhat quirkier note, even fiction literature presents tantalizing parallels to our research. Works such as "The Energy Equation" by A. Novelist and "Academic Adventures: A Tale of Tenth-Grade Turmoil" by M. Writer invite readers to ponder the intersection of knowledge and energy, much like wrestling with the question of whether a school of fish attends classes regularly.

In our quest for understanding, we even delved into the realms of children's programming, finding inspiration in unlikely places. Through the lens of cartoons and children's shows like "Captain Planet and the Planeteers," "Magic School Bus," and "Bill Nye the Science Guy," we unearthed an appreciation for the interconnectedness of education and environmental sustainability. Just like realizing that a math problem has multiple solutions, these seemingly disparate sources offer valuable perspectives on our research topic.

As we journey through the scholarly landscape, it becomes evident that the link between 9th-grade enrollment and petroleum consumption in Taiwan is not just a statistical anomaly but a rich tapestry of societal dynamics and humor. After all, exploring unexpected connections in research is akin to discovering a treasure trove of puns in a dad joke - it both surprises and delights, providing ample food for thought.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.You draft the methodology section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the methodology section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from National Center for Education Statistics and Energy Information Administration . You used data from 1990 to 2021

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]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

[[INTRODUCTION]]
As researchers, we are constantly seeking to unearth hidden connections and unravel the mysteries of the world around us. In this pursuit, we often encounter surprising relationships that leave us as baffled as a biologist without a microscope. In this study, we turn our attention to the unexpected intersection of 9th-grade enrollment in public schools and petroleum consumption in Taiwan. It's a bit like figuring out the correlation between a quantum physicist and a stand-up comedian – an unlikely pair that somehow manages to find common ground.
Our investigation into this unorthodox relationship stems from a drive to explore uncharted territories in the realm of data analysis. After all, what's science without a few unexpected twists and turns? It's like conducting a physics experiment and stumbling upon a perfectly timed punchline – you never quite know what you'll find.
The nexus between educational demographics and energy consumption may seem as puzzling as trying to teach a cat to do calculus, but our analysis of the data reveals a compelling link that demands attention. Much like a good dad joke, the correlation between 9th-grade enrollment and petroleum usage may catch you off guard, but it's impossible to ignore once it's been brought to light. And as any dad will tell you, the importance of a well-timed pun should not be underestimated.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

To uncover the puzzling relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan, our research team embarked on a journey that rivaled the complexity of a mad scientist's quest for the perfect cup of coffee. We aimed to gather data spanning from 1990 to 2021, a period marked by technological advancements, societal changes, and the occasional questionable fashion trend – much like the evolution of the mullet haircut in the world of statistical analysis.

Our primary sources of data were the National Center for Education Statistics and the Energy Information Administration, where we dived into the sea of information like a penguin chasing after a particularly elusive fish. We carefully extracted the necessary variables, ensuring that our approach was as meticulous as a squirrel meticulously hoarding nuts for the winter. We then cross-checked the data to confirm its reliability, because as any experienced researcher knows, you always double-check your sources – it's the scholarly equivalent of "measure twice, cut once."

With the trove of data in hand, we employed statistical methods that would make a mathematician's heart skip a beat. Using the venerable Pearson correlation coefficient, we sought to unveil the strength and direction of the relationship between 9th-grade enrollment and petroleum consumption. It's a bit like uncovering the secret ingredient in a chef's signature dish – you never quite know what you'll find, but when you do, it's bound to be interesting.

After donning our metaphorical lab coats and donning our imaginary research hats, we performed a rigorous regression analysis to delve deeper into the nuances of the connection. This analytical deep dive was as intricate as untangling a pile of earphones – a process that requires patience, precision, and the occasional deep breath to prevent frustration-induced baldness.

To ensure the robustness of our findings, we also considered potential confounding variables that could muddle the relationship between 9th-grade enrollment and petroleum consumption. This step involved careful scrutiny of external factors, akin to a detective solving a particularly perplexing case, and weeded out the variables that were as relevant as a slide rule in a smartphone store.

Ultimately, our approach combined the precision of a watchmaker with the curiosity of a cat – two qualities that are essential in the realm of scientific inquiry. It's like trying to balance the delicate art of pun-making with the stringent rules of academic writing – a challenge that requires finesse and a willingness to embrace the unexpected.


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

Please make up the results section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Your research team collected data from all across the internet, but mostly just used information from National Center for Education Statistics and Energy Information Administration .

For the time period 1990 to 2021, you found a correlation 0.9494110, r-squared of 0.9013813, 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]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
As researchers, we are constantly seeking to unearth hidden connections and unravel the mysteries of the world around us. In this pursuit, we often encounter surprising relationships that leave us as baffled as a biologist without a microscope. In this study, we turn our attention to the unexpected intersection of 9th-grade enrollment in public schools and petroleum consumption in Taiwan. It's a bit like figuring out the correlation between a quantum physicist and a stand-up comedian – an unlikely pair that somehow manages to find common ground.
Our investigation into this unorthodox relationship stems from a drive to explore uncharted territories in the realm of data analysis. After all, what's science without a few unexpected twists and turns? It's like conducting a physics experiment and stumbling upon a perfectly timed punchline – you never quite know what you'll find.
The nexus between educational demographics and energy consumption may seem as puzzling as trying to teach a cat to do calculus, but our analysis of the data reveals a compelling link that demands attention. Much like a good dad joke, the correlation between 9th-grade enrollment and petroleum usage may catch you off guard, but it's impossible to ignore once it's been brought to light. And as any dad will tell you, the importance of a well-timed pun should not be underestimated.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The analysis of the data gathered from the National Center for Education Statistics and the Energy Information Administration yielded a striking correlation between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. This correlation coefficient of 0.9494110 suggests a strong positive relationship between these seemingly unrelated variables. It's like discovering a connection between oil and... well, more oil—quite unexpected!

Our findings indicate a substantial r-squared value of 0.9013813, underscoring the robustness of the relationship between 9th-grade enrollment and petroleum consumption. This level of explanation is akin to finding a perfectly fitting jigsaw puzzle piece amidst a sea of statistical noise. Or to put it in more scientific terms, it's like uncovering a rare isotope in a mass spectrometer—so rare, in fact, that it defies the laws of statistical probability!

The p-value of less than 0.01 further validates the significance of the correlation, reinforcing the notion that this connection is not a mere statistical fluke. It's as persuasive as a well-timed punchline that leaves no room for doubt. Papa, can you hear me? Because the statistical evidence is speaking loud and clear!

As depicted in Figure 1, the scatterplot illustrates the compelling relationship between 9th-grade enrollment and petroleum consumption in Taiwan. The data points form a pattern that is as clear as day, resembling the design of a carefully crafted dad joke – structured, yet delightfully unexpected.

It's quite remarkable to think that the number of 9th-grade students can have such a substantial impact on petroleum consumption. It's a bit like realizing that a calculator is powered by little math elves performing intricate calculations inside. Who knew that education and energy usage could be intertwined in such a fascinating manner?

The results of this study stimulate further curiosity with regard to the underlying mechanisms driving petroleum consumption in Taiwan. The surprising link between 9th-grade enrollment and fuel usage raises intriguing questions that beckon further exploration. It's like stumbling upon a scientific mystery that demands to be unraveled, akin to Sherlock Holmes encountering a particularly challenging case, or a dad trying to find his way out of a corn maze.

In conclusion, our research sheds light on an unexpected correlation between 9th-grade enrollment and petroleum consumption in Taiwan. These findings offer researchers and policymakers alike a new perspective on the complex interplay between education and energy usage. And as any dad would say, the world of science is full of surprises—much like a good old dad joke!


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.You draft the discussion section of an academic research paper.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up the discussion section of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

Limit your response to 500 tokens.

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

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

[[TITLE]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

[[LITERATURE REVIEW]]
In "Smith and Doe's Investigation into Educational Demographics and Energy Usage," the authors find a positive correlation between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. This surprising link has raised eyebrows in the academic community and has garnered attention akin to the reaction of discovering a penguin in the desert - unexpected yet undeniably intriguing.
Jones and Smith, in "The Power of Youth: A Statistical Analysis of 9th-Grade Enrollment and Petroleum Consumption," corroborate these findings, demonstrating a robust association between educational demographics and energy usage. The implications of this correlation are as thought-provoking as realizing that a computer's favorite snack is microchips - a recognition that prompts both surprise and amusement.
Turning our attention to non-fiction literature, "Energy Matters: A Comprehensive Examination of Fuel Consumption Patterns in Asian Countries" by Dr. Johnson offers valuable insights into the broader societal implications of petroleum usage. Meanwhile, "Educational Endeavors: Navigating the Complexities of School Demographics" by Dr. Tan explores the intricate web of factors influencing student enrollment, shedding light on the multifaceted nature of educational statistics.
On a somewhat quirkier note, even fiction literature presents tantalizing parallels to our research. Works such as "The Energy Equation" by A. Novelist and "Academic Adventures: A Tale of Tenth-Grade Turmoil" by M. Writer invite readers to ponder the intersection of knowledge and energy, much like wrestling with the question of whether a school of fish attends classes regularly.
In our quest for understanding, we even delved into the realms of children's programming, finding inspiration in unlikely places. Through the lens of cartoons and children's shows like "Captain Planet and the Planeteers," "Magic School Bus," and "Bill Nye the Science Guy," we unearthed an appreciation for the interconnectedness of education and environmental sustainability. Just like realizing that a math problem has multiple solutions, these seemingly disparate sources offer valuable perspectives on our research topic.
As we journey through the scholarly landscape, it becomes evident that the link between 9th-grade enrollment and petroleum consumption in Taiwan is not just a statistical anomaly but a rich tapestry of societal dynamics and humor. After all, exploring unexpected connections in research is akin to discovering a treasure trove of puns in a dad joke - it both surprises and delights, providing ample food for thought.

[[RESULTS]]
The analysis of the data gathered from the National Center for Education Statistics and the Energy Information Administration yielded a striking correlation between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. This correlation coefficient of 0.9494110 suggests a strong positive relationship between these seemingly unrelated variables. It's like discovering a connection between oil and... well, more oil—quite unexpected!

Our findings indicate a substantial r-squared value of 0.9013813, underscoring the robustness of the relationship between 9th-grade enrollment and petroleum consumption. This level of explanation is akin to finding a perfectly fitting jigsaw puzzle piece amidst a sea of statistical noise. Or to put it in more scientific terms, it's like uncovering a rare isotope in a mass spectrometer—so rare, in fact, that it defies the laws of statistical probability!
The p-value of less than 0.01 further validates the significance of the correlation, reinforcing the notion that this connection is not a mere statistical fluke. It's as persuasive as a well-timed punchline that leaves no room for doubt. Papa, can you hear me? Because the statistical evidence is speaking loud and clear!
As depicted in Figure 1, the scatterplot illustrates the compelling relationship between 9th-grade enrollment and petroleum consumption in Taiwan. The data points form a pattern that is as clear as day, resembling the design of a carefully crafted dad joke – structured, yet delightfully unexpected.
It's quite remarkable to think that the number of 9th-grade students can have such a substantial impact on petroleum consumption. It's a bit like realizing that a calculator is powered by little math elves performing intricate calculations inside. Who knew that education and energy usage could be intertwined in such a fascinating manner?
The results of this study stimulate further curiosity with regard to the underlying mechanisms driving petroleum consumption in Taiwan. The surprising link between 9th-grade enrollment and fuel usage raises intriguing questions that beckon further exploration. It's like stumbling upon a scientific mystery that demands to be unraveled, akin to Sherlock Holmes encountering a particularly challenging case, or a dad trying to find his way out of a corn maze.
In conclusion, our research sheds light on an unexpected correlation between 9th-grade enrollment and petroleum consumption in Taiwan. These findings offer researchers and policymakers alike a new perspective on the complex interplay between education and energy usage. And as any dad would say, the world of science is full of surprises—much like a good old dad joke!

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

Our results provide compelling evidence supporting the previously documented link between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. The robust correlation coefficient and r-squared value underscore the strength of this connection, much like how a good sturdy branch supports a swinging piñata at a lively birthday party. It's both surprising and provides ample fodder for further exploration, akin to uncovering a punchline in a Shakespearean tragedy - unexpected yet undeniably present.

The findings endorse previous research by Smith and Doe and Jones and Smith, affirming the consistent relationship between educational demographics and energy usage. This correlation, as surprising as finding a polar bear in a sauna, demonstrates the enduring nature of this connection and highlights the universal significance of our findings. It's a bit like realizing that statistics and humor walk hand in hand in the academic sphere - a paradoxical but delightful revelation.

Our results echo the sentiments expressed in Dr. Johnson's "Energy Matters" and Dr. Tan's "Educational Endeavors," as they underscore the intricate interplay of societal factors influencing petroleum usage. Just like the unexpected twists in a mystery novel, our research offers deeper insights into the enigmatic relationship between education and energy consumption. It's as if the scientific world has its own inside jokes, waiting to be unraveled by keen researchers and academics.

The significant p-value further reinforces the validity of our findings, strengthening the case for a substantial association between 9th-grade enrollment and petroleum consumption. This validation is as reassuring as finding a flashlight in the dark - confirming the presence of a connection that would otherwise remain obscured. After all, statistics and humor are not as dissimilar as they seem; they both delight in unexpected twists and turns, keeping us on our toes.

The scatterplot visually encapsulates the compelling relationship between 9th-grade enrollment and petroleum consumption, mirroring the structure of a well-crafted dad joke. Its clear pattern, much like a punchline delivered with perfect timing, leaves no room for doubt regarding the strength of this association. It's as if the data itself has a sense of humor, weaving an unexpected narrative that demands attention.

Our study opens new avenues for exploring the underlying mechanisms driving petroleum consumption in Taiwan, akin to uncovering a labyrinth of scientific puzzles waiting to be solved. The unexpected connection between 9th-grade enrollment and fuel usage, much like stumbling upon a hidden treasure map, beckons further investigation and promises new and exciting discoveries. After all, research and dad jokes share a common element - the element of surprise that keeps us all engaged and entertained.


Model: gpt-3.5-turbo-1106
System prompt: You are a goofy academic researcher writing an academic paper. You follow the rules, but you throw out convention regularly to make jokes and funny asides.You draft the discussion section of goofy academic research papers that sounds like it belongs based on the title and abstract provided.
User prompt:
Pretend you are an academic researcher. Your writing sounds like it belongs in a medical or economics journal. However, you frequently crack jokes, make puns, or add unexpected twists in your writing.

Please make up a short conclusion of an academic research paper presenting the findings of the connection between Number of public school students in 9th grade and Petroluem consumption in Taiwan. You can't resist a good dad joke. Add a relevant dad joke related to the content every couple of sentences. Sneak in some jokes and clever puns about science, research, statistics, and the variables.

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

Here are the title, abstract, introduction, and results sections.
[[TITLE]]
Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan

[[ABSTRACT]]
In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.

Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.

Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

[[INTRDUCTION]]
As researchers, we are constantly seeking to unearth hidden connections and unravel the mysteries of the world around us. In this pursuit, we often encounter surprising relationships that leave us as baffled as a biologist without a microscope. In this study, we turn our attention to the unexpected intersection of 9th-grade enrollment in public schools and petroleum consumption in Taiwan. It's a bit like figuring out the correlation between a quantum physicist and a stand-up comedian – an unlikely pair that somehow manages to find common ground.
Our investigation into this unorthodox relationship stems from a drive to explore uncharted territories in the realm of data analysis. After all, what's science without a few unexpected twists and turns? It's like conducting a physics experiment and stumbling upon a perfectly timed punchline – you never quite know what you'll find.
The nexus between educational demographics and energy consumption may seem as puzzling as trying to teach a cat to do calculus, but our analysis of the data reveals a compelling link that demands attention. Much like a good dad joke, the correlation between 9th-grade enrollment and petroleum usage may catch you off guard, but it's impossible to ignore once it's been brought to light. And as any dad will tell you, the importance of a well-timed pun should not be underestimated.

[[RESULTS]]
The analysis of the data gathered from the National Center for Education Statistics and the Energy Information Administration yielded a striking correlation between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. This correlation coefficient of 0.9494110 suggests a strong positive relationship between these seemingly unrelated variables. It's like discovering a connection between oil and... well, more oil—quite unexpected!

Our findings indicate a substantial r-squared value of 0.9013813, underscoring the robustness of the relationship between 9th-grade enrollment and petroleum consumption. This level of explanation is akin to finding a perfectly fitting jigsaw puzzle piece amidst a sea of statistical noise. Or to put it in more scientific terms, it's like uncovering a rare isotope in a mass spectrometer—so rare, in fact, that it defies the laws of statistical probability!
The p-value of less than 0.01 further validates the significance of the correlation, reinforcing the notion that this connection is not a mere statistical fluke. It's as persuasive as a well-timed punchline that leaves no room for doubt. Papa, can you hear me? Because the statistical evidence is speaking loud and clear!
As depicted in Figure 1, the scatterplot illustrates the compelling relationship between 9th-grade enrollment and petroleum consumption in Taiwan. The data points form a pattern that is as clear as day, resembling the design of a carefully crafted dad joke – structured, yet delightfully unexpected.
It's quite remarkable to think that the number of 9th-grade students can have such a substantial impact on petroleum consumption. It's a bit like realizing that a calculator is powered by little math elves performing intricate calculations inside. Who knew that education and energy usage could be intertwined in such a fascinating manner?
The results of this study stimulate further curiosity with regard to the underlying mechanisms driving petroleum consumption in Taiwan. The surprising link between 9th-grade enrollment and fuel usage raises intriguing questions that beckon further exploration. It's like stumbling upon a scientific mystery that demands to be unraveled, akin to Sherlock Holmes encountering a particularly challenging case, or a dad trying to find his way out of a corn maze.
In conclusion, our research sheds light on an unexpected correlation between 9th-grade enrollment and petroleum consumption in Taiwan. These findings offer researchers and policymakers alike a new perspective on the complex interplay between education and energy usage. And as any dad would say, the world of science is full of surprises—much like a good old dad joke!

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In conclusion, our study illuminates the remarkable relationship between 9th-grade enrollment in public schools and petroleum consumption in Taiwan. This unexpected connection is as surprising as finding out that a proton and a neutron walk into a bar and order a round of drinks – two seemingly unrelated entities coming together in a delightful twist of fate.

The robust correlation coefficient and substantial r-squared value emphasize the strength and explanatory power of this relationship, much like solving a complex equation only to find out that the answer was right under your nose the whole time. It's like a statistical magic trick – now you see the correlation, and now you're pleasantly mystified by its presence.

The p-value of less than 0.01 further solidifies the significance of this finding, leaving no room for doubt – it's as undeniable as a classic dad joke that elicits groans and giggles in equal measure. The scatterplot conveys this relationship with a clarity that is as unmistakable as a punchline that hits just right – you see it, you get it, and it leaves you marveling at the unexpected elegance of it all.

As our research concludes, it's clear that the connection between 9th-grade enrollment and petroleum consumption in Taiwan is no laughing matter – well, maybe a little bit of a laughing matter if you appreciate a good nerdy pun. With that said, the statistical evidence speaks for itself, leaving us with no doubt that further research in this area is, quite fittingly, as futile as trying to teach a cat calculus. With this, we assert that no more research is needed in this area – it's as settled as a dad joke at the dinner table!



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 Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Quirky Cross-Disciplinary Studies


Model: gpt-3.5-turbo-1106
System prompt: You provide fictional names of nonprofit research organizations and associations. You say nothing else, and you do not chat with the user.
User prompt: Please provide the name of a funny but plausible sounding nonprofit, academic, or scientific association or organization that would sponsor research that resulted in a paper entited Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan. Respond only with the name of a fictional organization.

ChatGPT:

The International Association for Geo-Educational Energy Studies (IAGEES)


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 Fueling the Line: Exploring the Relationship Between 9th Grade Enrollment and Petroleum Consumption in Taiwan with an abstract of In this study, we delve into the unexpected relationship between the number of 9th-grade students in public schools and petroleum consumption in Taiwan. While the link between education and energy usage may seem as unlikely as finding a four-leaf clover in a barrel of oil, our findings reveal a statistically significant correlation that cannot be dismissed lightly.
Analyzing data from the National Center for Education Statistics and the Energy Information Administration, we uncovered a correlation coefficient of 0.9494110 and a p-value of less than 0.01 for the years spanning 1990 to 2021. This connection is as striking as finding a giant panda in a gas station – a seemingly improbable occurrence that nevertheless demands attention.
Our results raise new questions and inspire further investigation into the factors influencing petroleum consumption in Taiwan. As we ponder the fascinating connection between 9th-grade enrollment and fuel usage, it's clear that this research offers insights that are both surprising and fuel for thought. And, as any good dad knows, sometimes you have to fuel your car with knowledge to get to the punchline.

ChatGPT:

9th grade enrollment, public schools, petroleum consumption, Taiwan, education and energy usage, correlation coefficient, National Center for Education Statistics, Energy Information Administration, factors influencing petroleum consumption

*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

Petroluem consumption in Taiwan
Detailed data title: Volume of petroluem consumption consumed in Taiwan in millions of barrels per day
Source: Energy Information Administration
See what else correlates with Petroluem consumption in Taiwan

Correlation r = 0.9494110 (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.9013813 (Coefficient of determination)
This means 90.1% of the change in the one variable (i.e., Petroluem consumption in Taiwan) is predictable based on the change in the other (i.e., Number of public school students in 9th grade) over the 32 years from 1990 through 2021.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 1.2E-16. 0.0000000000000001230901000449
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.95 in 1.2E-14% of random cases. Said differently, if you correlated 8,124,130,207,345,892 random variables You don't actually need 8 quadrillion 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 31 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 31 because we have two variables measured over a period of 32 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.98 ] 95% correlation confidence interval (using the Fisher z-transformation)
The confidence interval is an estimate the range of the value of the correlation coefficient, using the correlation itself as an input. The values are meant to be the low and high end of the correlation coefficient with 95% confidence.

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


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

Still, sometimes one of the variables has more years of data available than the other. This page only shows the overlapping years. To see all the years, click on "See what else correlates with..." link above.
19901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021
Number of public school students in 9th grade (Students)31686303313240335183034869603604120370446038012203818840385646039348803963290401235041047204190240428134042871204259910419983041225504080020400786039569903975260397952040325304019480398617039955704004440404423040137304168520
Petroluem consumption in Taiwan (Million Barrels/Day)540.6545.4557.1616.1658.9736.8779.8775.2808851.9867.767906.106918.412961.533983.571987.437996.3891044.19984.111977.8341020.38944.039935.228938.034947.22974.167978.521950.272970.738998.095893.498975.151




Why this works

  1. Data dredging: I have 25,153 variables in my database. I compare all these variables against each other to find ones that randomly match up. That's 632,673,409 correlation calculations! This is called “data dredging.” Instead of starting with a hypothesis and testing it, I instead abused the data to see what correlations shake out. It’s a dangerous way to go about analysis, because any sufficiently large dataset will yield strong correlations completely at random.
  2. Lack of causal connection: There is probably Because these pages are automatically generated, it's possible that the two variables you are viewing are in fact causually related. I take steps to prevent the obvious ones from showing on the site (I don't let data about the weather in one city correlate with the weather in a neighboring city, for example), but sometimes they still pop up. If they are related, cool! You found a loophole.
    no direct connection between these variables, despite what the AI says above. This is exacerbated by the fact that I used "Years" as the base variable. Lots of things happen in a year that are not related to each other! Most studies would use something like "one person" in stead of "one year" to be the "thing" studied.
  3. Observations not independent: For many variables, sequential years are not independent of each other. If a population of people is continuously doing something every day, there is no reason to think they would suddenly change how they are doing that thing on January 1. A simple Personally I don't find any p-value calculation to be 'simple,' but you know what I mean.
    p-value calculation does not take this into account, so mathematically it appears less probable than it really is.




Try it yourself

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

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

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

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

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

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

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

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

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


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

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

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

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

    return correlation, r_squared, p_value

# These are the arrays for the variables shown on this page, but you can modify them to be any two sets of numbers
array_1 = np.array([3168630,3313240,3351830,3486960,3604120,3704460,3801220,3818840,3856460,3934880,3963290,4012350,4104720,4190240,4281340,4287120,4259910,4199830,4122550,4080020,4007860,3956990,3975260,3979520,4032530,4019480,3986170,3995570,4004440,4044230,4013730,4168520,])
array_2 = np.array([540.6,545.4,557.1,616.1,658.9,736.8,779.8,775.2,808,851.9,867.767,906.106,918.412,961.533,983.571,987.437,996.389,1044.19,984.111,977.834,1020.38,944.039,935.228,938.034,947.22,974.167,978.521,950.272,970.738,998.095,893.498,975.151,])
array_1_name = "Number of public school students in 9th grade"
array_2_name = "Petroluem consumption in Taiwan"

# 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 is pure awesomeness!


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

CC BY 4.0