Ba 205 MCQ
Ba 205 MCQ
MCQ
Sr Question Answer
No
1 Which of these measures are used to analyse the central tendency of data? B
a. Mean and Normal Distribution
b. Mean, Median and Mode
c. Mode, Alpha & Range
d. Standard Deviation, Range and Mean
2 Five numbers are given: (5, 10, 15, 5, 15). Now, what would be the sum of D
deviations of individual data points from their mean?
A) 10 B)25 C) 50 D) 0
3 A test is administered annually. The test has a mean score of 150 and a A
standard deviation of 20. If Ravi’s z-score is 1.50, what was his score on the
test?
A) 180 B) 130 C) 30 D) 150
a) “a+b”
b) “a=b”
c) “a b :”
d) none of the mentioned
21 Point out the correct statement? D
a) In R, a function is an object which has the mode function
b) R interpreter is able to pass control to the function, along with arguments that
may be necessary for the function to accomplish the actions that are desired
c) Functions are also often written when code must be shared with others or the
public
d) All of the mentioned
22 The function returns a list of all the formal arguments of a function. A
a) formals()
b) funct()
c) formal()
d) fun()
23 What will be the output of the following R code snippet? A
> f <- function(num = 1) {
+ hello <- "Hello, world!\n"
+ for(i in seq_len(num)) {
+ cat(hello)
+ }
+ chars <- nchar(hello) * num
+ chars
+}
> f()
a)
Hello, world!
[1] 14
b) Hello,
world![1] 15
c) Hello,
world![1] 16
d) Error
24 Point out the wrong statement? A
a) A formal argument can be a symbol, a statement of the form ‘symbol =
expression’, or the special formal argument
b) The first component of the function declaration is the keyword function
c) The value returned by the call to function is not a function
d) Functions are also often written when code must be shared with others or the
public
25 You can check to see whether an R object is NULL with the function. A
a) is.null()
b) is.nullobj()
c) null()
d) as.nullobj()
26 Which of the following code will print NULL? A
a) > args(paste)
b) > arg(paste)
c) > args(pastebin)
d) > arg(bin)
33 suspends the execution of a function wherever it is called and puts the function C
in debug mode
a) recover()
b) browser()
c) Both of the above
d) None of the above
34 A matrix is dimensionsinal rectangular data set? D
a) 5
b) 4
c) 3
d) 2
The function takes a vector or other objects and splits it into groups determined B
by a factor or list of factors.
a) apply()
b) split()
c) isplit()
d) mapply()
35
lapply function takes arguments in R language C
a) 1
b) 3
c) 4
d) 5
36
is used to apply a function over subsets of a vector D
a) apply()
37 b) lapply()
c) mapply()
d) tapply()
a) matr()
b) mat()
c) matrix()
d) None of the above
42
Which of the following method make a vector of repeated values? B
a) rep()
b) data()
43 c) view()
d) None of the above
R objects can have attributes, which are like for the object A
a) metadata
b) features
c) expressions
d) None of the above
44
Attributes of an object (if any) can be accessed using the function. C
a) objects()
b) attrib()
c) attributes()
d) None of the above
45
a) Regression
b) Clustering
c) Summarization
46
provides needed string operators in R C
a) str
b) forcast
c) stringr
47
splits a data frame and results in an array (hence the da). Hopefully, you’re B
getting the idea here.
a) apply
b) daply
c) stats
48
System.time function returns an object of class which contains two useful bits C
of information.
a) debug_time
b) procedure_time
c) proc_time
49
Which of the following will start the R program? A
a) $R
50 b) &R
c) Rb
d) None of the above
a. A win
b. A Failure
c. A success
10 d. A Precondition
A State Diagram is used for what? D
a. Which Events cause a transition between states
b. Which events cause a success between states
c. Allowable behaviour
11 d, All
A Solution Requirement is comprised of two types of requirements what are A
they?
a, Functional
b. Hard
c. Existing
12 d. Non-Functional
Which of the following is used for Statistical analysis in R language? B
a) Studio
b) RStudio
13 c) Heck
d) None of the above
a) 8
b) 9
c) 42
d) d) Error
function(p) {
params[!fixed] <- p
mu <- params[1]
a <- -0.5*length(data)*log(2*pi*sigma^2)
-(a + b)
}
> ls(environment(nLL))
R is an programming language? C
a) Closed source
b) GPL
c) Open source
22 d) Definite sourc
Who developed R? A
a) Dennis Ritchie
b) John Chambers
c) Bjarne Stroustrup
d) Bill Gates
23
a) Descriptive analysis
b) Predicitive analysis
c) Both the above
d) None of the above
29 How many steps does the predictive analysis process contained? D
a) 5
b) 6
c) 7
d) 8
a) Past
b) Present
c) Future
a) 4
b) 5
c) 6
d) 7
a) 1
b) 2
c) 3
d) 4
40
and are types of matrices functions? C
41
How many control statements are present in R? A
a) 6
b) 7
c) 8
d) 9
42
43 Which of the following finds the maximum value in the vector x, exclude missing b
values
a) rm(x)
b) all(x)
c) max(x, na.rm=TRUE)
d) x%in%y
44 Which of the following sort dataframe by the order of the elements in B A
a) a.x[rev(order(x$B)),]
b) b.x[ordersort(x$B),
c) c.x[order(x$B),]
d) None of the above
Unit-3 : Fundamentals of R
21 Which of the following commands will split the plotting window into 4 X 3 B
windows and where the plots enter the window column wise.
A) par(split=c(4,3))
B) par(mfcol=c(4,3))
C) par(mfrow=c(4,3))
D) par(col=c(4,3))
22 Which of the following command will help us to rename the second column in D
a dataframe named “table” from alpha to beta?
A) colnames(table)[2]=’beta’
B) colnames(table)[which(colnames==’alpha’)]=’beta’
C) setnames(table,’alpha’,’beta’)
D) All of the above
23 A majority of work in R uses systems internal memory and with large C
datasets, situations may arise when the R workspace cannot hold all the R
objects in memory. So removing the unused objects is one of the solution.
Which of the following command will remove an R object / variable named
“santa” from the workspace?
A) remove(santa)
B) rm(santa)
C) Both
D) None
24 “dplyr” is one of the most popular package used in R for manipulating data D
and it contains 5 core functions to handle data. Which of the following is not
one of the core functions of dplyr package?
A) select()
B) filter()
C) arrange()
D) summary()
10 Which of the following is a possible value for the median of the below distribution? B
A) 32
B) 26
C) 17
D) 40
11 Which of the following statements are true about Bessels Correction while calculating C
a sample standard deviation?
Bessels correction is always done when we perform any operation on a sample data.
Bessels correction is used when we are trying to estimate population standard
deviation from the sample.
Bessels corrected standard deviation is less biased.
A) Only 2
B) Only 3
C) Both 2 and 3
D) Both 1 and 3
If the variance of a dataset is correctly computed with the formula using (n – 1) in the A
12 denominator, which of the following option is true?
A) Dataset is a sample
B) Dataset is a population
C) Dataset could be either a sample or a population
D) Dataset is from a census
E) None of the above
13 What would be the critical values of Z for 98% confidence interval for a two-tailed test A
?
A) +/- 2.33
B) +/- 1.96
C) +/- 1.64
D) +/- 2.55
14 Studies show that listening to music while studying can improve your memory. To D
demonstrate this, a researcher obtains a sample of 36 college students and gives them
a standard memory test while they listen to some background music. Under normal
circumstances (without music), the mean score obtained was 25 and standard
deviation is 6. The mean score for the sample after the experiment (i.e With music) is
28.
What is the null hypothesis in this case?
A) Listening to music while studying will not impact memory.
B) Listening to music while studying may worsen memory.
C) Listening to music while studying may improve memory.
D) Listening to music while studying will not improve memory but can make it worse.
15 Studies show that listening to music while studying can improve your memory. To B
demonstrate this, a researcher obtains a sample of 36 college students and gives them
a standard memory test while they listen to some background music. Under normal
circumstances (without music), the mean score obtained was 25 and standard
deviation is 6. The mean score for the sample after the experiment (i.e With music) is28.
What would be the Type I error?
A) Concluding that listening to music while studying improves memory, and it’s right.
B) Concluding that listening to music while studying improves memory when it
actually doesn’t.
C) Concluding that listening to music while studying does not improve memory but it
does.
D) None of the above
Studies show that listening to music while studying can improve your memory. To B
16 demonstrate this, a researcher obtains a sample of 36 college students and gives them
a standard memory test while they listen to some background music. Under normal
circumstances (without music), the mean score obtained was 25 and standard
deviation is 6. The mean score for the sample after the experiment (i.e With music) is
After performing the Z-test, what can we conclude ?
A) Listening to music does not improve memory.
B)Listening to music significantly improves memory at p
C) The information is insufficient for any conclusion.
D) None of the above
17 A researcher concludes from his analysis that a placebo cures AIDS. What type of error D
is he making?
A) Type 1 error
B) Type 2 error
C) None of these. The researcher is not making an error.
D) Cannot be determined
18 What happens to the confidence interval when we introduce some outliers to the data? B
A) Confidence interval is robust to outliers
B) Confidence interval will increase with the introduction of outliers.
C) Confidence interval will decrease with the introduction of outliers.
D) We cannot determine the confidence interval in this case
19 A medical doctor wants to reduce blood sugar level of all his patients by altering their B
diet. He finds that the mean sugar level of all patients is 180 with a standard deviation
of 18. Nine of his patients start dieting and the mean of the sample is observed to 175.
Now, he is considering to recommend all his patients to go on a diet.
Note: He calculates 99% confidence interval.
What is the standard error of the mean?
A) 9
B) 6
C) 7.5
D) 18
a) n( )
b) ncol( )
c) nobs( )
d) nrow( )
a. The freedom to study how the program works, and adapt it to your needs.
b. The freedom to improve the program, and release your improvements to
the public, so that the whole community benefits.
c. The freedom to run the program, for any purpose.
d. The freedom to sell the software for any price.
22
Point out the correct statement : C
a) Blocks are evaluated until a new line is entered after the closing brace
b) Single statements are evaluated when a new line is typed at the start of the
syntactically complete statement
c) The if/else statement conditionally evaluates two statements
d) All of the mentioned
23
Which will be the output of following code ? C
x-3
switch(6, 2+2, mean(1:10), rnorm(5))
a) 10
b) 1
c) NULL
d) All of the mentioned
24
25 is used to continue an iteration of a loop. A
a) next
b) skip
c) group
d) All of the mentioned
a) debug()
b) trace()
c) browser()
d) All of the mentioned
28 Point out the correct statement : A
a) function()
b) funct()
c) functions()
d) All of the mentioned
a) apply()
b) lapply()
c) sapply()
d) mapply()
a) split() takes elements of the list and passes them as the first argument of the
function you are applying
b) You can use tsplit() to evaluate a function single time each with a same
Argument
c) Sequence of operations is sometimes referred to as “map-reduce”
d) None of the mentioned
A function, together with an environment, makes up what is called a B
33 closure.
a) formal
b) function
c) reflective
d) All of the mentioned
34 The function is used to plot negative likelihood. A
a) plot()
b) graph()
c) graph.plot()
d) None of the mentioned
41 In the base graphics system, which function is used to add elements to a plot? C
a) Boxplot()
b) Text()
c) Boxplot() or Text()
d) Treat()
42 What are the different types of sorting algorithms available in R language? D
a) Bubble
b) Selection
c) Merge
d) All sorts
43 What will be the output of log (-5.8) when executed on R console? A
a) NAN
b) NA
c) Error
d) 0.213
44 _________ is an indication that a fatal problem has occurred and execution of B
the function stops.
a) message
b) error
c) warning
d) message & warning
45 In 1991, R was created by Ross Ihaka and Robert Gentleman in the Department D
of Statistics at the University of _________
a) John Hopkins
b) California
c) Harvard
d) Auckland
46 Warnings are generated by the _________ function. A
a) warning()
b) error()
c) run()
d) message()
1 is a subset of A
a) A speech
b) A movie
c) A picture
d) The rain on our face
22 Suppose there are 2 dataframes “A” and “B”. A has 34 rows and B has 46 rows. C
What will be the number of rows in the resultant dataframe after running the
following command?
merge(A,B,all.x=TRUE)
A) 46
B) 12
C) 34
D) 80
23 The very first thing that a Data Scientist generally does after loading dataset is find C
out the number of rows and columns the dataset has. In technical terms, it is called
knowing the dimensions of the dataset. This is done to get an idea about the scale of
data that he is dealing with and subsequently choosing the right techniques and
tools.
Which of the following command will not help us to view the dimensions of our
dataset?
A) dim()
B) str()
C) View()
D) None of the above
24 Point out the wrong statement? A
a) A formal argument can be a symbol, a statement of the form ‘symbol = expression’,
or the special formal argument
b) The first component of the function declaration is the keyword function
c) The value returned by the call to function is not a function
d) Functions are also often written when code must be shared with others or the
public
25 You can check to see whether an R object is NULL with the _________ function. A
a) is.null()
b) is.nullobj()
c) null()
d) as.nullobj()
26 Which of the following code will print NULL? A
a) > args(paste)
b) > arg(paste)
c) > args(pastebin)
d) > arg(bin)
27 What will be the output of the following R code snippet? A
> paste("a", "b", sep = ":")
a) “a+b”
b) “a=b”
c) “a:b”
d) a*b
28 What will be the output of the following R code snippet? A
> f <- function(a, b) {
+ print(a)
+ print(b)
+}
> f(45) a) 32 b) 42 c) 52 d) 45