Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

General instructions: For questions which ask you to do something, give the comm

ID: 3277470 • Letter: G

Question

General instructions: For questions which ask you to do something, give the command you use to do it. For questions which ask for a plot, include the command you use to make the plot, and upload the saved plot. 1. (a) Create a 2500 x 3 data.frame that is named "dataset" a. The first column is normally distributed data, mean -100, sd-15; see 2morm b· The second column is uniform dist (0,1); see ?nuf. The third column is binary, with overall prob(x=1) = 25; see ?mom c. d. Give each column an informative name (b) Plot a histogram & scatterplot of the first two variables; see ?hist and ?plot (c) What is the mean, median, & var of the first two columns? What % of the third column is equal to 1? see ?mean ?median ?var ?summary (d) What is the mean, median, & var of the first two columns WHEN the third column is equal to 1? hint: first try creating a vector that is TRUE when the third column is 1 and FALSE when 0,then use this vector as an index;) a. Place the mean, median, & var for each of these columns into two 3 element vectors named col1 and col2 (e) Take a random sample of 50 rows (without replacement) using the "sample" function. a. What is the mean, median, & var of the first two columns for this subset of rows? b. Place this information into two 3 element vectors named coll.subset and col2.subset

Explanation / Answer

Answer (a) normal.dat