DESCRIPTION Please keep in mind the OMSI rules. Save your files often. Submit each answer individually and make sure you receive the notification of successful submission. Don't wait till the last moment to submit all answers, as there might be network traffic in the last 5 minutes causing unexpected delay and failure. Remember that clicking CopyQtoA will copy the entire question box to the answer box. In questions involving code which will PARTIALLY be given to you in the question specs, you may need to add new lines. There may not be information given as to where the lines should be inserted. MAKE SURE TO RUN THE R CODE ANSWER IN PROBLEMS THAT INVOLVE R CODE! QUESTION (Text answer 25 Points) Say we have a random sample, X_1,X_2,... ,X_n from some population in which X has unknown density f_X. We will form the empirical cdf G. Let W_1, W2,...,W_n denote the sorted version of the X_i. Which one(s) of the following is/are true? (i) G(t) is continuous in t (ii) there are n jumps in G (with probability 1) (iii) the first jump in G is at X_1 (iv) the first jump in G is at W_1 (v) the first jump in G is of size 1/n (vi) the first jump in G can be of any size > 0, not just 1/n (with nonzero probability) (vii) for any t >= max(X_1,X_2,... ,X_n), G(t) = 0 (viii) for any t >= max(X_1,X_2,... ,X_n), G(t) = 1 (ix) none of the above is true QUESTION -ext .R -run 'Rscript ./omsi_answer2.R' (R Code answer 25 Points) Using the dataset PimaIndiansDiabetes2 in the mlbench package and the qeLin() function, predict the number of pregnancies of a woman of age 32.6. Show your full code. library(mlbench) library(regtools) print( ) QUESTION -ext .R -run 'Rscript ./omsi_answer3.R' (R code answer 25 Points) The hazard function for a random variable X is defined to be f_X(t) / [1 - F_X(t)]. Write code for this for a gamma distribution with parameters r and lambda. haz <- function(t,r,lambda) { } print(haz(0.5,2,3.0)) QUESTION -ext .R -run 'Rscript ./omsi_answer4.R' (R Code answer 25 Points) In order to win an election, Bob wants to know the proportion of population who will vote for him. The estimate is required to be within 0.1 of the true proportion. Find the minimum sample size n needed for the requirement. Note: For any real number u, we have u(1-u) <= 1/4. print( )