Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECMT2160: Computational Assignment

Ttis assessment task requires you to use MATLAB to run some Monte Carlo simulations. You should prepare your submission as a MATLAB Live Script file (i.e., a .mlx file). Submit your answers through the Canvas course website. Your submission should include a mixture of written responses formatted as text, blocks of MATLAB code, and MATLAB output, including graphs. You should submit two versions of your answers: the original .mlx file, and a version ex- ported to .html.

You may work on this assessment individually, or in pairs. If you work in pairs, it is important that you clearly indicate the student ID number of your partner in your submission. Your submission should not be identical to your partner’s submission.

Answer all questions. fte assignment is worth a total of 25 points towards your final assessment. Points will be deducted for poor presentation, including: excessive typos, poor written expression, poor organization, etcetera.

In this question we let

���1

���  ���2

���3

be a continuous 3 1 random vector, with each entry taking values between zero

and one.

1. (5 points) Suppose that ���1 and ���2 have joint PDF given by



7(1e−7)e−7(���1+���2)

if 0 ≤ ���1 ≤ 1 and 0 ≤ ���2 ≤ 1


���12 (���1, ���2) = (e−7e−7���e−7���2 +e−7(���1+���2) )2

(a) Create a 1000 1000 matrix in which the entry in row ��� and column

��� is the joint PDF value

���12  .    ��� ,    ���     Σ .

(b) Using the matrix constructed in 1(a), numerically verify that ���12 ���1, ���2

is nonnegative and integrates to one.

(c) Using the matrix constructed in 1(a), create a three dimensional graph of ���12 ���1, ���2 . (In the graphs you are required to produce in this as- signment, it is not essential that you “coarsen” the grid over which the graphs are evaluated, as is done in the lecture notes.)

2. (8 points) Suppose that ���2 and ���3 have joint PDF given by

.1 + 4 (2���2 − 1)(2���3 − 1) if 0 ≤ ���1 ≤ 1 and 0 ≤ ���2 ≤ 1

(a) Create a 1000 1000 matrix in which the entry in row ��� and column

��� is the joint PDF value

���23  .    ��� ,    ���     Σ .

 

(b) Using the matrix constructed in 2(a), numerically verify that ���23 ���2, ���3

is nonnegative and integrates to one.

(c) Using the matrix constructed in 2(a), create a three dimensional graph of ���23 (���2, ���3).

(d) Using the matrix constructed in 2(a), create a two dimensional graph of ���3 (���3), the marginal PDF of ���3. Interpret your graph.

(e) Using the matrix constructed in 2(a), numerically evaluate the corre- lation of ���2 and ���3.

3. (12 points) Suppose that the 3 × 1 random vector ��� has joint PDF given by

���123 (���1, ���2, ���3) = ���12 (���1, ���2) ���23 (���2, ���3),

where ���12 (���1, ���2) is the function defined in Question 1 and ���23 (���2, ���3) is the function defined in Question 2. We no longer assume that ���12 (���1, ���2) is the joint PDF of ���1 and ���2, or that ���23 (���2, ���3) is the joint PDF of ���2 and ���3.

(a) fte joint PDF for the pair of random variables ���1 and ���3, which we shall denote by ���13 ���1, ���3 , can be obtained from ���123 ���1, ���2, ���3 by evaluating the integral


���13 (���1, ���3) =

1

0 ���123 (���1, ���2, ���3)d���2.


By numerically approximating the integral using a sum over 1000 evenly spaced points, create a 1000 1000 matrix in which the en- try in row ��� and column ��� is the joint PDF value

���13  .    ��� ,    ���     Σ .

 

(b) Using the matrix constructed in 3(a), numerically verify that ���13 ���1, ���3

is nonnegative and integrates to one.

(c) Using the matrix constructed in 3(a), create a three dimensional graph of ���13 (���1, ���3).

(d) In words, describe how the graphs produced in 1(c), 2(c) and 3(c) differ from one another, and what this implies about the three correspond- ing bivariate relationships.

(e) Using the matrix constructed in 3(a), numerically evaluate the ex- pected value of the random variable ���1e���1+���3 .

(f) Create a 1000 1000 matrix in which the entry in row ��� and column

��� numerically approximates the integral

 1 .  ���  ��� Σ

 

How does this matrix compare to the matrix computed in 1(a)? Inter- pret your finding.