about · email me · subscribe
Spurious correlation #3,489 · View random

A linear line chart with years as the X-axis and two variables on the Y-axis. The first variable is Google searches for 'elon musk' and the second variable is Sun Life Financial's stock price (SLF).  The chart goes from 2010 to 2023, and the two variables track closely in value over that time. Small Image
Download png
, svg

AI explanation

As the legend of Elon Musk continued to grow, more and more people were inspired to achieve greatness. This led to a surge in productivity and innovation across the board, including at Sun Life Financial. Employees were suddenly coming up with out-of-this-world ideas, and the company's financial performance skyrocketed. It's amazing what a little Musk-mania can do for the stock market!

Model: dalle-3
Prompt: [An image that looks like it is a scene from 'Star Wars'] In the scene, a massive holographic Google search bar, resembling a futuristic control center, looms over a desolate Earth, emitting intense heat waves that distort the landscape. The search bar prominently displays the words "Elon Musk" in bold, glowing letters. In the background, a holographic stock market ticker is visible, showing Sun Life Financial's (SLF) stock price steadily rising, with the numbers illuminated in a stark blue hue. The scene evokes a sense of imminent impact and the intertwining of technological and financial power amidst a planetary crisis. 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: Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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: Surrealism An image that looks like it is a scene from 'Star Wars' Scalar art Data cyber art Cute 2D animation
ChatGPT: An image that looks like it is a scene from 'Star Wars'

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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF), in the following situation: As more people Googled "Elon Musk," the search engine got so much traffic it overheated, causing a temporary global warming. This made investors think of Sun Life Financial as a shady place to invest and stock prices went up!. Keep the description simple.
ChatGPT: In the scene, a giant Google search bar with the words "Elon Musk" written in bold letters is emitting heat waves, causing the Earth to warm up. At the same time, a stock market ticker showing Sun Life Financial's stock price (SLF) is displayed in the background, with the numbers visibly rising as if indicating increased investor interest.

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: [ An image that looks like it is a scene from 'Star Wars' ] and depicting this scene: In the scene, a giant Google search bar with the words "Elon Musk" written in bold letters is emitting heat waves, causing the Earth to warm up. At the same time, a stock market ticker showing Sun Life Financial's stock price (SLF) is displayed in the background, with the numbers visibly rising as if indicating increased investor interest. Keep the visual depiction simple. Do not include any words or speech bubbles.
ChatGPT: [An image that looks like it is a scene from 'Star Wars'] In the scene, a massive holographic Google search bar, resembling a futuristic control center, looms over a desolate Earth, emitting intense heat waves that distort the landscape. The search bar prominently displays the words "Elon Musk" in bold, glowing letters. In the background, a holographic stock market ticker is visible, showing Sun Life Financial's (SLF) stock price steadily rising, with the numbers illuminated in a stark blue hue. The scene evokes a sense of imminent impact and the intertwining of technological and financial power amidst a planetary crisis.

*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 elon musk (Google searches for 'elon musk') caused Sun Life Financial's stock price (SLF) to increase. Make it feel plausible.

AI academic paper

(Because p < 0.01)
Sun Life Financial: Shedding Light on the Elon Musk Effect

The Journal of Financial Illumination

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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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, make it sound serious.

Your research team used data from Google Trends and LSEG Analytics (Refinitiv) to assess this nagging question. You found a correlation coefficient of 0.8985482 and p < 0.01 for 2010 to 2023.

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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

-------

Your response should start like this:

[[INTRODUCTION]]



ChatGPT:
INTRODUCTION

The intersection of technology, finance, and public fascination is a tantalizing ground for exploration. In this study, we endeavor to shed light on the perplexing association between the frequency of Google searches for the enigmatic figure of Elon Musk and the fluctuations in the stock price of Sun Life Financial (SLF). This inquiry is prompted by the compelling link between the whims of public interest and the intricate movements of the financial market.

As researchers, we are often urged to boldly go where no academic has gone before. In this pursuit, we navigated the vast expanse of data obtained from Google Trends and LSEG Analytics (Refinitiv), charting a course through the captivating realm of search queries and stock prices. Our dedication to this endeavor was unwavering, akin to the gravitational pull of a celestial body upon its orbiting satellites.

The statistical analyses conducted on the acquired data unveiled a remarkably high correlation coefficient of 0.8985482 and a p-value less than 0.01 for the extensive period encompassing 2010 to 2023. This revelation led us to ponder the profound implications of this unexpected synergy between the tech titan's virtual presence and the financial performance of an esteemed institution.

It is imperative to acknowledge that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions. However, this unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that warrants meticulous examination. The ramifications of such a connection could potentially disrupt prevailing economic models, akin to a celestial event casting shadows upon customary patterns.

The confluence of scientific inquiry and financial intrigue has yielded fascinating findings, transcending disciplinary boundaries much like a meteor traversing the stratosphere. As we embark upon this scholarly odyssey, we invite the reader to join us in unraveling the enigmatic web of interconnections woven between the domains of public curiosity and market dynamics. This research endeavor promises to illuminate new vistas in the intricate tapestry of the financial world, akin to the emergence of distant stars in the night sky.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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 devolve ever further, and mention something completely ridiculous, like you conducted literature review by reading CVS receipts.

Here is the title and abstract of the paper:
[[TITLE]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

-------

And here is the introduction section that led to this literature review:
[[INTRODUCTION]]
INTRODUCTION
The intersection of technology, finance, and public fascination is a tantalizing ground for exploration. In this study, we endeavor to shed light on the perplexing association between the frequency of Google searches for the enigmatic figure of Elon Musk and the fluctuations in the stock price of Sun Life Financial (SLF). This inquiry is prompted by the compelling link between the whims of public interest and the intricate movements of the financial market.
As researchers, we are often urged to boldly go where no academic has gone before. In this pursuit, we navigated the vast expanse of data obtained from Google Trends and LSEG Analytics (Refinitiv), charting a course through the captivating realm of search queries and stock prices. Our dedication to this endeavor was unwavering, akin to the gravitational pull of a celestial body upon its orbiting satellites.
The statistical analyses conducted on the acquired data unveiled a remarkably high correlation coefficient of 0.8985482 and a p-value less than 0.01 for the extensive period encompassing 2010 to 2023. This revelation led us to ponder the profound implications of this unexpected synergy between the tech titan's virtual presence and the financial performance of an esteemed institution.
It is imperative to acknowledge that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions. However, this unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that warrants meticulous examination. The ramifications of such a connection could potentially disrupt prevailing economic models, akin to a celestial event casting shadows upon customary patterns.
The confluence of scientific inquiry and financial intrigue has yielded fascinating findings, transcending disciplinary boundaries much like a meteor traversing the stratosphere. As we embark upon this scholarly odyssey, we invite the reader to join us in unraveling the enigmatic web of interconnections woven between the domains of public curiosity and market dynamics. This research endeavor promises to illuminate new vistas in the intricate tapestry of the financial world, akin to the emergence of distant stars in the night sky.

-------

Your response should start like this:

[[LITERATURE REVIEW]]



ChatGPT:
[[LITERATURE REVIEW]]

The literature regarding the relationship between online search activity and stock prices encompasses a broad array of methodologies and perspectives. In "Smith et al.," the authors find a positive correlation between consumer online search behavior and subsequent stock market performance. Similarly, "Doe and Jones" demonstrate that search engine query volumes can serve as predictive indicators for stock price movements, particularly in the realm of technology and entrepreneurship.

Expanding beyond academic literature, financial analysts have delved into the intricacies of investor sentiment and its influence on stock prices. "The Intelligent Investor" by Benjamin Graham and "A Random Walk Down Wall Street" by Burton Malkiel offer insights into the complex interplay between public perception and stock market dynamics. Furthermore, fictional works such as "The Wolf of Wall Street" by Jordan Belfort and "Barbarians at the Gate" by Bryan Burrough and John Helyar capture the allure and volatility of financial markets, albeit in an embellished manner.

In an unorthodox twist, the authors also conducted an extensive review of disparate sources, including but not limited to local diner menu descriptions, unused shopping lists, and the margins of hastily discarded newspapers. However, these unconventional sources did not yield relevant insights into the subject matter at hand. Notably, an in-depth analysis of CVS receipts failed to provide substantive evidence of any discernible impact on stock prices emanating from Elon Musk-related queries. As such, their inclusion in this literature review is deemed superfluous, yet amusingly incongruous.

The findings elucidate a rich tapestry of interconnectedness between public intrigue in the enigmatic figure of Elon Musk and the financial performance of an esteemed institution such as Sun Life Financial. However, it is crucial to approach these correlations with appropriate scrutiny, lest one be ensnared in the gravitational pull of spurious conclusions.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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 Google Trends and LSEG Analytics (Refinitiv) . You used data from 2010 to 2023

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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

[[INTRODUCTION]]
INTRODUCTION
The intersection of technology, finance, and public fascination is a tantalizing ground for exploration. In this study, we endeavor to shed light on the perplexing association between the frequency of Google searches for the enigmatic figure of Elon Musk and the fluctuations in the stock price of Sun Life Financial (SLF). This inquiry is prompted by the compelling link between the whims of public interest and the intricate movements of the financial market.
As researchers, we are often urged to boldly go where no academic has gone before. In this pursuit, we navigated the vast expanse of data obtained from Google Trends and LSEG Analytics (Refinitiv), charting a course through the captivating realm of search queries and stock prices. Our dedication to this endeavor was unwavering, akin to the gravitational pull of a celestial body upon its orbiting satellites.
The statistical analyses conducted on the acquired data unveiled a remarkably high correlation coefficient of 0.8985482 and a p-value less than 0.01 for the extensive period encompassing 2010 to 2023. This revelation led us to ponder the profound implications of this unexpected synergy between the tech titan's virtual presence and the financial performance of an esteemed institution.
It is imperative to acknowledge that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions. However, this unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that warrants meticulous examination. The ramifications of such a connection could potentially disrupt prevailing economic models, akin to a celestial event casting shadows upon customary patterns.
The confluence of scientific inquiry and financial intrigue has yielded fascinating findings, transcending disciplinary boundaries much like a meteor traversing the stratosphere. As we embark upon this scholarly odyssey, we invite the reader to join us in unraveling the enigmatic web of interconnections woven between the domains of public curiosity and market dynamics. This research endeavor promises to illuminate new vistas in the intricate tapestry of the financial world, akin to the emergence of distant stars in the night sky.

-------

Your response should start like this:

[[METHODOLOGY]]



ChatGPT:

[[METHODOLOGY]]

Data Collection:
The data collection process resembled a synchronized dance between the cybernetic domain of Google Trends and the labyrinthine corridors of LSEG Analytics (Refinitiv). Like intrepid spelunkers, we delved into the digital archives spanning the years 2010 to 2023, extracting nuggets of information pertaining to the frequency of Google searches for the enigmatic Elon Musk and the undulating stock price of our subject of interest, Sun Life Financial (SLF).

Variables:
The main independent variable in this study was the volume of Google searches for "Elon Musk," capturing the ebb and flow of public intrigue surrounding the illustrious tech entrepreneur. Meanwhile, the stock price of Sun Life Financial (SLF) served as the dependent variable, swaying in response to the capricious winds of market dynamics.

Computation of Pearson Correlation Coefficient:
To quantify the relationship between these esoteric variables, we invoked the venerable Pearson correlation coefficient, symbolized by the steadfast letter "r." This stalwart statistic dutifully provided insights into the degree of linear association between the search frequency for Elon Musk and the stock price of Sun Life Financial. The correlation coefficient was then subjected to a thorough examination, akin to scrutinizing the alignment of celestial bodies in the cosmic expanse.

Statistical Analyses:
The computation of the correlation coefficient was supplemented by a systematic assessment of its statistical significance, as denoted by the relentless p-value. This endeavor, akin to unraveling the enigmatic properties of quantum particles, allowed us to discern the likelihood of observing such a strong correlation purely by chance. Through these statistical exercises, we sought to unveil the intricate interplay between the virtual musings on Elon Musk and the material repercussions on the stock valuation of Sun Life Financial.

Data Treatment:
In order to ensure the robustness of our findings, the data was subjected to rigorous cleansing and harmonization processes. Outliers were gently nudged into conformity, akin to shepherding wayward constellations back into celestial alignment, to prevent undue influence on the calculated relationships. Furthermore, missing data points were cozily imputed using the tender embrace of interpolation techniques, imbuing our analyses with a comprehensive portrayal of the intended associations.

Limitations:
It is crucial to acknowledge the constraints of this study, akin to recognizing the boundaries of a black hole's event horizon. The reliance on publicly available data and the indirect nature of the relationship under investigation may introduce confounding factors not accounted for in our research design. Additionally, the presence of unobserved variables looming in the digital ether may cast shadows upon the veracity of our findings.

In conclusion, the methodological journey embarked upon in this study entailed a harmonious blend of data spelunking, statistical scrutiny, and cautious interpretation, each step akin to a cosmic ballet in pursuit of understanding the perplexing interplay between the cybernetic manifestations of public curiosity and the tangible dynamics of financial markets.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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 Google Trends and LSEG Analytics (Refinitiv) .

For the time period 2010 to 2023, you found a correlation 0.8985482, r-squared of 0.8073890, 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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

-------

And here is the methodology section that led to this result:
[[METHODOLOGY]]
INTRODUCTION
The intersection of technology, finance, and public fascination is a tantalizing ground for exploration. In this study, we endeavor to shed light on the perplexing association between the frequency of Google searches for the enigmatic figure of Elon Musk and the fluctuations in the stock price of Sun Life Financial (SLF). This inquiry is prompted by the compelling link between the whims of public interest and the intricate movements of the financial market.
As researchers, we are often urged to boldly go where no academic has gone before. In this pursuit, we navigated the vast expanse of data obtained from Google Trends and LSEG Analytics (Refinitiv), charting a course through the captivating realm of search queries and stock prices. Our dedication to this endeavor was unwavering, akin to the gravitational pull of a celestial body upon its orbiting satellites.
The statistical analyses conducted on the acquired data unveiled a remarkably high correlation coefficient of 0.8985482 and a p-value less than 0.01 for the extensive period encompassing 2010 to 2023. This revelation led us to ponder the profound implications of this unexpected synergy between the tech titan's virtual presence and the financial performance of an esteemed institution.
It is imperative to acknowledge that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions. However, this unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that warrants meticulous examination. The ramifications of such a connection could potentially disrupt prevailing economic models, akin to a celestial event casting shadows upon customary patterns.
The confluence of scientific inquiry and financial intrigue has yielded fascinating findings, transcending disciplinary boundaries much like a meteor traversing the stratosphere. As we embark upon this scholarly odyssey, we invite the reader to join us in unraveling the enigmatic web of interconnections woven between the domains of public curiosity and market dynamics. This research endeavor promises to illuminate new vistas in the intricate tapestry of the financial world, akin to the emergence of distant stars in the night sky.

-------

Your response should start like this:

[[RESULTS]]



ChatGPT:

[[RESULTS]]

The statistical analysis revealed a substantial correlation between Google searches for Elon Musk and Sun Life Financial's stock price (SLF) during the time period from 2010 to 2023. The obtained correlation coefficient of 0.8985482 depicts a striking relationship between the frequency of virtual inquiries about the renowned entrepreneur and the financial performance of the esteemed institution. This correlation coefficient signifies a robust association that beckons exploration, much like a fascinating discovery awaiting detailed scrutiny.

The coefficient of determination (r-squared) of 0.8073890 further accentuates the depth of this relationship, implying that approximately 80.7% of the variability in Sun Life Financial's stock price can be explained by the fluctuations in Google searches for Elon Musk. This finding illuminates the substantial influence that public interest in the enigmatic figure of Elon Musk exerts on the dynamics of the stock market, presenting a captivating enigma reminiscent of unraveling the celestial movements within the vast cosmos.

The reached significance level (p < 0.01) underscores the reliability of this association, substantiating the statistical robustness of the observed link between virtual curiosity and financial performance. This notable significance level bolsters the credibility of the established connection, akin to the sturdy pillars supporting a grand academic edifice.

The scatterplot (Fig. 1) visually encapsulates the strong positive correlation, portraying the cohesive pattern between the frequency of Google searches for Elon Musk and the corresponding fluctuations in Sun Life Financial's stock price. This graphical representation emblemizes the interwoven nature of these variables, as their affinity is depicted with vivid clarity, much like the harmonious dance of celestial bodies across the expanse of the night sky.

These results present a thought-provoking juncture that calls for deeper contemplation. The perplexing link uncovered between public interest in a prominent innovator and the financial performance of a distinguished institution invites further scrutiny into the intricate interplay of virtual curiosity and market dynamics. The implications of these findings transcend the traditional boundaries of academic inquiry, beckoning researchers and practitioners alike to embark upon a scholarly odyssey into the realm of virtual fascination and economic influence.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

[[LITERATURE REVIEW]]
The literature regarding the relationship between online search activity and stock prices encompasses a broad array of methodologies and perspectives. In "Smith et al.," the authors find a positive correlation between consumer online search behavior and subsequent stock market performance. Similarly, "Doe and Jones" demonstrate that search engine query volumes can serve as predictive indicators for stock price movements, particularly in the realm of technology and entrepreneurship.
Expanding beyond academic literature, financial analysts have delved into the intricacies of investor sentiment and its influence on stock prices. "The Intelligent Investor" by Benjamin Graham and "A Random Walk Down Wall Street" by Burton Malkiel offer insights into the complex interplay between public perception and stock market dynamics. Furthermore, fictional works such as "The Wolf of Wall Street" by Jordan Belfort and "Barbarians at the Gate" by Bryan Burrough and John Helyar capture the allure and volatility of financial markets, albeit in an embellished manner.
In an unorthodox twist, the authors also conducted an extensive review of disparate sources, including but not limited to local diner menu descriptions, unused shopping lists, and the margins of hastily discarded newspapers. However, these unconventional sources did not yield relevant insights into the subject matter at hand. Notably, an in-depth analysis of CVS receipts failed to provide substantive evidence of any discernible impact on stock prices emanating from Elon Musk-related queries. As such, their inclusion in this literature review is deemed superfluous, yet amusingly incongruous.
The findings elucidate a rich tapestry of interconnectedness between public intrigue in the enigmatic figure of Elon Musk and the financial performance of an esteemed institution such as Sun Life Financial. However, it is crucial to approach these correlations with appropriate scrutiny, lest one be ensnared in the gravitational pull of spurious conclusions.

[[RESULTS]]
The statistical analysis revealed a substantial correlation between Google searches for Elon Musk and Sun Life Financial's stock price (SLF) during the time period from 2010 to 2023. The obtained correlation coefficient of 0.8985482 depicts a striking relationship between the frequency of virtual inquiries about the renowned entrepreneur and the financial performance of the esteemed institution. This correlation coefficient signifies a robust association that beckons exploration, much like a fascinating discovery awaiting detailed scrutiny.
The coefficient of determination (r-squared) of 0.8073890 further accentuates the depth of this relationship, implying that approximately 80.7% of the variability in Sun Life Financial's stock price can be explained by the fluctuations in Google searches for Elon Musk. This finding illuminates the substantial influence that public interest in the enigmatic figure of Elon Musk exerts on the dynamics of the stock market, presenting a captivating enigma reminiscent of unraveling the celestial movements within the vast cosmos.
The reached significance level (p < 0.01) underscores the reliability of this association, substantiating the statistical robustness of the observed link between virtual curiosity and financial performance. This notable significance level bolsters the credibility of the established connection, akin to the sturdy pillars supporting a grand academic edifice.
The scatterplot (Fig. 1) visually encapsulates the strong positive correlation, portraying the cohesive pattern between the frequency of Google searches for Elon Musk and the corresponding fluctuations in Sun Life Financial's stock price. This graphical representation emblemizes the interwoven nature of these variables, as their affinity is depicted with vivid clarity, much like the harmonious dance of celestial bodies across the expanse of the night sky.
These results present a thought-provoking juncture that calls for deeper contemplation. The perplexing link uncovered between public interest in a prominent innovator and the financial performance of a distinguished institution invites further scrutiny into the intricate interplay of virtual curiosity and market dynamics. The implications of these findings transcend the traditional boundaries of academic inquiry, beckoning researchers and practitioners alike to embark upon a scholarly odyssey into the realm of virtual fascination and economic influence.

-------

Your response should start like this:

[[DISCUSSION]]



ChatGPT:

[[DISCUSSION]]

The obtained findings substantiate and extend prior research that has explored the curious nexus between online search behavior and stock market dynamics. The substantial correlation coefficient of 0.8985482 fortifies the body of evidence supporting the influence of virtual inquiries about prominent individuals on financial markets. This robust association provides empirical validation for the speculative musings put forth in fictional works such as "The Wolf of Wall Street," thus underscoring the enduring relevance of these literary expressions in capturing the captivating enigma of market movements. The unexpected depth of this relationship between Google searches for Elon Musk and Sun Life Financial's stock price (SLF) breathes new life into the underexplored realm of virtual curiosity and its tangible impact on economic entities. It is as if the gravitational pull of public intrigue has transcended the digital domain, exerting palpable effects on the financial cosmos much like the unseen forces shaping the destiny of celestial bodies.

Moreover, the coefficient of determination (r-squared) of 0.8073890 sheds further light on the magnitude of influence wielded by virtual curiosity, akin to the luminescent glow emanating from a celestial body in the night sky, illuminating the hitherto obscured interplay between public interest and financial performance. This substantial explanatory power reinforces the notion that fluctuations in Google searches for Elon Musk have a discernible impact on the variability of Sun Life Financial's stock price, akin to the intricate interdependencies governing the rhythms of celestial movements. The certainty attendant to the reached significance level (p < 0.01) accentuates the reliability of this link, reminiscent of the unyielding constancy of natural laws governing the cosmos.

The visual representation of the strong positive correlation through the scatterplot further underscores the cogent relationship between virtual inquiries and financial performance. This graphical depiction encapsulates the intertwined nature of these variables, as their synergy is portrayed with captivating lucidity, much like the dance of celestial bodies across the expanse of the night sky. Thus, the findings not only deepen our understanding of the interrelation between public fascination and economic ramifications but also evoke a sense of awe akin to the wonderment elicited by celestial phenomena.

In sum, this study sheds light on a hitherto uncharted territory–the interplay of virtual curiosity and financial markets. The unexpected intertwining of Google searches for Elon Musk and Sun Life Financial's stock price not only reinforces prior research but also beckons researchers to carve out new paths of inquiry into the enthralling realm of market dynamics and virtual intrigue. Just as astronomers eagerly explore the cosmic mysteries, financial researchers are poised to embark on a scholarly odyssey into the captivating tapestry of virtual fascination and its profound influence on economic entities.


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 Google searches for 'elon musk' and Sun Life Financial's stock price (SLF). 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]]
"Sun Life Financial: Shedding Light on the Elon Musk Effect"

[[ABSTRACT]]
This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

[[INTRDUCTION]]
INTRODUCTION
The intersection of technology, finance, and public fascination is a tantalizing ground for exploration. In this study, we endeavor to shed light on the perplexing association between the frequency of Google searches for the enigmatic figure of Elon Musk and the fluctuations in the stock price of Sun Life Financial (SLF). This inquiry is prompted by the compelling link between the whims of public interest and the intricate movements of the financial market.
As researchers, we are often urged to boldly go where no academic has gone before. In this pursuit, we navigated the vast expanse of data obtained from Google Trends and LSEG Analytics (Refinitiv), charting a course through the captivating realm of search queries and stock prices. Our dedication to this endeavor was unwavering, akin to the gravitational pull of a celestial body upon its orbiting satellites.
The statistical analyses conducted on the acquired data unveiled a remarkably high correlation coefficient of 0.8985482 and a p-value less than 0.01 for the extensive period encompassing 2010 to 2023. This revelation led us to ponder the profound implications of this unexpected synergy between the tech titan's virtual presence and the financial performance of an esteemed institution.
It is imperative to acknowledge that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions. However, this unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that warrants meticulous examination. The ramifications of such a connection could potentially disrupt prevailing economic models, akin to a celestial event casting shadows upon customary patterns.
The confluence of scientific inquiry and financial intrigue has yielded fascinating findings, transcending disciplinary boundaries much like a meteor traversing the stratosphere. As we embark upon this scholarly odyssey, we invite the reader to join us in unraveling the enigmatic web of interconnections woven between the domains of public curiosity and market dynamics. This research endeavor promises to illuminate new vistas in the intricate tapestry of the financial world, akin to the emergence of distant stars in the night sky.

[[RESULTS]]
The statistical analysis revealed a substantial correlation between Google searches for Elon Musk and Sun Life Financial's stock price (SLF) during the time period from 2010 to 2023. The obtained correlation coefficient of 0.8985482 depicts a striking relationship between the frequency of virtual inquiries about the renowned entrepreneur and the financial performance of the esteemed institution. This correlation coefficient signifies a robust association that beckons exploration, much like a fascinating discovery awaiting detailed scrutiny.
The coefficient of determination (r-squared) of 0.8073890 further accentuates the depth of this relationship, implying that approximately 80.7% of the variability in Sun Life Financial's stock price can be explained by the fluctuations in Google searches for Elon Musk. This finding illuminates the substantial influence that public interest in the enigmatic figure of Elon Musk exerts on the dynamics of the stock market, presenting a captivating enigma reminiscent of unraveling the celestial movements within the vast cosmos.
The reached significance level (p < 0.01) underscores the reliability of this association, substantiating the statistical robustness of the observed link between virtual curiosity and financial performance. This notable significance level bolsters the credibility of the established connection, akin to the sturdy pillars supporting a grand academic edifice.
The scatterplot (Fig. 1) visually encapsulates the strong positive correlation, portraying the cohesive pattern between the frequency of Google searches for Elon Musk and the corresponding fluctuations in Sun Life Financial's stock price. This graphical representation emblemizes the interwoven nature of these variables, as their affinity is depicted with vivid clarity, much like the harmonious dance of celestial bodies across the expanse of the night sky.
These results present a thought-provoking juncture that calls for deeper contemplation. The perplexing link uncovered between public interest in a prominent innovator and the financial performance of a distinguished institution invites further scrutiny into the intricate interplay of virtual curiosity and market dynamics. The implications of these findings transcend the traditional boundaries of academic inquiry, beckoning researchers and practitioners alike to embark upon a scholarly odyssey into the realm of virtual fascination and economic influence.

-------

Your response should start like this:

[[CONCLUSION]]



ChatGPT:

[[CONCLUSION]]

In conclusion, the findings of this study unveil a captivating conundrum regarding the remarkable relationship between the frequency of Google searches for the enigmatic Elon Musk and the fluctuation in Sun Life Financial's stock price. The substantial correlation coefficient and high significance level of this association signify an intriguing interplay, akin to the enthralling movements of celestial bodies within the vast cosmos.

The coefficient of determination offers a glimpse into the substantial influence of public interest in Elon Musk, illuminating approximately 80.7% of the variability in Sun Life Financial's stock price. This revelation echoes the captivating enigma of unraveling the celestial movements within the night sky, akin to embarking on a scholarly journey through the intricate tapestry of financial dynamics.

The notable significance level underlines the robustness of this connection, akin to the sturdy pillars supporting a grand academic edifice. The scatterplot vividly portrays the cohesive pattern between the frequency of Google searches for Elon Musk and the corresponding fluctuations in Sun Life Financial's stock price, much like the harmonious dance of celestial bodies across the expanse of the night sky.

This unforeseen intertwining of search queries for Elon Musk and the stock price of Sun Life Financial presents a riveting conundrum that beckons meticulous examination. However, it is imperative to underscore that correlation does not imply causation, lest we succumb to the gravity of hasty conclusions.

In light of these intriguing findings, further research could delve into the underlying psychological and behavioral factors driving the pronounced connection between virtual fascination and market dynamics. However, one could argue that no further inquiry may be needed in this area, as we have shed considerable light on this curious correlation and its implications for the financial world.


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 Sun Life Financial: Shedding Light on the Elon Musk Effect. Respond only with the name of a fictional academic journal.

ChatGPT:

The Journal of Financial Illumination


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 Sun Life Financial: Shedding Light on the Elon Musk Effect. Respond only with the name of a fictional organization.

ChatGPT:

The Society for Advancement of Solar Economics and Innovation (SASEI)


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 Sun Life Financial: Shedding Light on the Elon Musk Effect with an abstract of This study examines the relationship between Google searches for Elon Musk and the stock price of Sun Life Financial (SLF). The research team utilized data from Google Trends and LSEG Analytics (Refinitiv) to assess this inquiry. The findings revealed a remarkably high correlation coefficient of 0.8985482 and p < 0.01 for the period spanning 2010 to 2023. The implications of this unexpected link between an entrepreneurial tech icon and the financial market are discussed, offering insights into how the whims of public interest may influence stock performance.

ChatGPT:

Google searches, Elon Musk, stock price, Sun Life Financial, SLF, correlation, Google Trends, LSEG Analytics, Refinitiv, entrepreneurial tech icon, financial market, public interest, stock performance

*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

Google searches for 'elon musk'
Detailed data title: Relative volume of Google searches for 'elon musk' (Worldwide, without quotes)
Source: Google Trends
Additional Info: Relative search volume (not absolute numbers)

See what else correlates with Google searches for 'elon musk'

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

See what else correlates with Sun Life Financial's stock price (SLF)

Correlation r = 0.8985482 (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.8073890 (Coefficient of determination)
This means 80.7% of the change in the one variable (i.e., Sun Life Financial's stock price (SLF)) is predictable based on the change in the other (i.e., Google searches for 'elon musk') over the 14 years from 2010 through 2023.

p < 0.01, which is statistically significant(Null hypothesis significance test)
The p-value is 1.3E-5. 0.0000126098418045333380000000
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.9 in 0.0013% of random cases. Said differently, if you correlated 79,303 random variables You don't actually need 79 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 13 degrees of freedom, Degrees of freedom is a measure of how many free components we are testing. In this case it is 13 because we have two variables measured over a period of 14 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.7, 0.97 ] 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.
20102011201220132014201520162017201820192020202120222023
Google searches for 'elon musk' (Rel. search volume)1011.7523.833334.66667815.7510.333322.333331.833342.916727
Sun Life Financial's stock price (SLF) (Stock price)29.1630.3119.0827.1135.2536.0330.638.6741.4732.8645.7844.8556.0246.26




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([1,0,1,1.75,2,3.83333,4.66667,8,15.75,10.3333,22.3333,31.8333,42.9167,27,])
array_2 = np.array([29.16,30.31,19.08,27.11,35.25,36.03,30.6,38.67,41.47,32.86,45.78,44.85,56.02,46.26,])
array_1_name = "Google searches for 'elon musk'"
array_2_name = "Sun Life Financial's stock price (SLF)"

# 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?

Big thanks for reviewing!


Correlation ID: 3489 · Black Variable ID: 1502 · Red Variable ID: 1840
about · subscribe · emailme@tylervigen.com · twitter

CC BY 4.0