Question

Question 4(4 point) 4.1) Which of the following produces a probability histogram? Hist(1:1000, probability=TRUE) , histogram(1:1000,...

Question 4(4 point)

4.1) Which of the following produces a probability histogram?

  1. Hist(1:1000, probability=TRUE) ,
  2. histogram(1:1000, probability=TRUE)
  3. hist(rexp(1000,3))
  4. hist(rbinom(1000, 10, 0.2))
  5. Noe of these

4.2) Which of the following R code generates 1000 random variates from an Exponential distribution with mean 1/3?

  1. rexp(1000, rate=1/3)
  2. rexp(1/3, 1000)
  3. rexp(1000, rate=3)
  4. rexp(3, 1000)
  5. None of these

4.3) Which of the following R code generates 1000 random variates from a Normal distribution with mean 10 and variance 4?

  1. rnorm(1000, 10, 4)
  2. rnorm(1000, 4, 10)
  3. rnorm(10, 4, 1000)
  4. rnorm(1000, 10, 2)
  5. rnorm(10, 2, 1000)

4.4) Which of the following R code generates 1000 random variates from an Exponential distribution with mean 1/3?

  1. 3*log(1-runif(1000))
  2. log(1-runif(1000))/3
  3. -log(1-runif(1000))/3
  4. -3*log(1-runif(1000))
  5. None of these

Homework Answers

Answer #1

4.1) Which of the following produces a probability histogram?

A probability histogram is a graph that shows the probability of each outcome on axis.

C. hist(rexp(1000,3))

4.2) Which of the following R code generates 1000 random variates from an Exponential distribution with mean 1/3?

In R “rate” is what we call Lambda.

Lambda = .2 So, mean = sd = 1/.2

hence here mean = sd = 1/3  so, Lambda = 3

C. rexp(1000, rate=3)

4.3) Which of the following R code generates 1000 random variates from a Normal distribution with mean 10 and variance 4?

rnorm(n, mean = 0, sd = 1)

Here, variance is 4 hence standard deviation is 2.

D. rnorm(1000, 10, 2)

4.4) Which of the following R code generates 1000 random variates from an Exponential distribution with mean 1/3?

For exponential distribution we use rexp.

E. None of these

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Below is R code (R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night") to plot a...
Below is R code (R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night") to plot a pareto distribution. For part (c), I'm unable to get the density curve to show up in the histogram. Thanks! Problem 1. The Pareto distribution has been used in economics as a model for a density function with a slowly decaying tail. The Pareto($a$,$b$) distribution has pdf $$ f(x) = \frac{ab^{a}}{x^{a+1}}, \quad x \geq b $$ Set the seed number set.seed(210) (a) Use the inverse...
Which of the following is true regarding probability distributions? The flatter the probability distribution, the less...
Which of the following is true regarding probability distributions? The flatter the probability distribution, the less risk is involved. The returns of a Treasury bond have a vertical line for a probability distribution. The returns of a Treasury bond have a horizontal line for a probability distribution. The further away something is from the mean, the more likely it is to occur. None of the answers are correct.
Use the programming language R to code the following project.. * Make sure you turn in...
Use the programming language R to code the following project.. * Make sure you turn in your code and answers from each question. (not the raw data). 1. Generate 1000 random samples of size 40 from the normal distribution with mean µ = 3 and standard deviation σ = 2. Compute 95% the confidence interval of 1000 samples and find the rate of confidence interval contains the true mean. What did you learn from this simulation study? 2. For each...
Using R programming language, complete the following. 1. Generate the bivariate normal sample of size 100...
Using R programming language, complete the following. 1. Generate the bivariate normal sample of size 100 with parameters a. marginal mean of X equal to 1, b. marginal mean of Y equal to 2, c. marginal variance of X equal to 3, d. marginal variance of Y equal to 4, e. correlation between X and Y equal to -1/2. You can use the function mvrnorm(), first installing its package by the code if (! require ("MASS")) install.packages("MASS"); library ("MASS") 2....
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly...
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly 4 times in 10 flips of a fair coin. One way to generate a flip of the coin is to create a vector in R with all of the possible outcomes and then randomly select one of those outcomes. The sample function takes a vector of elements (in this case heads or tails) and chooses a random sample of size elements. coin <- c("heads","tails")...
Question 1 of 3 Which of the following is true about the random variables X, Y,...
Question 1 of 3 Which of the following is true about the random variables X, Y, and Z? X is binomial with n = 20 and p = .22. Y is binomial with n = 40 and p = .32. Z is not binomial. All of the above are true. Only (A) and (B) are true. Question 2 of 3 What is the probability that exactly 2 of the 20 older adults prefer organic? (Note: Some answers are rounded.) .105...
Question (2) [5 marks] (Use R) Suppose you have a company producing cupcakes. Each cupcake is...
Question (2) [5 marks] (Use R) Suppose you have a company producing cupcakes. Each cupcake is supposed to contain 10 grams of sugar. The cupcakes are produced by a machine that adds the sugar in a bowl before mixing everything. You believe the machine does not add 10 grams of sugar for each cupcake. If your assumption is true, the machine needs to be fixed. You stored the level of sugar of thirty cupcakes. Note: You can create a randomized...
1. For which type of continuous distribution are the mean and the median always the same?...
1. For which type of continuous distribution are the mean and the median always the same? uniform and normal distributions only all of the above uniform distribution exponential distribution normal distribution 2. The skewness of a normal distribution is: negative zero positive something that varies 3. The standard normal probability distribution has a mean of ______ and a standard deviation of ______. 0, 1 1, 0 1, 1 0, 0 4. Any normal probability distribution can be converted to a...
The probability of a man hitting the target at a shooting range is 1/4. If he...
The probability of a man hitting the target at a shooting range is 1/4. If he shoots 30 times, what is the probability that he hits the target at least 10 times?  (Copy your R code and the result). Suppose  X follows a Chi-square distribution with degree of freedom 12. Find the cutoff point a, such that, P(X<a) = 0.85. Entry to a certain University is determined by a national test. The scores on this test are normally distributed with a mean...
Which of the following is always true for all probability density functions of continuous random variables?...
Which of the following is always true for all probability density functions of continuous random variables? A. They have the same height B. They are bell-shaped C. They are symmetrical D. The area under the curve is 1.0 Like the normal distribution, the exponential density function f(x) A. is bell-shaped B. approaches zero as x approaches infinity C. approaches infinity as x approaches zero D. is symmetrical
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT