Norwegian version of this page

Exercises

Here, weekly exercises will be given. These will be published after the lectures on wednesdays. 

  • Exercises for May 18
    • We will discuss the first 3-4 problems within the trial exam this day
    • For problem 2.b: Make an assumtion that sum_i(x_{ij})=0 to simplify the calculations.
  • Exercises for May 10
    • Exercises 1, 3, 4, 9 and 10 from Section 10 (pp. 413-417) of the ISL book.
    •  
  • Exercises for May 3
    • Exam STK2100 2018: Exercises 1, 2, english version here
    • Extra exercises 13, 14, 15
  • Exercises for April 26
    • From the ISL book: Exercises 9.3 and 9.7
    • Extra exercises 6, 7
  • Exercises for April 19
    • Go through the R-commands in sec 8.3.1 in the ISL book
    • From the ISL book: Exercise 8.11 and 8.12, using the Caravan dataset
    • Exam STK2100 Spring 2019: Exercise 1 (but skip the question about lift curve)
    • Extra exercises 2 and 3
  • Exercises for April 12
    • From the ISL book: Exercises 8.1,
    • Exam STK2100 spring 2019, exercises 1 and 3
    • Extra exercise 14
  • Exercises for March 15
    • From textbook: Exercise 5.9, 5.10 (for this exercise assume p=1 and that sum(x_i)=0)
    • From the ISL book: Exercises 4.9, 4.10 (except point (g))
  • Exercises for March 8
    • From textbook: Exercise 5.4, 5.5, 5.7
    • From the ISL book: Exercises 7.5, 7.11, 7.12
    • Exam STK2100 2017: Exercise 1
  • Exercises for March 1
    • From the textbook: Exercise 4.7, 4.8
    • From the ISL book: Exercises 7.1, 7.9, 7.10
      • The Boston/College data sets are made available in R with the commands
        • library(MASS);data(Boston)
        • library(ISLR);data(College)
  • Exercises for February 22:
    • From the ISL book: Exercises 6.2, 6.3, 6.10
    • From the textbook: Exercise 4.3, 4.5, 4.6
  • Exercises for February 8:
    • From the ISL book: Exercises 1 and 8 (only a-d) from section 6.
    • Read the body fat data by the command
      • data = read.csv("/studier/emner/matnat/math/STK2100/v21/data/edu_bodyfat.csv", header = TRUE, row.names = 1)

      • It contains a response variable (pcfat, percentage of body fat) and 13 explanatory variables (age and 12 measures of different body part circumferences). Fit a linear Gaussian model by using both backward elimination and forward selection, in both cases using AIC as stopping criterion. Do you obtain the same model with both procedures? Comment the result

    • Consider the Hitters_ridge.R script. Run the different commands and try to understand what they do. You may need to consult sec 6.5 in the ISLR book to get the details.
  • Exercises for February 1:
    • Exercises 2.9, 2.11-2.13 of the text book
    • Exercises 3.1-3.4 of the textbook
    • For the prototype data from section 3.2, estimate the MSE using 
      • all data both for training and testing
      • separate training and test sets
      • leave-one-out crossvalidation 
      • summarize your results
  • Exercises for January 25
    • Exercises 2.3, 2.7 and 2.8 of the textbook
    • exercises 3, 7, 9 and 10 from Section 3.7 of the ISL book
  • Exercises for January 18:
    • Go to the webpage for the text book and download both the car data and the scripts for chapter 2. Run these scripts and verify that you get the same results as in the textbook
    • Exercises 2.1 and 2.2 of the textbook
    • Exercises 1, 2 and 8 from the ISLR book (James et al), see webpage for the book  for downloading data.
      • Regarding exercise 8: The easiest way of getting hold of the data is to install the ISLR library (trough the command install.packages("ISLR")), make the library available (through library("ISLR")), and then make the data available through data(College)
Published Jan. 13, 2021 3:18 PM - Last modified Mar. 15, 2023 11:22 AM