Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

HW 1

Guidelines and submission instructions:

●   I suggest working in groups of 1-4 students. You can form teams in the google sheet                                                          https://docs.google.com/spreadsheets/d/1cXB6JAbB_dARXHWa6t7O4e-dvv-0Hl-5Ne9UDmj_hAI/edit?usp=sharing . It would be great that in each team there is a student who has prior python experience.

●   If you work on the assignment individually or in a team, you will need to submit your python notebook that contains         answers to all questions. People working in a team can submit the same file and it's allowed to have an identical notebook. Please indicate your group number and provide all of your teammates names.

●   To answer some questions, you will need to write code, interpret results, etc. All answers should be included in your python notebook.

Questions:

1.   What does "counterfactual" mean and what are three insights you gained from watching the video "Time, Interrupted: Measuring Intervention Effects with Interrupted Time-Series Analysis" at the following link: https://youtu.be/uuo8SwA1HO8?

Case 1: Global warming

The Nenana Ice Classic (https://en.wikipedia.org/wiki/Nenana_Ice_Classic) is an annual event held in Nenana, Alaska, in  which individuals attempt to guess the exact time that the ice on the Tanana River will break up. The event serves as a        fundraiser and is a beloved guessing game among Alaskans. It has been held annually since 1917, when workers building a bridge across the Tanana River near Nenana were unable to begin their work due to the frozen river. To pass the time, the   workers began betting on when the ice would break up. A large tripod was erected on the ice, and it was decided that whe  the ice began to break up and the tripod moved a certain distance downstream, that would be the official time of the            breakup. The winner of the bet was the person who guessed closest to the actual time. Every year since then, the same        routine has been followed, and the betting has grown more intense. The tripod is connected to an official clock via a rope,  and the clock is tripped to stop when the rope is extended by the tripod floating downstream. The official time of the ice     breaking is recorded and made available on the Nenana Ice Classic website (https://www.nenanaakiceclassic.com/).

In addition to its entertainment value, the Nenana Ice Classic data also has ecological significance. By analyzing the ice breaking times over the years, we can examine whether the ice is breaking up earlier each year, which would provide    evidence of global warming. Some believe that global warming began in 1960, and therefore the data collected by the   Nenana Ice Classic can provide valuable insights into the impact of global warming on natural phenomena.

Data:

The data in Nenana1.txt and Nenana2.txt (I downloaded the data for you from the NSIDC website:                            https://nsidc.org/data/nsidc-0064 ) were popularized in the October 26, 2001 issue of Science in an article by         Stanford professors Raphael Sagarin and Fiorenza Micheli. (If in case you are not familiar: Science publishes only the very best peer-reviewed and the most cited science research articles in the world)

2.    Import the data from Nenana1.csv in python and call it df.

https://raw.githubusercontent.com/robertasgabrys/Forecasting/main/Nenana1.csv

3.    (we will work on this task in class) Create a KPI (key performance indicator) to assess the global warming hypothesis by measuring the amount of time in days between the moment the ice breaks in Nenana (as         recorded in the Nenana Ice Classic contest) and January 1st of each year.

4.   Create a line graph utilizing the KPI defined as the amount of time in days between the moment ice breaks in Nenana and January 1 of each year. Additionally, include a vertical line to represent the hypothesized    year of global warming, 1960, and create separate regression lines for data prior to and after 1960. What    information can be inferred from this graph?

5.   It has been acknowledged since 1960 that human activity has resulted in an increase in greenhouse gases in the atmosphere, leading to the question of whether this has resulted in a noticeable warming of the      climate. 1960 has been selected as a benchmark year for long-term temperature change. Does the data   provide statistically significant evidence of global warming? Consider both abrupt/immediate and

gradual change points:

Abrupt change point detection:

a.   Carry out a 2 sample t test and interpret the results.

b.   By what percent the mean value of the KPI changed after 1960?

c.   Create a dummy variable and build a regression model and interpret the results.

d.   Provide a visual representation of the results of a two sample t test and regression model applied to data and evaluate the adequacy and accuracy of these models in capturing the  data.

Gradual change point detection:

e.   Create a ramp variable and build a regression model and interpret the results.

f.   Build a regression model with a dummy variable and the ramp variable and interpret the results.

g.   Provide a visual representation of the results of both regression models applied to data and evaluate the adequacy and accuracy of these models in capturing the  data.

6.   What is the more appropriate effect of the intervention that started  in 1960, abrupt or gradual. Briefly explain your reasoning.

7.   Compare the results of the two-sample t-test performed on Batmobile data to the results obtained in 5.a, in which you conducted the analysis on Nenana data. Have you identified any intriguing or surprising            observations?

8.   Read the original article published by two Stanford professors:

https://science.sciencemag.org/content/sci/294/5543/811.full.pdf

And also a Critique of the article and the comments below the critique:

https://www.john-daly.com/nenana.htm

What are the key arguments and points made in both the original article by the two Stanford professors and the critique of the article, as well as the comments below the critique, and what is your brief           commentary on the information presented in these articles?

9.   The NASA National Snow and Ice Data Center recently updated the Nenana1.csv dataset to include more  recent data, which is now available in the Nenana2.csv file. Perform both abrupt and gradual change point analyses using regression and using the updated Nenana2.csv data. Does the updated data lead to different conclusions compared to the previous dataset? If there are any differences in conclusions, briefly explain   why.

Data can be imported from the provided Github source.

https://raw.githubusercontent.com/robertasgabrys/Forecasting/main/Nenana2.csv