Question

4. Using R code, compare the pdfs of three normal random variables, one with mean 1...

4. Using R code, compare the pdfs of three normal random variables, one with mean 1 and standard deviation 1, one with mean 1 and standard deviation 10, and one with mean -4 and standard deviation 1.

Thank you

Homework Answers

Answer #1

If we plot three pdf separately we get:

  • Mean=1, SD=1

R code: ggdistribution(dnorm,seq(-4,4,0.1),mean=1,sd=1)

​​​​​​​​​​​​Mean=1,SD=10

R code: ggdistribution(dnorm,seq(-10,5,0.1),mean=1,sd=10)

Mean=-4,SD=1

R code: ggdistribution(dnorm,seq(-30,35,0.1),mean=-4,sd=1)

For comparison we plot them into one graph and get:

Red: mean=1 SD=10

Blue: mean=1 SD=1

Yellow: mean=-4 SD=1

R code:

p=ggdistribution(dnorm,seq(-30,35,0.1),mean=1,sd=1,colour='blue')
p=ggdistribution(dnorm,seq(-30,35,0.1),mean=1,sd=10,colour='red',p=p)
ggdistribution(dnorm,seq(-30,35,0.1),mean=-4,sd=1,colour='yellow',p=p)

​​​​​​​

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
PLEASE USE R CODE!! Continue to generate standard normal random variables until you have generated n...
PLEASE USE R CODE!! Continue to generate standard normal random variables until you have generated n of them, where n≥100 is such that S/sqrt(n) <0.1, where S is the sample standard deviation of the n data value. (a)How many normals do you think will be generated? (b)What is the sample mean of all the normals generated? (c)What is the sample variance?
(1) Generate 80 normally distributed random variables with the mean 30 and the standard deviation 8,...
(1) Generate 80 normally distributed random variables with the mean 30 and the standard deviation 8, and store them in the vector ‘rand.vec. Then plot their empirical distribution function. (2) Given a normal distribution with the mean 30 and the standard deviation 8, find the two values of x that contain the middle 70% of the normal curve area. (3) Calculate the probability for 2.5 < X < 10 in a Poisson distribution with the mean 6 use in R...
1. Variance of normal random variables. a. Run a simulation to determine what is the standard...
1. Variance of normal random variables. a. Run a simulation to determine what is the standard deviation of the sum of 16 standard normal variables. Make sure that you run a sufficient number of simulations so that your answer is stable (e.g., run the simulation a few times to make sure the answer comes up about the same). Include both your code and answer in your solutions. b. Given the results of your simulation, what do you think is the...
Let X and Y be two normal random variables. Given that the mean of X is...
Let X and Y be two normal random variables. Given that the mean of X is 6 and its standard deviation is equal to 1, and the mean of Y is 2 with standard deviation 3. What is the probability that Z= X-3Y is positive?.
The returns of three stocks are random variables (R1, R2, R3). The mean returns of three...
The returns of three stocks are random variables (R1, R2, R3). The mean returns of three stocks are (10%, 5%, 3%). The covariance (in percentage term2 ) is given by stock1 stock2 stock3 stock1 8 0.6 0.01 stock2 5 stock3 1 If you have allocated 20% of your assets in stock 1, 10% in stock 2 and the rest in stock 3, what is the mean return on your asset? The standard deviation?
using r (include all code and packages used) Generate 25 variables, each of which consists of...
using r (include all code and packages used) Generate 25 variables, each of which consists of 25 random samples from a standard normal. Store these variables in a data frame – call it df.train – and randomly select one variable to be the response – rename it y. (The end result should be a data frame with 25 observations on 25 variables but with no relationships between any of the variables.) Repeat step (a) to create a test set called...
Three tables listed below show random variables and their probabilities. However, only one of these is...
Three tables listed below show random variables and their probabilities. However, only one of these is actually a probability distribution. A B C X P(X) X P(X) X P(X) 5 0.3 5 0.1 5 0.5 10 0.3 10 0.2 10 0.3 15 0.2 15 0.3 15 −0.2 20 0.4 20 0.4 20 0.4 b. Using the correct probability distribution, find the probability that x is: (Round the final answers to 1 decimal place.) 1. Exactly 15 =    2. No...
R Programming: a.Choose 10 random values of X having the Normal(4, 1) distribution. Use t.test to...
R Programming: a.Choose 10 random values of X having the Normal(4, 1) distribution. Use t.test to compute the 95% confidence interval for the mean. Is 4 in your confidence interval? b.Replicate the experiment in part a 10,000 times and compute the percentage of times the population mean 4 was included in the confidence interval. c.Repeat part b, except sample your 10 values when X has the Exponential(1/4) distribution. What is the mean of X? What percentage of times did the...
Three tables listed below show random variables and their probabilities. However, only one of these is...
Three tables listed below show random variables and their probabilities. However, only one of these is actually a probability distribution. A B C X P(X) X P(X) X P(X) 5 0.1 5 0.1 5 0.1 10 0.3 10 0.3 10 0.3 15 0.4 15 0.4 15 0.4 20 0.2 20 0.4 20 0.6 a. Which is it? (Click to select)  B  C  A b. Using the correct probability distribution, find the probability that x is: (Round the final answers to 1 decimal place.)...
Given a mean of 100 and a standard deviation of​ 10, convert the random variables to​...
Given a mean of 100 and a standard deviation of​ 10, convert the random variables to​ Z-scores, then use a standard normal table below to find the probabilities. ​1. ​Pr[75 ≤ X​ ≤ 100​]​=  ​2. ​Pr[85 ≤ X​ ≤ 125​] =  3. Pr[X​ ≥ 115​] ​= 
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT