Homework 3
Due: before 12:00 pm (noon) on Tuesday, April 13. Please do not include your name on your write-up, since
these documents will be reviewed by
... [Show More] anonymous peer graders.
Do not include your raw R code in your write-up. You will submit your R script as a separate
document to the write-up itself. On Canvas, you will see two assignments pages corresponding to Homework
2: (1) to upload your write-up PDF file and (2) to upload the R script that you used to generate your
write-up. Your write-up is what will be peer graded. The R script will not be graded, but you must submit
it to receive credit on the write-up.
If you use tables or figures, make sure they are formatted professionally. Figures and tables
should have informative captions. Numbers should be rounded to a sensible number of digits (you’re at UT
and therefore a smart cookie; use your judgment for what’s sensible). Rows and columns in tables should
line up correctly, and tables shouldn’t merely be copied and pasted in Courier (or similar) directly from the
R output.
Unless the problem instructions suggest otherwise, format your write-up responses in the same manner
as on Homework 2, with four sections: 1) Questions; 2) Approach; 3) Results; 4) Conclusions.
For problems requiring Monte Carlo simulation, use a minimum of 10,000 iterations.
Problem 1 - Summer is Coming
The file ERCOT.csv contains data on peak power consumption in the Gulf Coast region of Texas for every
hour between 9 AM and 7 PM of every summer day (June 1 through August 31) during 2010-2015. We
scraped these data from the website for ERCOT, the electricity grid operator for most of Texas. The variables
in this data frame are:
• time: date and time stamp of the data point. Each data point covers a one-hour interval between the
hours of 9 AM and 7 PM, with the window beginning at the time stamp indicated in this column.
• COAST: peak demand in megawatts for the entire coast region of Texas during that hour. This covers
more or less from Houston and its surrounding areas down to Matagorda Bay, but not as far south as
Corpus Christi.
• temp: average temperature recorded during that one-hour interval by the weather station at Houston’s
Hobby Airport, in degrees Celsius.
• weekday: whether the day in question is a weekday, where 1 = weekday and 0 = weekend.
Your task is to build a linear model for peak power consumption that includes main effects for temperature
and weekday, as well as an interaction between temperature and weekday. Use this model to address the
following questions:
A) During the summer, how much higher or lower is daytime power consumption on a weekday, versus on
a weekend?
B) During the summer, how does daytime power consumption increase with temperature, on average, and
does this relationship seem to differ between weekends and weekdays?
Be sure to quantify your uncertainty by quoting confidence intervals where appropriate. Estimates of coefficients that do not include appropriate error bars (i.e., confidence intervals) will not receive full credit.
Include (in the Results section of your write-up) a faceted scatter plot that shows the relationship between
power consumption and temperature, faceted by weekday [Show Less]