Python coding for ENG

User Generated

naab112

Other

Description

I have one day to do this assignment. Please make sure it is your own work and word.

Unformatted Attachment Preview

You have been hired by MSU to analyze annual snowfall in the winter of 2019 relative to the average winter over the past 50 years. The data set LickCreek2019.csv has been provided to you. This is actual snow accumulation data (in inches) measured at the nearest weather station, Lick Creek, in Hyalite canyon. (The data was downloaded from the National Resource Conservation SNOTEL website on March 12, 2019, https://www.wcc.nrcs.usda.gov/snow/snow map.html). The data set has three columns: Day, where day zero is Nov. 1 of each winter, Current, which is the 2019 snow accumulation at the weather station in inches; and Median, which is the average snow accumulation on the same day over the past 50 years. The first part of your job is to plot the current snow accumulation for 2019 and the median snow accumulation versus the day of the winter on the x-axis. The second part of your job is to report the slope of a regression line for the data (accumulation on the y-axis versus day on the x-axis) for the current year and the 50-year median. The slope represents the average accumulation per day. How does 2019 accumulation compare to the median? Include your computer code in the appendix.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

See attached

1.

2.

Estimated coefficients:
b_0 = 0.7818167762611381
b_1 = 1.1198415007070486

The slope = b1 = 1.1198

3.

Based on both the line plot and the slope of the regression, the 2019 snow accumulation is higher
compared to the 50 year daily accumulation median. For every 1 inch increase in the median
snow accumulation, the 2019 snow accumulation increases by 1.1198 inches.

APPENDIX
# Question 1
import matplotlib.pyplot as plt
import csv

day=[]
current=[]

median=[]

with open('LickCreek2019.csv', 'r') as csvfile:
plots= csv.reader(csvfile, delimiter=',')
next(plots)
for row in plots:
day.append(int(row[0]))
current.append(int(row[1]))
median.append(float(row[2]))

plt.plot(day,current, marker='o', color= 'blue', label= "Current")
plt.plot(day,med...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags