You are on page 1of 18

Assignment

on Simulation
Submitted To: Dr. Gunjan Soni
Prof. Operation Analytics
Q1.
A project has four activities (A,B,C and D) that
must be performed sequentially. The probability
distributions for the time required to complete
each of the activities are as follows…
a. Provide the base-case, worst-case, and
best-case calculations for the time to
complete the project.

● Base Case:
A = 6 weeks
B = 5 weeks
C = 14 weeks
D = 8 weeks
= 6+5+14+8 = 33 weeks
● Worst Case: 8 + 7 + 18 + 10 = 43 weeks
● Best Case: 5 + 3 + 10 + 8 = 26 weeks
Use th
e
numbe random
r
0.9617 s 0.1778,
,
0.4503 0.6849, and

b. to
comple simulate the
tion tim
project e of
in wee the
ks.
Activity Activity Time(weeks) Cumulative Frequency Random no.
5 0.25 0.1778

A 6 0.60
7 0.85
8 1.00
3 0.20
B
5 0.75
7 1.00 0.9617
10 0.10
12 0.35
C 14 0.75 0.6849
16 0.95
18 1.00
8 0.60 0.4503
D
10 1.00
b. Use the random numbers 0.1778, 0.9617, 0.6849, and 0.4503 to simulate the completion time of the
project in weeks.

Activity Random Number Completion Time

A 0.1778 5

B 0.9617 7

C 0.6849 14

D 0.4503 8

Total 34 Weeks
c. Discuss how simulation could be used to
estimate the probability that the project can
be completed in 35 weeks or less.

Simulation will provide the project completion time values. We can calculate
the percentage of trials having the completion time of 35 weeks or less and this
can be used to estimate the probability of time completion in 35 weeks
Q2.
Q. Blackjack, or 21, is a popular casino game that begins with each player and the dealer being dealt two cards. The value
of each hand is determined by the point total of the cards in the hand. Face cards and 10s count 10 points, aces can be
counted as either 1 or 11 points, and all other cards count at their face value. For instance, the value of a hand consisting of
a jack and an 8 is 18; the value of a hand consisting of an ace and a 2 is either 3 or 13 depending on whether the ace is
counted as 1 or 11 points. The goal is to obtain a hand with a value of 21, or as close to it as possible without exceeding 21.
After the initial deal, each player and the dealer may draw additional cards (called “taking a hit”) in order to improve
their hand. If a player or the dealer takes a hit and the value of his or her hand exceeds 21, that person “goes broke” and
loses. The dealer’s advantage is that each player must decide whether to take a hit before the dealer. If a player takes a hit
and goes over 21, the player loses even if the dealer later takes a hit and goes over 21. For this reason, players will often
decide not to take a hit when the value of their hand is 12 or greater. The dealer’s hand is dealt with one card up and one
card down. The player then decides whether to take a hit based on knowledge of the dealer’s up card. A gambling
professional determined that when the dealer’s up card is a 6, the following probabilities describe the ending value of the
dealer’s hand:

Value of 17 18 19 20 21 Broke
Hands
Probability 0.1654 0.1063 0.1063 0.1017 0.0972 0.4231
a. Set up intervals of random numbers that can be used to simulate the ending value of the dealer’s
hand when the dealer has a 6 as the up card.

Value of Hand Probability Cumulative Frequency

17 0.1654 0.1654

18 0.1063 0.2717

19 0.1063 0.3780

20 0.1017 0.4797

21 0.0972 0.5769

Broke 0.4231 1.000


Use
numbe the random
rs
Table in column 4
12 o
the en .2 to simula f

b. din
dealer g value of th
’s h
plays o and for 20
f the g
ame.
te
e
Hands Random Value Dealer Value Hands Random Value Dealer Value

1 .9850 Broke 11 .4971 21

2 .2122 18 12 .9569 Broke

3 .5590 21 13 .1091 17

4 .0004 17 14 .9907 Broke

5 .5177 21 15 .1900 18

6 .0064 17 16 .9403 Broke

7 .2044 18 17 .3545 19

8 .2390 18 18 .8083 Broke

9 .7305 Broke 19 .4704 20

10 .6351 Broke 20 .5274 21


Q
Q. Suppose you are playing blackjack and your hand has a value of 16 for the two cards initially
dealt. If you decide to take a hit, the following cards will improve your hand: ace, 2, 3, 4, and 5.
Any card with a point count greater than 5 will result in you going broke. Suppose you have a
hand with a value of 16 and decide to take a hit. The following probabilities describe the ending
value of your hand:
Value of Hands 17 18 19 20 21 Broke

Probability 0.0769 0.0769 0.0769 0.0769 0.0769 0.6155

Cumulative Frequency 0.0769 0.1538 0.2307 0.3076 0.3845 1.00

Use the random numbers in column 5 of Table 12.2 to simulate the ending value of your
hand after taking a hit for 20 plays of the game.
Use th
numbe e random
rs in
of Tab column 5
simula le 12.2 to

c. a fte r t
20 p l a
te
value o the ending
f your
aking hand
a
y s o f t h i t fo r
h e g am
e.
Hands Random Value Dealer Value Hands Random Value Dealer Value

1 .7467 Broke 11 .0225 17

2 .6885 Broke 12 .7255 Broke

3 .0423 17 13 .7730 Broke

4 .5259 Broke 14 .2699 20

5 .3134 21 15 .2781 20

6 .0441 17 16 .1078 18

7 .0484 17 17 .5448 Broke

8 .9121 Broke 18 .2701 20

9 .0376 17 19 .6903 Broke

10 .9146 Broke 20 .8723 Broke


d.

Use the results of parts (b) and (c) to simulate the result of 20 blackjack hands when the dealer
has a 6 up and the player chooses to take a hit with a hand that has a value of 16. How
many hands result in the dealer winning, a push (a tie), and the player winning?

Solution:
● Dealer Wins when either both were broke or dealer has the high cards.
Hence the scenarios or hands when dealer will win are:
1,2,3,4,7,8,10,11,12,13,17,19,20
● Pushes or Tie will be: 5,6
● Player Wins when it has higher cards then dealer.
Hence the scenarios or hands when dealer will win are:
9,14,15,16,18
e.
If the player has a hand with a value of 16 and doesn’t take a hit, the only way the
player can win is if the dealer goes broke. How many of the hands in part (b) result in
the player winning without taking a hit? On the basis of this result and the results in
part (d), would you recommend the player take a hit if the player has a hand with a
value of 16 and the dealer has a 6 up?
Solution:
● Player can win when the dealer broke. In the part b solution we can see that the dealer is broke
in 7 cases i.e.
1,9,10,12,14,16,18

● By the above result we can conclude that player should not go for the hit when he has 16 in
hand and dealer has shown up 6.
Thank You!
Submitted By:

Gauri Sharma – PGFC2017

Pramit Gupta – PGFC2036

You might also like