Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Refer to image. Please write using R code. Problem 3 . Suppose that ( x , Y ) follows a bivariate normal distribution with a

Refer to image. Please write using R code. Problem 3. Suppose that (x,Y) follows a bivariate normal distribution with a joint density
f(x,y)=12121-22exp[-12(1-2){(x-1)212-2(x-1)(y-2)12+(y-2)222}]
where 1=1,2=2,1=1,2=2, and correlation =0.5.
(a) Write R code for a 3D plot of f(x,y) vs.(x,y) over the grid points grid. ,
3, by=0.1) for x and grid. , by =0.1 for y.
(b) To sample (x,Y) from this joint distribution, one can use the following algorithm:
(i). generate x from its marginal distribution N(1,12);
(ii). generate Y given x from a conditional density
Y|x=xN(2+21(x-1),(1-2)22).
Use this algorithm to generate n=10,000 pairs of random values from this joint
distribution.
(c) Based on the 10,000 pairs of random values, calculate the sample correlation coefficient
r between the x- and Y-samples and also evaluate the following probabilities:
(c1).P(x0.5,Y1.3)
(c2).P(x1.5|Y3.0)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions

Question

1. What steps might you include or remove from this process?

Answered: 1 week ago