<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Julien Emery on Medium]]></title>
        <description><![CDATA[Stories by Julien Emery on Medium]]></description>
        <link>https://medium.com/@jul.emery_8566?source=rss-f3ec3ae3ea61------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eXYWZUhp44qHDw938JV-ow@2x.jpeg</url>
            <title>Stories by Julien Emery on Medium</title>
            <link>https://medium.com/@jul.emery_8566?source=rss-f3ec3ae3ea61------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:48:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jul.emery_8566/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why you should get started with investing]]></title>
            <link>https://medium.com/@jul.emery_8566/why-you-should-get-started-with-investing-366f95cf0b54?source=rss-f3ec3ae3ea61------2</link>
            <guid isPermaLink="false">https://medium.com/p/366f95cf0b54</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Julien Emery]]></dc:creator>
            <pubDate>Thu, 02 May 2019 06:32:09 GMT</pubDate>
            <atom:updated>2019-05-02T15:38:18.457Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you are a student/fresher, it&#39;s even more important that you read this article!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*x2juQl4UFcHoo5nUDmSKCw.jpeg" /></figure><h3>A bit of context</h3><p>As a student who barely finished his/her studies and found a job, the last thing you want to think about is probably setting your financial plans for the next 30 years. However, this is actually one of the first things you should think about, you just don’t know it yet. Don’t worry, I was exactly in the same situation a couple of months ago, and I am going to tell you everything I wish I knew at that time. But first, let me tell you how everything started.</p><p>I officially started to work and earn money in June 2018. You will not be surprised to hear that, as a fresher, I have spent most of the money that I earned; however, I still managed to make some savings. As my bank account balance was progressively increasing, a question naturally came to my mind: “what should I do with my savings?” After some research, I came to realise that my money was actually depreciating over time in the bank account. This statement might seem questionable at first glance, but I am going to elaborate on that in a bit. My research also revealed that I would be better off investing some of my money, namely, allocate it with the expectation of obtaining an additional income.</p><p>As a result of my research, I officially started to invest in March 2019. Throughout this article, I am going to tell you everything about the reasons that pushed me to take the most reasonable decision that a student could possibly make.</p><h3>Money depreciates over time in the bank!</h3><p>Let’s say that I have $1000 in a savings account that pays a 1% <a href="https://www.ally.com/do-it-right/banking/how-is-annual-percentage-yield-calculated/">Annual Percentage Yield (APD)</a>. Next year, I will have $1010 in my savings account. Well, at first glance, it sounds like I have made some profit. However, I have not yet taken into account the inflation rate. For those who are unfamiliar with the term inflation rate, it is actually the increase in the prices of goods and services over time. You are probably wondering what this has to do with the money that is in my bank account. Hold on a minute, I am getting there.</p><p>Since the US inflation rate is forecasted to be about 2% in 2020, I would need $1020, or 20$ more in my bank account to have the same buying power that I had in 2019. Thus, the 1%, or 10$ return generated by my savings account is not enough to cope with inflation. And as long as the returns paid by the savings account will not grow at the same rate as inflation, my savings will keep depreciating over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*1Qi1nX0DC9_nBCazDVbl_w.png" /><figcaption>Projected annual inflation rate in the United States 2010–2023, Statista 2019</figcaption></figure><p>According to the Federal Deposit Insurance Corporation (FDIC), the national average interest rate on savings accounts currently stands at 0.09%, which is much lower than the 1% APD that I took as an example. Therefore, it is very likely that the money in your savings account is depreciating even more through inflation.</p><h3>Invest savings</h3><p>It now seems clear that I need to take some of my money away from the bank account. However, I still need to keep some money in the bank to pay for daily expenses and maintain an emergency fund. In fact, money that I will need in the short term should be in a very safe place that is easy to access. I also want to emphasize that students should prioritise paying off any high interest student loan debt before investing money.</p><p>This begs the question of where I should invest my money to avoid the depreciation that comes from inflation and meet my long-term financial goals. In fact, a couple of options are offered to me: stock market, real estate, retirement account, high-yield savings account, certificates of deposit and so on.</p><p>For simplicity reasons, we will take the example of what is considered to be the most beneficial place to invest money: the stock market. Remember, the objective of this article is to make you realise how much money you are losing by not investing. A more thorough analysis of the different options to invest will be conducted in the next article.</p><h3>One option among many: invest in the stock market</h3><p>It is fair to say that investing in the stock market is a risk, especially as a beginner, since investing poorly might lead to significant losses. The fear of losing money, in addition to the complexity of getting started with investing, explain why so many people, including myself, have never taken the plunge. However, after some research, I realized that all my assumptions about investing in the stock market were actually wrong.</p><p>What if I tell you that there is an easy, hands-off, diversified, and low-cost way to invest in the stock market? Such a solution really exists and it is called an index fund. When you buy an index fund, you actually get a selection of many stocks in one package without having to purchase each individually. An index fund is designed to track a specific stock index such as the <a href="https://www.investopedia.com/terms/s/sp500.asp">S&amp;P 500</a>, which is a basket of 500 of the largest U.S. stocks (Apple, Facebook, Microsoft, JP Morgan etc.), weighted by market capitalization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktGrsRkOJXWZ16oNsn88Bg.png" /><figcaption>Go to this <a href="https://finviz.com/map.ashx?fbclid=IwAR191Hkz6fC22nDiPtIj6mkkmpImDlnF6JPX28MuTN8BQ0m0WZWYbsd-q5o">link</a> if you want to get the complete list of all S&amp;P 500 stocks categorised by sectors and industries</figcaption></figure><p>I am taking the example of the S&amp;P 500 because it represents about 80% of the total value of the U.S. stock market, which makes it a very good indicator of movement in the stock market as a whole. I am not suggesting that the S&amp;P 500 is the best index to invest in; for now, I just want you to get a rough idea of how much returns can be expected when investing in the stock market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTnRuKR0q5N8yHg92Tva8A.png" /><figcaption><a href="https://www.macrotrends.net/2526/sp-500-historical-annual-returns">S&amp;P 500 annual return in the last 30 years</a> (average 9%)</figcaption></figure><p>Although the stock market has its highs and lows, it&#39;s easy to see that the S&amp;P 500 index shows a positive trend in the long run, which makes it a good low-risk investment opportunity. In fact, over the entire timeframe, the S&amp;P 500 has returned an average of about 10.0% per year.</p><p>Let’s say that I invest my 1000$ in an S&amp;P 500 index fund, assuming the S&amp;P 500 returns an average of 10% this year, as it has historically, these 1000$ could be worth 1100$ at the end of the year. This is not only much higher than the 1010$ generated by a savings account, but this is also higher than the buying power I had in 2019. In fact, a 10% return is 10 times bigger than the 1% return paid by my savings account and 5 times bigger than the forecasted inflation rate of 2%.</p><p>I hope you now start to understand how much money you lose by NOT investing. If you are still not convinced, be patient, the real power of investing is yet to come.</p><h3>Compounding: “the most powerful force in the universe” according to Albert Einstein</h3><p>Let us recapitulate: last year, I invested my $1000 in an S&amp;P 500 index fund and I am now left with $1100 in my account. Now let’s say that I can’t contribute anything this year, but I still earn the same 10% return. Well, instead of $100, I will actually earn $110 because the 10% return now applies to my new balance, $1100.</p><p>Impressive, isn&#39;t it? This is the power of <a href="https://www.investopedia.com/terms/c/compoundinterest.asp">compound interest</a>. I am basically earning interest income on my interest income. And the longer I will expose my money to the power of compound interest, the more returns I will make eventually. In fact, assuming the S&amp;P 500 keeps returning an average of 10% per year, I would accumulate about $2600 in 10 years, $6700 in 20 years, and $17500 in 30 years. You can see that without doing anything, my money keeps growing exponentially all on its own. I hope you now realize the importance of starting to invest as EARLY as possible. As students/freshers who have our whole life ahead of us, we have the opportunity to set longer-term financial goals and get the most out of the power of compound interest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUHLYs7kvLAXhXmLEkuLMA.png" /><figcaption>The power of compound interest, assuming a yearly return of 10%</figcaption></figure><p>Some of you are probably thinking that earning $18,000 in 30 years is not a big deal. Well, you are right. But don’t forget that this is the money I would make if I don’t contribute anything during the 29 years following the first year. Now imagine that I reinvest $1,000 every year (about $80 per month), I would actually make about $20,000 in 10 years, $70,000 in 20 years and $200,000 in 30 years. Are the numbers now big enough for you? They would be obviously bigger if you invest more money every year. However, I am trying to show here that making high returns is accessible to all. It is fair to say that most of us spend at least $80 per month on something we don’t really need, and we can see that the opportunity cost, which is the cost of a missed opportunity, is extremely high.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zMHBQxcu8ghsqgAL_88Dbw.png" /><figcaption>Investing often significantly increases returns!</figcaption></figure><h3>Dividends also make a difference!</h3><p>It is also important to emphasise that some stocks pay <a href="https://www.investopedia.com/terms/d/dividend.asp">dividends</a>, which are payments made by a company to owners of the company’s stock. For example, the dividend yield for the S&amp;P 500 is currently about 2%, which is below the historical average of 4.41%. Therefore, the $1,000 that I invested in an S&amp;P 500 index fund will also return 2% of $1000, or $20 as a dividend at the end of the year. These $20 add up to my $1,100, which makes a total of $1,120.</p><p>If you think that this 2% yearly additional return doesn’t make a big difference, then you again underestimate the power of compound interest. If we go back to our previous example, an average return of 12% per year (instead of 10%) would generate about $23,000 in 10 years (instead of $20,000), $90,000 in 20 years (instead of $70.000) and $300,000 in 30 years (instead of $200,000).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CowdgdJHis0J8SXds53olg.png" /><figcaption>Dividends make a difference!</figcaption></figure><p>As you can see, dividends provide investors with another opportunity to take advantage of the power of compounding. This obviously assumes that dividends are reinvested every year. However, you should be aware that dividends are normally received as a check or a direct deposit into the bank account. If you want your dividends to be automatically reinvested, you need to set up a <a href="https://www.investopedia.com/terms/d/dividendreinvestmentplan.asp">Dividend Reinvestment Plan (DRIP)</a>. You should not worry too much about that for now, since most brokers will give you the option to reinvest your dividends.</p><h3>Investing for the LONG TERM yields results</h3><p>All the calculations above are based on the assumption that the S&amp;P 500 returns an average of about 10.0% per year. Keep in mind that this number can be very misleading. Don&#39;t think that it is as simple as investing money in the S&amp;P 500 Index and watch it double about every 10 years. The S&amp;P 500 will surely not return 10% every year during the next 30 years. In fact, some years might show higher returns, while some others might show lower returns. Some years might even show negative returns. How likely is that? Well, over the last 80 years, only two decades showed negative returns for the S&amp;P 500 , and the negative annual return was a loss of less than 1.0%. It is also worth noticing that the stock market is cyclical and it has always recovered from such losses, even though it might take some time to do so.</p><p>It is crucial that you hold your investments for ten, twenty or even 30 years. It is actually over these longer periods of time that the value of investments has historically increased. Part of the reason for this is that even if short-term stock market fluctuations seem random, the stock market tends to reflect the overall growth of the economy in the long term.</p><p>Thus, the longer the period, the more confident you can be that the S&amp;P 500 will return an average of about 10% every year, as it has historically. Make sure that you don’t invest money you will need in the next few years. Otherwise, you will be likely to panic when a stock’s value drops and you will end up selling. If you sell when prices are low, you may lose some of the money that you initially invested. Hence, the best strategy in this situation is to hold your investments and let the stock prices recover over time. You might even want to avoid watching the stock market so that you are not tempted to pull out your money whenever the market looks bad.</p><h3>Key Takeaways</h3><ul><li>Take some of your money away from the bank account</li><li>Index funds are probably the best way to get started with investing in the stock market</li><li>Start investing as early as possible to take advantage of the power of compound interest</li><li>Invest often to maximise returns</li><li>Take also advantage of dividends</li><li>Invest for the long term and invest money that you don&#39;t need</li></ul><p><em>I hope you enjoyed reading this article!</em></p><p><em>Feel free to provide feedback and connect on </em><a href="https://www.linkedin.com/in/julien-emery-94b071150/"><em>LinkedIn</em></a><em> to further discuss about investing!</em></p><p><em>Stay connected! The next article will be about “how to get started with investing”.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=366f95cf0b54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data science for weather forecast: how to prove a funny theory]]></title>
            <link>https://medium.com/data-science/data-science-for-weather-forecast-how-to-prove-a-funny-theory-f005ea2d1efe?source=rss-f3ec3ae3ea61------2</link>
            <guid isPermaLink="false">https://medium.com/p/f005ea2d1efe</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[weather]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Julien Emery]]></dc:creator>
            <pubDate>Tue, 02 Apr 2019 01:07:37 GMT</pubDate>
            <atom:updated>2019-04-06T18:29:28.919Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*VnedznL7tmbb1c86HUon6g.jpeg" /><figcaption><a href="https://www.npr.org/sections/thetwo-way/2012/06/29/155971952/whew-todays-weather-map-is-hot-the-nation-is-baking">The USA during a heat wave</a></figcaption></figure><h3>What are we trying to do?</h3><p>Before describing what this experiment is all about, I need to give you some context. My colleague <a href="https://www.linkedin.com/in/aouss-sbai/">Aouss Sbai</a> (co-author of this article) and I were looking for a fun project to work on. So we asked our mentor <a href="https://www.linkedin.com/in/plamen-nedeltchev-1687266/">Plamen Nedeltchev</a> (Distinguished Engineer at Cisco) if he had anything in stock and he shared with us that he had a theory about the weather in San Jose, CA. He told us that he was able to predict if the summer was going to be hot or not solely based on the temperatures of the 19th, 20th and 21st of May. He asked us to prove it.</p><p>You read that correctly, predict the average weather of 3 months based on 3 days. Frankly, we did not really believe in it and approached this task with great scepticism. Nevertheless, we got started and tried to understand how we could go about proving such an original statement.</p><h3>Data collection</h3><h4>The first hurdle</h4><p>In any data science problem, the starting point of anything is data.</p><p>What data do we want exactly? Remember our objective: predict the average summer temperature following the temperatures of 3 days in May (19th, 20th and 21st) for the city of San Jose.</p><p>So we started looking for databases or archives of historical temperature data. Guess what? There were none that were either complete enough or simply available to us 😬. The only source of information we found was on a website, <a href="https://www.almanac.com/">the old Farmer’s Almanac</a>, which listed the average temperatures of each day since 1945. Amazing, the job is done then! Well, not exactly…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*iaiCrXsySlyMxdaaIPoD6A.png" /><figcaption><a href="https://www.almanac.com/">the old farmer’s Almanac</a></figcaption></figure><p>This is the page corresponding to the 23rd of March, 2019. We have access to the mean temperature, which is exactly what we need. But when it comes to calculating the average temperature of the summer of each year since 1945, this becomes much more tedious (~4500 days). There was no way we would visit a different page for each day and manually gather this data in an excel sheet…</p><p>So we decided to automate this task and write a script for it! 🤖</p><h4>Automation with a web scraping script</h4><p>Basically, the idea is that the script visits each page independently and looks for the data we want, calculates the average temperature of the summer, captures the temperatures of the 3 days in May, and repeats the process for each year starting from 1945. But how exactly can we do that?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a3328aeGPMUaNMskdx7fOA.png" /></figure><p>This is the URL of the page you just saw above. As you can see, it is specified in the URL the city and the date you want to access. So we could tell the script which URL to visit, for each day we were interested in. But here comes another issue. Once the script is on the page, how does it detect the temperature that we want?</p><p>Well, as you might know, each webpage is written in HTML format, which means that each element that you see on screen belongs to a specific HTML tag. And, luckily for us, each page of that website was structured in the exact same way. So the only thing that we needed to do is identify in which HTML tag was the daily mean temperature stored and tell the script to fetch that specific value. (For those interested, we used the python library <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/">Beautiful Soup</a>)</p><p>The script was then able to do all the nasty calculations for us and return for each year the average summer temperature and the individual temperatures of the 3 days of May, all bundled in a nice Excel sheet 📝.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*V0MGA2KifArMtGcDSgheFQ.png" /><figcaption>what our dataset looks like now (temperatures are in Fahrenheit). The first 3 columns are the 3 days of May, and the last one is the average summer temperature</figcaption></figure><p>But (there’s always a “but”), that was not enough. In fact, when you think about it, each line of our Excel sheet represented 1 year (average temp of summer + 3 days of May). So, even if we went back to 1945, that represented only 73 lines… which is far too little data to pretend to do any sort of reliable analysis or prediction ( a couple hundreds would be much better). So we decided to repeat the exact same process for 4 other cities of northern California around San Jose which were subject to the same type of weather but were far enough not to have redundant data (taking San Francisco for instance, which is by the sea would have biased everything, and taking Milpitas, which is in San Jose suburbs wouldn’t have added any relevant data). We now have 370 measurements, which is not ideal, but sufficient to start doing some analysis.</p><h3>Let the analysis begin!</h3><h4>Data Transformation</h4><p>Now let’s try to simplify our dataset to make it easier to analyze.</p><p>To start things off, we pulled the Excel file data into <a href="https://www.alteryx.com/">Alteryx</a>, a data science tool to create end-to-end data pipelines. This will help us prepare and analyze the data all along the experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*o8ykxXW1HTbZL6LcEq4EXQ.png" /><figcaption>Ingested Data: we decided to add 2 columns which indicated the city and the year of the measurement</figcaption></figure><p>We aimed to visualize the data using <a href="https://www.tableau.com/">Tableau</a>, which is one of the most commonly used Business Intelligence (BI) tools. Hence, we needed to transform the data in a format that is easily and efficiently consumed by Tableau. It is worth mentioning that we scraped the data in a format that was already structured, and, therefore, very little data cleaning was required. We merely reordered and reformatted some columns and checked that there were no null values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*wQuapTC89spBWJmDv-sodQ.png" /><figcaption>the end-to-end data transformation pipeline</figcaption></figure><p>The picture above is a summary of all the steps Alteryx goes through to transform our data. As you can see, the first and last steps are just data import/export. The second and fourth change the data format to handle it more easily. But what is the third step in the process?</p><p>Well, we noticed that the respective temperatures of the 19th, 20th, and 21st of May were very similar across all cities and years, and therefore decided to combine them by calculating their average, and thus reduce the number of features. In fact, by combining them, we were able to directly compare the temperature for these 3 days with the temperature of the summer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*T32hzEFH0fG5lXKweHA-Gg.png" /><figcaption>Our dataset after data transformation</figcaption></figure><p>Note that there are different solutions to transform the data (script, Excel…). We chose to use Alteryx because we were familiar with the tool and we knew we could complete the job in a very timely manner. In fact, we wanted to minimize the time spent on preparing the data in order to maximize the time spent on analyzing the data and solving the problem.</p><h4>The actual analysis (for real this time 😇)</h4><p>Now we will walk you through the step-by-step approach that we have used to explore and analyze the data, and eventually draw conclusions with statistical significance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*uhGi80GAvzIpBaUJXE8sHA.png" /><figcaption>The initial graph</figcaption></figure><p>We started by creating a scatter plot to get a general idea of the relationship between the two variables. As a reminder, our objective is to show that the temperature of the 19th, 20th and 21st of May is a good indicator at predicting the temperature of the summer.</p><p>By looking at this graph, there appears to be a positive linear relationship between the two variables: as the temperature of the three days increases, so does the temperature of the summer.</p><p>This begs the question: how can we demonstrate this relationship? 📝</p><p>This is where regression analysis comes into the place. This is a statistical method that can be used to study the relationship between two continuous variables.</p><p>A very simple regression analysis model that we used is the linear model, which uses a simple linear equation to fit the data. We used this method because it is relatively simple to interpret and it is supported by Tableau.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*j3t44Y5dzbLgqyTDgFT7HQ.png" /><figcaption>Linear regression</figcaption></figure><p>The trend line that we have plotted is actually showing us the general direction that the group of points seems to follow. We can now confirm that there is a positive linear relationship between the two variables: <strong>as the temperature of the three days increases, so does the temperature of the summer</strong>.</p><p>For the more statistics-savvy ones reading this, we can even demonstrate this relationship using some measures that describe our linear model:</p><ul><li>R-squared = 0.29 merely indicates that 29% of the variance in the summer temperature can be explained by the temperature of the 3 days</li><li>P-value &lt; 0.0001 simply indicates that the model is significant and that the results are reliable</li></ul><p>Thus, these results clearly show that there is a correlation between the temperature of the 3 days (19th, 20th, and 21st of May) and the temperature of the summer. Although these results are already very interesting, is it possible to improve the significance of the model?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*7sXW44ulxHm7IPFCaxXl-Q.png" /><figcaption>Disparity in the data</figcaption></figure><p>It looks like the data is separated into two big chunks (as highlighted in the figure), which definitely affects the fitting of the line. Is it possible to explain this disparity in the data?</p><p>Remember that the dataset includes the temperatures of different cities which are evenly distributed around San Jose. So, let’s see what happens if we colour the data points by city.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*6RaDoJFOJo0o4cfsEz4BSg.png" /><figcaption>Here is the <a href="https://public.tableau.com/profile/julien.emery#!/vizhome/Capture5/Dashboard2?publish=yes">link to the dashboard</a> if you want to play with the dashboard 📊</figcaption></figure><p>This graph clearly shows that even if cities are subject to the same type of weather, the results are very different from city to city. In fact, Sacramento and San Jose, which are up north, are colder than Fresno or Bakersfield which are more down south. We can also notice that Bakersfield, Fresno and Redding show almost no variation in summer temperature compared to San Jose, whose data points seem to follow a positive trend line.</p><p>Hence, it would be more significant to analyze the relationship between the two variables for each city individually.</p><p>By fitting a model for each city, we realize that in the case of Sacramento, Redding, Fresno and Bakersfield, there is clearly no relationship between the two variables. This is statistically evidenced by an R-squared value that is close to 0 and a P-value that is above 0.70.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*xBwTapP23-tOjePJMhsfUg.png" /><figcaption>Redding trend line (similar to Sacramento, Fresno and Bakersfield)</figcaption></figure><p>However, we can see that in the case of San Jose, there is a correlation between the two variables (R-squared = 0.316 and P-value &lt; 0.0001). Note that this time, 31.6% of the variance in the summer temperature can be explained by the average temperature of the 3 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*CncgPp7SegaFy8Kzi_AIjg.png" /><figcaption>San Jose trend line</figcaption></figure><h3>So what’s the conclusion?</h3><p>The results demonstrate a correlation between the temperature of the 3 days (19th, 20th, and 21st of May) and the temperature of the Summer with a 99.99% confidence level (p-value &lt; 0.0001). However, this theory is only true for the city of San Jose, which is very surprising since all these cities are in California and should, therefore, show similar temperature trends.</p><p>Now that we have done the hard work, it will definitely be interesting to see if our theory is confirmed this year👨‍🔬 . We will apply our linear model to 2019 data and see if it correctly predicts the average summer temperature. Although the results will certainly not be very accurate, it will still be a good indicator of whether the summer will be hot or not.</p><p>In the future, we want to strengthen this analysis by looking into other factors that might explain this phenomenon and improve our model by using different analysis methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f005ea2d1efe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/data-science-for-weather-forecast-how-to-prove-a-funny-theory-f005ea2d1efe">Data science for weather forecast: how to prove a funny theory</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>