A Population For Tasks 19-21, use the file called \"pop3.csv\" found here. That
ID: 2921771 • Letter: A
Question
A Population For Tasks 19-21, use the file called "pop3.csv" found here. That file contains information about time to failure of an entire production of some computer parts. The file contains two variables, "type" and "time", each measured over the 100,000 members of the population. The variable "type" is a factor, with three levels, "a", "b" and "c", and the variable "time" is numeric. If the value of time is 4, that means that the part lasted 4 units of time (years?) before a failure occurred. You should treat the content of this file as the information from an entire population. Save the file on your computer and read the data stored in the file into R. If you have trouble loading the data into R, email your instructor immediately—don't worry if you think you will find the answer 1 minute after sending the email—just send the email. Tasks 19-21 refer to the information in the file. 19. Determine how many observations in the pop3.csv file are of type a: _______. 20. Using the appropriate R function with the defaul options, what is the median of the time column of pop3 (round to 3 decimal places): ______________________________. 21. What is the variance of the time column of pop3 (rounded to three decimal places)? ______Explanation / Answer
Note: The file pop3.csv is not provided.
To load the file, set the working directory to the folder the file is saved in using
> setwd("directory address")
> pop3 <- read.csv("pop3.csv")
19. Determine how many observations in the pop3.csv file are of type a: > nrow(pop3[ ,pop3$type == "a"])
20. Using the appropriate R function with the defaul options, what is the median of the time column of pop3 (round to 3 decimal places): > round(median(pop3$time), 3)
21. What is the variance of the time column of pop3 (rounded to three decimal places): > round(var(pop3$time), 3)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.