
1.
The profiler can be turned off by passing _________ to Rprof().
0
1
2
NULL
Answer

2.
You can time ________ expressions by wrapping them in curly braces within the call to system.time().
smaller
longer
error
All of the mentioned
Answer

3.
Parallel processing is done via __________ package can make the elapsed time smaller than the user time.
parallel
statistics
distributed
None of the mentioned
Answer

4.
The elapsed time may be ________ than the user time if your machine has multiple cores/processors
smaller
greater
equal to
All of the mentioned
Answer

5.
_________ time is time charged to the CPU(s) for the R expression.
elapsed
user
response
All of the mentioned
Answer

6.
system.time function returns an object of class _______ which contains two useful bits of information.
debug_time
proc_time
procedure_time
All of the mentioned
Answer

7.
Point out the correct statement :
Rprofiler() tabulates how much time is spent inside each function
Rprof() keeps track of the function call stack at regularly sampled intervals
By default, the profiler samples the function call stack every 2 seconds
None of the mentioned
Answer

8.
The _______ function computes the time (in seconds) needed to execute an expression.
system.timedeb()
system.time()
system.datetime()
All of the mentioned
Answer

9.
R comes with a ________ to help you optimize your code and improve its performance.
debugger
monitor
browser
profiler
Answer

10.
Point out the correct statement :
The Rprofiler() function starts the profiler in R
Using system.time() allows you to test certain functions or code blocks to see if they are taking excessive amounts of time
R must not be compiled with profiler support
All of the mentioned
Answer

11.
________ is a systematic way to examine how much time is spent in different parts of a program.
Profiling
Monitoring
Logging
All of the mentioned
Answer

12.
What will be the output of the following code ?
> set.seed(20)
> x < rnorm(100)
> e < rnorm(100, 0, 2)
> y < 0.5 + 2 * x + e
> summary(y)
Min. 1st Qu. Median Mean 3rd Qu. Max.
6.4080 1.5400 0.6789 0.6893 2.9300 6.5050
Min. 1st Qu. Median Mean 3rd Qu. Max.
6.4080 10.5400 0.6789 5.6893 2.9300 6.5050
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.4080 6.5400 0.6789 0.6893 2.9300 6.5050
All of the mentioned
Answer

13.
Which of the following code represents count with mean of 2 ?
rpois(10, 2)
rpois(10, 20)
rpois(20, 2)
All of the mentioned
Answer

14.
What will be the output of the following code ?
> rpois(10, 1)
[1] 7 0 1 1 2 1 1 4 1 2
[1] 0 8 1 1 2 1 1 4 1 2
[1] 0 0 1 1 2 1 1 4 1 2
All of the mentioned
Answer

15.
__________ distribution is commonly used to model data that come in the form of counts.
Gaussian
Parametric
Poisson
All of the mentioned
Answer

16.
What will be the output of the following code >
> set.seed(10)
> x < rbinom(100, 1, 0.5)
> str(x)
int [1:100] 1 0 0 1 0 0 0 0 1 0 ...
int [1:100] 10 0 01 1 0 0 01 0 1 0 ...
int [1:100] 1 03 0 1 0 0 0 02 1 0 ...
int [1:100] 1 2 3 1 1 0 0 0 1 0 ...
Answer

17.
Point out the wrong statement :
Drawing samples from specific probability distributions can be done with “s” functions
The sample() function draws randomly from a specified set of (scalar) objects allowing you to sample from arbitrary distributions of numbers
The sampling() function draws randomly from a specified set of objects
None of the mentioned
Answer

18.
_______ function is used to simulate binary random variables.
dnorm
rbinom()
binom()
rpois
Answer

19.
5 Normal random numbers can be generated with rnorm() by setting seed value to :
1
2
3
4
Answer

20.
Point out the correct statement :
When simulating any random numbers it is not essential to set the random number seed
It is not possible to generate random numbers from other probability distributions like the Poisson
You should always set the random number seed when conducting a simulation
All of the mentioned
Answer