代写ECMT2160: Computational Assignment代写Matlab编程

ECMT2160: Computational Assignment
Due: November 3, 11:59am
This 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.
The assignment consists of two questions, each with multiple parts. Answer
all parts of both questions. The assignment is worth a total of 25 points towards
your final assessment. The first question is worth 15 points and the second ques-
tion is worth 10 points. Points will be deducted for poor presentation, including:
excessive typos, poor written expression, poor organization, etcetera.
Question 1
Before attempting Question 1, you should work through Sections 3.8 and 3.9 in
the file IntroProb.mlx. Begin your submitted solution to Question 1 by running
the command
rng(STUDENTID)
in MATLAB, where STUDENTID is your 9-digit Student ID number. This fixes
the sequence of random numbers to be generated in your simulation.
Suppose we roll two fair six sided dice. Let1 denote the sum of the numbers
rolled, and let 2 denote the maximum of the numbers rolled.
(a) (i) Create an 11 × 6 matrix containing the values taken by the joint prob-
ability mass function of 1 and 2. The entry in row , column of this
matrix should contain the probability P(1 = , 2 = ).
(ii) Create a three-dimensional bar graph displaying the joint probability
mass function of 1 and 2.
(b) (i) Create a 1× 6 vector containing the values taken by the marginal prob-
ability mass function of 2. The entry in column of this vector should
contain the probability P(2 = ).
(ii) Create a two-dimensional bar graph displaying themarginal probability
mass function of 2.
(c) (i) Create an 11 × 6 matrix containing the values taken by the conditional
probabilitymass function of1 given2. The entry in row , column of
this matrix should contain the conditional probability P(1 = |2 = ).
(ii) Create six two-dimensional bar graphs, each displaying the conditional
probability mass function of 1 given 2 = , with taking the values
1 through 6 in your six graphs.
(d) In each of 10,000 iterations of a “for loop”, do the following.
(i) Generate a discrete random variable whose probability mass function
is the marginal probability mass function of 2 calculated in part (b).
Hint: theMATLAB commandrandi(6,2,1) returns a 2×1 random
vector whose entries are independent random variables each equal to
the numbers 1 through 6 with equal probabilities.
(ii) Calculate the conditional expectation E(1 | 2 = ), where is the
random number generated in part (i).
Calculate the average of the conditional expectations computed over all 10,000
iterations of the “for loop”.
(e) Discuss how your findings in part (d) relate to the Law of Iterated Expecta-
tions.
Question 2
Let be a random variable with the standard normal distribution, and let() be
the probability density function of the standard normal distribution. Let (1, 2)
be the function
(1, 2) =
{
4(12)−4(−31 + −32 − 1)−7/3 if 0 < 1 < 1 and 0 < 2 < 1
0 otherwise.
Suppose that 1 and 2 are a pair of continuous random variables whose joint
probability density function is given by
(1, 2) = (P( ≤ 1), P( ≤ 2))(1)(2)
for all real 1 and 2.
(a) Create a graph of the joint probability density function of1 and2 for values
of 1 and 2 between −3 and 3.
(b) Create a graph of the marginal probability density function of 1 for values
of 1 between −3 and 3. Graph it alongside the standard normal probability
density function.
(c) Repeat part (b) for 2 instead of 1.
(d) Based on your answers above, do you think that the joint distribution of 1
and 2 is multivariate normal? Why or why not?


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图