Question: Data - 2 1 0 - Lecture - 1 - Homework.pdf Page of 2 ZOOM Lecture 1 : R Review & RMarkdown Homework Problems These

Data-210-Lecture-1-Homework.pdf
Page
of 2
ZOOM
Lecture 1: R Review & RMarkdown
Homework Problems
These questions will assist in bolstering your understanding of the material in Lecture 1. While you are encouraged to complete all of them on your own, you will only be required to submit one of them for grading (if you want me to look over your other ones let me know). Emphasis should be placed on having the correct code/output as well as communication. For each part, you should explain what you are doing as well as what the output is telling us. Having just the code/output will not receive full credit. The deliverable should be a knitted RMarkdown document. Grading will use the EMRN rubric found in the syllabus.
Answer the following questions:
(a) Create a vector named "probl" which has the values:
1,4,10,5,20,17,7,18,17,1
(b)
(c) Display all values of "prob1" which are not within 5 of the median and run a function to count how many meet this criterin
(d) Create a new vector called "prob1_mult" which is made up of each element of "prob1" multiplied by it's index
(c) Display all values of "probl_mult" which are greater than 3 times the mean of "prob1"
(f) Find the proportion of values in "prob1_mult" which are greater than or equal to 100 or equal to 8
2. Answer the following questions:
(a) Create a vector named "prob2" which has the values:
160,172,155,168,175,162,180,150,190,187
(b) Calculate the mean, median, and standard deviation value for the vector
(c) Display all values of "prob2" which are below the mean
(d) What proportion of values are within 1 standard deviation of the mean?
(e) Find the z-score for each element and save it to a new vector called "prob2_score"
(f) Calculate the sum of the even-indexed elements for this vector (do not type it out as c(2,4,6,dots) but do it more elegantly so it can be scaled up for larger datasets)
 Data-210-Lecture-1-Homework.pdf Page of 2 ZOOM Lecture 1: R Review & RMarkdown

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!