Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. ________ generate random Normal variates with a given mean and standard deviation
a) dnorm
b) rnorm
c) pnorm
d) rpois

Answer: b [Reason:] The “r” function is the one that actually simulates random numbers from that distribution.

2. Point out the correct statement :
a) R comes with a set of pseudo-random number generators
b) Random number generators cannot be used to model random inputs
c) Statistical procedure does not require random number generation
d) All of the mentioned

Answer: a [Reason:] R allows you to simulate from well known probability distributions like the Normal, Poisson, and binomial.

3. ______ evaluate the cumulative distribution function for a Normal distribution
a) dnorm
b) rnorm
c) pnorm
d) rpois

Answer: c [Reason:] p stands for cumulative distribution.

4. _______ generate random Poisson variates with a given rate
a) dnorm
b) rnorm
c) pnorm
d) rpois

Answer: d [Reason:] q stands for quantile function (inverse cumulative distribution).

5. Point out the wrong statement :
a) For each probability distribution there are typically three functions
b) For each probability distribution there are typically four functions
c) r function is sufficient for simulating random numbers
d) None of the mentioned

Answer: a [Reason:] There are typically four functions available that start with a “r”, “d”, “p”, and “q”.

6. Which of the following evaluate the Normal probability density (with a given mean/SD) at a point ?
a) dnorm
b) rnorm
c) pnorm
d) rpois

Answer: a [Reason:] That point can be vector of points.

7. _________ is the most common probability distribution to work with.
a) Gaussian
b) Parametric
d) All of the mentioned

Answer: a [Reason:] Working with the Normal distributions requires using four functions.

8. What will be the output of the following code ?

```> x <- rnorm(10)
> x```

a)

``` 0.01874617 -0.18425254 -1.37133055 -0.59916772 0.29454513
 0.38979430 -1.20807618 -0.36367602 -1.62667268 -0.25647839```

b)

``` 22.20356 21.51156 19.52353 21.97489 21.48278 20.17869 18.09011
 19.60970 21.85104 20.96596```

c)

```Min. 1st Qu. Median Mean 3rd Qu. Max.
18.09 19.75 21.22 20.74 21.77 22.20```

d) All of the mentioned

Answer: a [Reason:] Here we simulate standard Normal random numbers with mean 0 and standard deviation 1.

9. What will be the output of the following code ?

```> x <- rnorm(10)
> summary(x)```

a)

``` 0.01874617 -0.18425254 -1.37133055 -0.59916772 0.29454513
 0.38979430 -1.20807618 -0.36367602 -1.62667268 -0.25647839```

b)

``` 22.20356 21.51156 19.52353 21.97489 21.48278 20.17869 18.09011
 19.60970 21.85104 20.96596```

c)

```Min. 1st Qu. Median Mean 3rd Qu. Max.
18.09 19.75 21.22 20.74 21.77 22.20```

d) All of the mentioned

Answer: c [Reason:] We can modify the default parameters to simulate numbers with mean 20 and standard deviation 2.

10. What will be the output of the following code ?

` > pnorm(2)`

a) 0.9772499
b) 1.9772499
c) 0.6772499
d) All of the mentioned