<jupyter_start><jupyter_text>Lecture 4: In Class Activity in Breakout RoomsYour Name: <NAME>  Your UID: u1089366  Your E-Mail: <EMAIL>  For this activity first import a small data set containing 10 measurements of CO_2 levels and global temperatures. You can do this with the read_csv command from the pandas library as follows:<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
my_data = pd.read_csv("global_warming.csv")<jupyter_output><empty_output><jupyter_text>Item 1Print the first few rows of the my_data data frame. Then create lists storing the CO_2 and temperature values. Compute the mean and median of the temperature measurements.<jupyter_code># Your code here
my_data.head()
CO_2_list= list(my_data['CO_2'])
Temp_list= list(my_data['Temp'])

mean= np.mean(Temp_list)
median= np.median(Temp_list)
print("The mean is " + str(mean) + ". The median is " + str(median) + ".")<jupyter_output>The mean is 14.170000000000002. The median is 14.1.<jupyter_text>Item 2Make a scatterplot of CO_2 versus temperature. Is there a strong relationship between these two variables? What is the correlation cofficient? Can we infer that increasing carbon dioxide levels will increase global temperature?<jupyter_code>plt.scatter(CO_2_list,Temp_list)
print("The correlation coefficient is " + str(np.corrcoef(Temp_list,CO_2_list)[0,1]) + ".")<jupyter_output>The correlation coefficient is 0.8919763551653175.<jupyter_text>The plot looks fairly linear and the correlation coefficient between the variables is pretty high. There is a strong and direct relationship between the two variables. This means that if one variable is increased, the other will increase as well. In other words, we can conclude that increasing carbon dioxide levels will also increase global temperature.  Item 3Change the last temperature measurement from 14.4 degrees to 144 degrees which could have happened if there was a small error in manual data entry. How are the mean and median affected?How are the scatterplot and the correlation coefficient affected?Are the mean, median, and correlation coefficient robust to outliers and data entry errors?<jupyter_code>Temp_list[-1] = 144

mean= np.mean(Temp_list)
median= np.median(Temp_list)
print("The mean is " + str(mean) + ". The median is " + str(median) + ".")

plt.scatter(CO_2_list,Temp_list)
print("The correlation coefficient is " + str(np.corrcoef(Temp_list,CO_2_list)[0,1]) + ".")<jupyter_output>The mean is 27.130000000000003. The median is 14.1.
The correlation coefficient is 0.5745303015462886.
{'fraction_non_alphanumeric': 0.07692307692307693, 'fraction_numerical': 0.042951971885982036, 'mean_word_length': 5.850267379679145, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '642792', 'license': 'MIT', 'n_tokens_mistral': 826, 'n_tokens_neox': 736, 'n_words': 301, 'path': '04-intro-desc-stat/04-DescriptiveStatistics_Activity.ipynb', 'repo_name': 'VishMur/2022-datascience-lectures', 'size': '2588'}