Lecture 4


Slides

Jupyter Notebook


HW4:

1. Following the Problem 3 of HW 3 on the relation between body weight and brain weight, 

a) reproduce the residual plot, but without the red-line. In the lm object, you can call fitted value by your.lm.object$fit, and plot it against the residuals.

b) Find the correlation coefficient between brain weight and body weight (before and after the log-transformation). Does the value of correlation coefficient change? 

2. Generate two random vectors of the same length, take the position of the lowest value of the first vector, and see where value at the same position of the 2nd vector was ranked. Take the positions that is below the median of the first vectors, and see where values at the same positions of the 2nd vector was ranked.

Comments

Popular posts from this blog

Syllabus

Lecture 3

Lecture 2 + Lab