Font size
WorksheetsData Analytics using R-Beginner Level
Total questions: 15
Worksheet time: 15mins
The correct command to load the library splines in R console is
library(splines)
Library("splines")
load.Library("splines")
load.Library(splines)
The output of the R command c(3,1,3,1)**c(2,3,1,2) is
6 3 3 2
9 1 3 1
8 3 1 2
6 3 3 2 6 3 3 2
The output of the R command (c(3,2,3,2)**c(2,3,1,3))^c(2,1,2,3)*c(2,3,3,2) is
24 18 18 36
36 24 18 48
72 18 27 432
162 24 27 1024
The output of the R command max(c(5,2,3,4))**min(c(-5,-2,-3,-4)) is
-25
25
0.00032
-25 -4 -9 -16
The nature of variables defined by the random variable associated with an experiment to count “the number of students of a particular gender in each room of a school” is
discrete.
continuous.
sometimes discrete and sometimes continuous.
not clear as the information is inadequate.
An experiment is conducted in which a medicine is administered to a group often patients. The body temperatures of patients are recorded after three hours and the median of body temperatures is found. The experiment is repeated 500 times. The nature of variables defined by the “median of body temperature” is
discrete.
continuous
sometimes discrete and sometimes continuous.
not clear as the information is inadequate
Suppose the number of female workers in 10 offices are recorded and two readings on these numbers get missed. The collected observations are as follows: 11, 21, 15, 16, 17, NA, 8, NA, 12, 21. Which of the following is the correct command to obtain the arithmetic mean of this data in R?
mean(c(11,21,15,16,17,NA,8,NA,12,21), na.rm=TRUE)
mean(11,21,15,16,17,NA,8,NA,12,21, na.rm=TRUE)
mean((11,21,15,16,17,NA,8,NA,12,21), na.rm=TRUE)
sum((11,21,15,16,17,NA,8,NA,12,21), na.rm=TRUE)/length((11,21, 15,16,17,NA,8,NA,12,21), na.rm=TRUE)
A group of ten patients were asked to take an exercise every hour but they didn’t followed it. Suppose the number of times they took the exercise is recorded as follows but two patients left without providing their observations: 8, 7, 6, NA, 5, 9, NA, 5, 3, 4. Which of the following is the correct command to obtain the median of this data in R?
median(c(8, 7, 6, NA, 5, 9, NA, 5, 3, 4), na.rm=true)
median(c(8, 7, 6, NA, 5, 9, NA, 5, 3, 4), na.rm=TRUE)
median((8, 7, 6, NA, 5, 9, NA, 5, 3, 4),na.rm=TRUE)
median(c(8, 7, 6, na, 5, 9, na, 5, 3, 4),na.rm=T)
The number of hours in which the fever of 10 patients remain in control after administrating the medicine are recorded as follows: 10, 9, 8, 12, 11, 13, 9, 10, 7, 8. Which of the following is the correct command to obtain the harmonic mean of this data in R?
length(c(10,9,8,12,11,13,9,10,7,8))/mean(1/c(10,9,8,12,11,13,9, 10,7,8))
length(c(10,9,8,12,11,13,9,10,7,8))/(1/mean(c(10,9,8,12,11,13, 9,10,7,8)))
1/mean(1/(10,9,8,12,11,13,9,10,7,8))
1/mean(1/c(10,9,8,12,11,13,9,10,7,8))
An examination declares a candidate to be admitted if the marks obtained are in the top 20 percentile. Following four candidates obtained following scores. Candidate 1:73, Candidate 2:85, Candidate 3:80, and Candidate 4: 78. Which of them will appear in the examination.
Candidates 1,2,3 and 4.
Candidates 2,3 and 4.
Candidates 2 and 3.
Candidates 3 and 4.
R command of coefficient of variation of the data x
sqrt(var(x))/mean(x)
sqrt(var(x))/mean(y)
(var(x))/mean(x)
(var(x))/mean(y)
R command to find the Variance of x is
var(x)
sqrt(x)
var(y)
VAR(x)
Find the R command to find standard deviation of x is
VAR(x)
sqrt(var(x))
sqrtvar(x)
sqrt(x)
What is the R command to find range of x
range(x)
sqrt(x)
rangex
min(x)-max(x)
The output of the R command (sqrt(c(4,9,16,36))+ abs(c(-6,-4,4,6)))**2 is
64 49 64 144
16 14 16 24
error
NA NA NA NA
