Assignment 3 - Due Nov 25th

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

STAT 2003:Computer-aided Statistical Reasoning

2016-17 Term 1
Assignment #3
Due: November 25th, 2016 (Friday) at 5:30pm
This assignment covers material from Section 4.5 to Chapter 5 of the lecture notes.
You are required to use the Microsoft Excel to work on ALL the calculations, and please
present your answers in (at least) 4 decimal places.
Assignment Submission: Please submit the soft copy of your work: Soft copy: An assignment #3 dropbox button is now available in the eLearning system
** Filename **:Please have the filename of the formCHAN Tai Man assignment 3.xlsx
so that the grader is able to keep track of your file easier.
*No Hard copy is required*: All the computations can be done in Excel formula directly.
Problem 1 [28 points] (Simulation of Geometric Distribution): Consider Y ~ Geometric(p)
y
with the cdf given by F ( y) Pr(Y y) 1 q

for y = 1, 2, .

where q = 1-p is the probability of failure. Assume that p = 0.65.


(a) [3 points] Compute Pr(Y > 16) and present the answer in 4 significant figures.
(b) [4 points] Based on the Linear Congruential Generator with parameters
(a, c, m, x0) =(40014, 0, 2147483399, 40015),
generate 10,000 pseudo-random numbers {u1, u2, , u10000}.
(c) [9 points] Based on the pseudo-random numbers generated in part (b), and the inverse
CDF method similar to Ch4 page 64-65, simulate Y up to Y 16 only (i.e. ignore Y > 16).
(d) [6 points] Simulate 10,000 values of Y based on the exact formula (from Ch4 page 61):
"=ROUNDUP(LN(RAND())/LN(1-p),0)"
(e) [6 points] Construct a frequency table to compare the actual pmf with the empirical pmf
of simulated values obtained in part (c) and part (d) [Similar to the right hand table on
Ch4 page 70].
Problem 2 [26 points] (Monte Carlo Method on Path Dependent Problem)
(a) [13 points] Suppose a fair coin is tossed 10 times, and we are interested in
p1 = Pr(Number of heads do not exceed the number of tails by 1 DURING the tosses)
(E.g. sequence THHTHTHTHT is okay, sequence HHxxxxxxxx is not okay because number
of heads exceeds number of tails by 2 after the 2nd toss. Similarly, sequence HTHHxxxxxx
is not okay after the 4th toss).
Based on Monte Carlo Methods with 5,000 trials, estimate p1 and provide a 95% CI for
p1.
(b) [13 points] Repeat part (a) if the probability of interest p2 =Pr(|# of heads - # of tails|2
DURING the tosses).
(E.g. sequence THHHTTTTHT is okay, but not TTTxxxxxxx nor HTHHHxxxxx).
Page 1/2

Problem 3 [16 points] Consider a Chocolate Surprise product with hollow milk chocolate
egg shell containing a toy inside. The toy can either be figurine A or figurine B, with the
probability of occurrence 30% and 70% respectively. Suppose we bought 5 of these
Chocolate Surprise products at random, and let X be the number of figurine A obtained.
(a) [3 points] Show that the (exact) probability of obtaining at least one complete set
(Figurine A + B) is p1 = Pr(1 X 4) = 0.8295
(b) [3 points] What is the (exact) probability of obtaining at least two complete sets p2?
(c) [5 points] Estimate p1 based on Monte Carlo methods of 5,000 trials, and provide a 95%
confidence interval for p1.
(d) [5 points] Estimate p2 based on Monte Carlo methods of 5,000 trials, and provide a 95%
confidence interval for p2.
Problem 4 [30 points] In a restaurant nearby the campus, the lunch set they serve is $40
per person. Recently, there is a Big Eater Challenge offered by the restaurant as follow:
A group of 4 or more people can order the same lunch set together at $60 each. If at least
4 of them are able to finish his/her lunch set within an hour, only those who are not able to
finish on time have to pay for his/her lunch.(For example, if a group of 5 people entered the
challenge and 4 finished on time, only the 5th person is required to pay for $60. However, if
only 3 of them finished on time, the group has to pay a total of $60x5 =$300.)
Let Yi be the time (in hours) for the ith person to finish his/her lunch, and assume that
Yi ~Exp(=5/6)
[i.e. E(Yi) = 1/ = 1.2 hour]
Suppose you come with a group of 6 persons today, and you are allowed to assign some of
the group members to join the Big Eater Challenge (with the rest ordering the regular
lunch set at $40 each).
Based on the Monte Carlo Method with simulation size of 5,000 trials, how many people
should we assign to the "Big Eater Challenge", so as to minimize the expected amount the
group has to pay to the restaurant?
- End of the Assignment -

Page 2/2

You might also like