Question 1 (5 points)

Do the following in R:

# Write your answer here

Question 2 (10 points)

# Write your answer here

Question 3 (10 points)

# Write your answer here

Question 4 (10 points)

# Write your answer here

Question 5 (20 points)

# Write your answer here

Question 6 (15 points)

# Do not change the two lines below
set.seed(1024)
v <- runif(100, 1, 20) + rnorm(100, 1, 3)

# Compute the mean of v below

Question 7 (20 points)

# Example:
> a <- c(1,3,5)
> b <- c(20, 40, 60)

> c <- your_function(a, b)
> c

     [,1] [,2] [,3]
[1,]   21   41   61
[2,]   23   43   63
[3,]   25   45   65
# Write your answer here

Question 8 (20 points)

# Write your answer here