Question

Please answer in RStudio--> the Exercise 6.73 is unnecessary and the problem is stated below.

3. Complete **Exercise 6.73** of the text. Assess your results by simulation as follows. Reset your random number seed to 4302019, then (a) simulate 10000 realizations of the maximum of two UniformC0,1) random variables (use runif in R, (b) plot their histogram, (c) add the theoretical probability density function that you derived in 6.73(a) to your histogram, (d) compute the empirical mean and variance of the maximum order statistic from your simulation. Finally, compare the theoretical values of SECU_2)$ and SVCU2)S that you computed in 6.73(b) to your simulation values from6.73 As in Exercise 6.72, let Y, and Y2 be independent and uniformly distributed over the interval (0, 1). Find a the probability density function of U2 max(Y, Y2 b E (U2) and V (U2)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

REQUIRED CODE

set.seed(4302019)
#part a)
x<-c()
for(i in 1:10000)
x<-c(x,min(runif(2)))
#part B)
hist(x,breaks = 10)
#part c) HERE CORRECT DENSITY IS 2*(1-X)
d<-c(0:50)/50
e<-2*(1-d)
hist(x,breaks = 10,probability = TRUE)
lines(d,e)
#part d)
mean_min<-mean(x)
var_min<-var(x)
print(mean_min)
print(var_min)
#theoritical mean is 0.33
#theoritical variance is 0.056

______________________________________

R OUTPUT

> set.seed(4302019)
> #part a)
> x<-c()
> for(i in 1:10000)
+   x<-c(x,min(runif(2)))
> #part B)
> hist(x,breaks = 10)
> #part c) HERE CORRECT DENSITY IS 2*(1-X)
> d<-c(0:50)/50
> e<-2*(1-d)
> hist(x,breaks = 10,probability = TRUE)
> lines(d,e)
> #part d)
> mean_min<-mean(x)
> var_min<-var(x)
> print(mean_min)
[1] 0.3350795
> print(var_min)
[1] 0.05598781
> #theoritical mean is 0.33
> #theoritical variance is 0.056

Add a comment
Know the answer?
Add Answer to:
Please answer in RStudio--> the Exercise 6.73 is unnecessary and the problem is stated below. We...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please answer in RStudio 2. Complete **Exercise 6.72** of the text. Assess your results by simulation...

    Please answer in RStudio 2. Complete **Exercise 6.72** of the text. Assess your results by simulation as follows. Reset your random number seed to 4302019, then (a) simulate 10000 realizations of the minimum of two Uniform(0,1) random variables Cuse runif in R, (b) plot their histogram, (c) add the theoretical probability density function that you derived in 6.72(a) to your histogram, (d) compute the empirical mean and variance of the minimum order statistic from your simulation. Finally, compare the theoretical...

  • If X and Y are independent and identically distributed uniform random variables on (0,1) compute the...

    If X and Y are independent and identically distributed uniform random variables on (0,1) compute the joint density of U = X+Y, V = X/(X+Y) Part A, The state space of (U,V) i.e. the domain D over which fU,Y (u,v) is non-zero can be expressed as (D = {(u,v) R x R] 0 < h1(u,v) < 1, 0 < h2(u,v) < 1} where x = h1 (u,v) and y = h2 (u,v) Find h1(u,v) = (write a function in terms...

  • Suppose we have 5 independent and identically distributed random variables X1, X2, X3, X4,X5 each with...

    Suppose we have 5 independent and identically distributed random variables X1, X2, X3, X4,X5 each with the moment generating function 212 Let the random variable Y be defined as Y = Σ We were unable to transcribe this image

  • 1. Let U be a random variable that is uniformly distributed on the interval (0,1) (a)...

    1. Let U be a random variable that is uniformly distributed on the interval (0,1) (a) Show that V 1 - U is also a uniformly distributed random variable on the interval (0,1) (b) Show that X-In(U) is an exponential random variable and find its associated parameter (c) Let W be another random variable that is uformly distributed on (0,1). Assume that U and W are independent. Show that a probability density function of Y-U+W is y, if y E...

  • Consider the boundary value problem for the general second-order equation with constant coefficients y(a)=YA, y(b)=YB L...

    Consider the boundary value problem for the general second-order equation with constant coefficients y(a)=YA, y(b)=YB Let the interval a<x<b divided into n subintervals of width h=(b-a)/n.Using central difference approximations find the lineer system that must be solved to approximate y2,y3,,,yn We were unable to transcribe this image01.2 h2 2h We were unable to transcribe this imageProblem 3 boundary value problem for the general second-order equation with constant coefficients dy dy y(a) YA, ybYB. Let the interval a s b be...

  • 8. (11 pts) Use the Transformation Method on this problem (be sure to verify that the...

    8. (11 pts) Use the Transformation Method on this problem (be sure to verify that the function h(y) is increasing or decreasing over the domain of y, either by graphing h(y) or by using differential calculus): A fluctuating electric current X may be considered a uniformly distributed random variable over the interval (6, 10). Find the probability density function of the power P which can be expressed as ?? = 2??2. 8. (1 pts Use the Transformation M ethod on...

  • problem 3 and 4 please. 3. Find the moment generating function of the continuous random variable...

    problem 3 and 4 please. 3. Find the moment generating function of the continuous random variable & such that i f(x) = { 2 sinx, Ox CT, no otherwise. 4. Let X and Y be independent random variables where X is exponentially distributed with parameter value and Y is uniformly distributed over the interval from 0 to 2. Find the PDF of X+Y.

  • Problem 6: 10 points Assume that X and Y are independent random variables uniformly distributed over...

    Problem 6: 10 points Assume that X and Y are independent random variables uniformly distributed over the unit interval (0,1) 1. Define Z-max (X, Y) as the larger of the two. Derive the C.D.F. and density function for Z. 2. Define Wmin (X, Y) as the smaller of the two. Derive the C.D.F. and density function for W 3. Derive the joint density of the pair (W, Z). Specify where the density if positive and where it takes a zero...

  • Problem 6: 10 points Assume that X and Y are independent random variables uniformly distributed over...

    Problem 6: 10 points Assume that X and Y are independent random variables uniformly distributed over the unit interval (0,1) 1. Define Z max (X. Y) as the larger of the two, Derive the C.DF. and density function for Z. 2. Define W min(X,Y) as the smaller of the two. Derive the C.D.F.and density function for W 3. Derive the joint density of the pair (W. Z). Specify where the density if positive and where it takes a zero value....

  • Exercise 8. Alice and Bob are supposed to meet at 2pm. The number of hours Alice...

    Exercise 8. Alice and Bob are supposed to meet at 2pm. The number of hours Alice is late is distributed uniformly over (0, 2). The number of hours Bob is late is distributed according to an exponential random variable with parameter 1. Their respective delays are supposed to be independent. Let X be the time at which Alice and Bob actually meet (in number of hours after 2pm). (a) (4 points) Find the cumulative distribution function of X. (b) (2...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT