Studio 12

----------------------------
Topics: Bootstrap; Linear regression

---------------------------
Before class:
1. Post studio12.zip containing: studio12.r, studio12-sol.r, studio12-prep.r,
   salaries.csv, studio12financialOriginal.csv, studio12financialDaily.csv

2. Students should download this zip file and unzip it in their 18.05 R directory.

---------------------------
For class:
1. Use studio12-slides.pdf
2. Follow class script below.

---------------------------
After class:
1. Post studio12-slides-all.pdf 

---------------------------
Class script

Slide 1: Everyone should have downloaded and unzipped studio12.zip

Slide 2: Review: computing a bootstrap confidence interval
        --Walk through this

Slide 3: BOARD Question: Bootstrap CI for the difference of means
        --As students work, they should be pushed to get the details exactly
          right because they will have to code it in the next R problem.
        DISCUSSION: Go through this carefully. It shouldn't take much time.
            Hopefully one group will have a neat enough board that it 
            can be used in the explanation.

Slide 4: R Problem: Bootstrapping
       DISCUSSION: If there was confusion show studio12-sol.r.
         Otherwise just remind them of the solution code and move on.   
    
Slides 5-7: The financial data.
        --Explain the what the data is.
        --Show the graphs.

Slide 8: Daily rate of return
       --DO NOT try to give details of what this means. It's enough 
       	 to say that it measures the change in price from one day to 
         the next.  
       --If anyone is interested they can look in studio12-prep.r 
         and/or ask about it outside of class.
       --DO TALK about the linear model and use the term PREDICTOR 
         variable for SP500.daily

Slides 9,10: R commands and output
      --After slide 8, have the students run the financial sections 
        of studio12.r
      --Use these slides (or the output in RStudio if the projection is decent)
        to discuss what the output is and how to interpret the results.
      --Again, use the term predictor variable.

Slide 11: R Problem 2: linear regression
      --With the sample code most students should get the R part done quickly
      --NOTE part 4 does not ask for code to be written. The code is in
        studio12.r The problem asks for an interpretation of the results.
      --Problem 4: We saw 
             1. For GE.daily vs. SP500.daily the coefficient was positive.
             2. For GE.daily vs. DCOILWTICO.daily the coefficient was positive.
             3. For GE.daily vs (SP500.daily, DCOILWTICO.daily) the coefficient
               of SP500 was positive and of DCOILWTICO was negative.
             4. All these coefficients are significantly different from 0
       --Students should try to explain the apparent paradox of 1-4.
         --See the solution slide for one way to do this.
