Lab 12 - Solutions

# Lab 12 - Solutions - UNIVERSITY OF CALIFORNIA BERKELEY...

This preview shows pages 1–4. Sign up to view the full content.

UNIVERSITY OF CALIFORNIA, BERKELEY Engineering 7 – Spring 2009 Department of Civil and Environmental Engineering Instructor: Professor Rector Lab 12 [20 pts] Topics : Regression Assigned : Monday, 05/04/2009, 12:00 AM Due : Friday, 05/08/2009, 5:00 PM Type : Take-home Introduction to the Steamboat Geyser Problem A non-profit group of volunteers called the Geyser Observation and Study Organization (GOSA) monitors geyser activity in Yellowstone National Park. For more information see www.geyserstudy.org ). Steamboat Geyser Steamboat Geyser is one of the most spectacular geysers in the Norris Geyser Basin of Yellowstone National Park. The last time that it erupted was on March 26, 2003 at midnight, and nobody was around to see it. We know that it erupted by examining data from a temperature sensor that Geyser Observation and Study Organization (GOSA) had put in the outflow channel. (For more information see www.geyserstudy.org ). Unfortunately, that data is not available to the public. We can, however, study some of the data from the temperature sensor from other dates to get an idea how Steamboat usually behaves. 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
UNIVERSITY OF CALIFORNIA, BERKELEY Engineering 7 – Spring 2009 Department of Civil and Environmental Engineering Instructor: Professor Rector 0. Mathematical Introduction – Notations and Definitions Assume we have a dataset with n observations of the dependent variable, y i , i = 1…n. Take note of the following definitions. Note: y ˆ is the vector of values estimated using regression! Sum of Squared Residuals (SSR): ( 29 = - = n i i i y y SSR 1 2 ˆ Mean of Squared Residuals (MSR): ( 29 = - = = n i i i y y n SSR n MSR 1 2 ˆ 1 1 Total Sum of Squares (SST): ( 29 = - = n i i y y SST 1 2 R-squared (R 2 ): SST SSR 1 R 2 - = The R 2 is a measure of how well the estimates fit to the data. Important Note! No MATLAB commands, toolboxes, or packages specialized in regression or curve-fitting may be used such as polyfit . All such functions must be made using non-specialized functions, commands, keywords. 1. Download the file steamboat_09.mat from bSpace and load it into the current workspace. It contains two MATLAB arrays called time containing time data and temp containing temperature readings (in Celsius) for the Steamboat Geyser. The time array is the time the temperature was taken in seconds, and the temp array are the temperature reading in Celsius. Plot the data with time on the x-axis and temperature on the y-axis using dots (the marker designation in the plot function is ‘.’). Include a title and axis labels (with units!). % [2 pts for plot, -0.5 if anything is missing] %% Question 1 clc clear all close all load steamboat_09.mat figure plot(time, temp, '.') title('Steamboat Geyser Temperature vs Time') xlabel('time [sec]') ylabel('temperature [C]') 2
UNIVERSITY OF CALIFORNIA, BERKELEY Engineering 7 – Spring 2009 Department of Civil and Environmental Engineering Instructor: Professor Rector 0 5 10 15 15 20 25 30 35 40 45 50 55 60 65 Steamboat Geyser Temperature vs Time

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern