Consider the following joint probability density function 1 f(x, y) ²2-2pzy+s"), x,y € R, p E [-1, 1]. 27/1 A special case of the bivariate normal distribution centered at (µx, µy) = (0,0), with component variances (ož,o3) = (1, 1) and correlation parameter p.

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
2) Consider the following joint probability density function
1
f(r, v) = a ), 1,y € R, p E [–1,1).
27 V1- p2
21- (22–2pxy+y?)
x, Y E R, p E [–1, 1].
A special case of the bivariate normal distribution centered at (µx, µy) = (0, 0), with
component variances (o,o3) = (1, 1) and correlation parameter p.
(a) Write an R function that computes f(x, y) for any value of x, y and p.
(b) Plot (a) with p = 0 for x E [-3,3] and y E [-3,3]. Use light blue, values of phi
and theta of 30 and add "f(x,y)" as a label for the z axis.
(c) Using (b) plot with phi = theta = i, i = 0, 10, 20, 30, . .. , 100. Do this in a for loop
with a pause of one second between each plot. Hint: Use R's help on Sys.sleep().
(d) Repeat (b) with p = -0.8, –0.5, 0.0,0.5, 0.8. What do you observe?
(e) Plot f(x, 1) on x E [-3,3] with p= 0. What does this curve look like to you?
(f) Plot f(1,y) on y E [-3, 3] with p= 0.
Submit your R code as q2.R using the same conventions as question 1).
Transcribed Image Text:2) Consider the following joint probability density function 1 f(r, v) = a ), 1,y € R, p E [–1,1). 27 V1- p2 21- (22–2pxy+y?) x, Y E R, p E [–1, 1]. A special case of the bivariate normal distribution centered at (µx, µy) = (0, 0), with component variances (o,o3) = (1, 1) and correlation parameter p. (a) Write an R function that computes f(x, y) for any value of x, y and p. (b) Plot (a) with p = 0 for x E [-3,3] and y E [-3,3]. Use light blue, values of phi and theta of 30 and add "f(x,y)" as a label for the z axis. (c) Using (b) plot with phi = theta = i, i = 0, 10, 20, 30, . .. , 100. Do this in a for loop with a pause of one second between each plot. Hint: Use R's help on Sys.sleep(). (d) Repeat (b) with p = -0.8, –0.5, 0.0,0.5, 0.8. What do you observe? (e) Plot f(x, 1) on x E [-3,3] with p= 0. What does this curve look like to you? (f) Plot f(1,y) on y E [-3, 3] with p= 0. Submit your R code as q2.R using the same conventions as question 1).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman