DESCRIPTION Students: Please note instructions in paper copy of quiz. Save your files often, make sure OMSI fills your entire screen at all times, etc. A question may not fully fit into your OMSI question box, which is not scrollable. You can try adjusting the relative size of the question and answer boxes, but remember that clicking CopyQtoA will copy the entire question box to the answer box. QUESTION (20 pts) Fill in the blank with a term from our course: Say we are interested in finding the most well-received movie, and write code to determine which movie has the highest average rating. This might be misleading, due to the phenomenon of _____________________. QUESTION -ext .R -run 'Rscript omsi_answer2.R' (20 pts) We discussed another method of scaling besides subtracting the mean and dividing by the standard deviation, which is mapping to the interval [0,1]. Write the function map01(x), which transforms the vector x in this manner. It will return an S3 object of class 'm01', with components newx, the transformed vector; m, the minimum value of the original x; and M, the maximum value of the original x. map01 <- function(x) { } newNile <- map01(Nile) # Nile is a built-in dataset in R print(sd(newNile$newx)) # about 0.185 QUESTION (20 pts) In Question 2 above, why is it necessary to record minx and maxx, i.e. why not just return newx? QUESTION -ext .R -run 'Rscript omsi_answer4.R' () Write a function lp(x,p) will find the l_p norm of a vector x. Here p can take on any real value between 1 and Inf, inclusive (Inf is the R symbol for infinity). lp <- function(x,p) { } # LakeHuron is another built-in dataset print(lp(LakeHuron,2)) # about 5731.9 print(lp(LakeHuron,1)) # 56742.4 print(lp(LakeHuron,Inf)) # 581.86 QUESTION (20 pts) In Homework II, it is suggested that you use only the first two digits of ZIP code. Explain the motivation for that, and why the first two digits may still be useful.