Review Exercises on Simulation on Excel

advertisement
Review Exercises on Simulation on Excel
BSNS2120, J. Wang
Name _______________________________
1. Given the daily demands of the past 300 days as below:
A
B
C
D
E
F
G
Xi*P(Xi)
Xi-E(X)
(Xi-E(X))2
(Xi-E(X))2*P(Xi)
1
2
3
4
5
6
7
8
9
10
Xi
Daily
demand
(unit)
10
11
12
13
14
15
16
Total
P(Xi)
Number
of days
Probability
20
46
73
62
40
34
25
We will calculate probabilities, expected value of daily demand, and variance of daily
demand by using the above table.
For each of the cells, write out the formulas or functions you are going to use. Note that
you should use formulas (instead of particular numbers) as far as possible, use cell addresses as
far as possible, and use absolute / relative addresses properly, so that the formulas can be copied
to other relevant cells later on.
(1) Cell B10:
(2) Cell C3:
(3) How would you fill in the cells C4 through C9?
(4) Cell D3:
(5) How would you fill in the cells D4 through D9?
(6) Cell D10, which gives the expected value of X:
1
(7) Cell E:
(8) Cell F3:
(9) Cell G3:
(10) How would you fill the cells G4 through G9?
(11) Cell G10, which gives the variance of X:
2. We simulate the result of tossing a coin by using a randomly generated number between 0 and
1. The result of tossing the coin is “HEAD” if the random number is _____________.
a. >0
b. <1
c. >1
d. <0
e. <0.5
3. We simulate the result of tossing a dice by using a randomly generated number between 0 and
1. The result is “1 on top” if the random number is _________.
a. >0
b. <0.5
c. <1/6
d. >1/6
e. <5/6
f. >5/6
4. We simulate the result of tossing a dice by using a randomly generated number between 0 and
1. The result is “6 on top” if the random number is _________.
a. >0
b. <0.5
c. <1/6
d. >1/6
e. <5/6
f. >5/6
5. We simulate the result of tossing a dice by using a randomly generated number between 0 and
1. The result is “3 on top” if the random number is _________.
a. <0.5
b. >0.5
c. <3/6
d. >3/6
e. between 1/3 and 2/3
f. between 2/3 and 3/3
g. between 1/3 and ½
h. between ½ and 1
6. Given the daily demands and their probabilities as below:
Daily demand
Probability
10 units
0.15
11 units
0.2
12 units
0.3
13 units
0.25
14 units
0.1
If we use random numbers between 0 and1 to simulate the daily demand:
(1) What is the interval between 0 and 1 that represents 10 units of daily demand?
2
(2) What is the interval between 0 and 1 that represents 12 units of daily demand?
(3) What is the interval between 0 and 1 that represents 14 units of daily demand?
7. Business Simulation:
Given weekly demands of product BC-6 and probabilities as follows:
Weekly demand
11 cases
12 cases
13 cases
Probability
0.2
0.45
0.35
The manager of the store wants to determine how many cases of BC-C to order every week. Unsold BC-6’s at the end of a week will be discarded.
We use Excel to help make decision. The worksheet randomly generates weekly demands for 52
weeks, and figure out surplus or shortage for each week, for each decision alternative (number of cases to
order). A template of the Excel sheet is as below.
A
1
2
3
4
5
6
7
8
B
C
D
E
F
Simulations of Weekly Business Demands and Operations on BC-6
Number of cases of BC-C to order every week:
Total number of weeks with shortage in 52 weeks:
Total number of cases shortage in 52 weeks:
Total number of weeks with surplus in 52 weeks:
Total number of cases surplus in 52 weeks:
Week #
9
10
11
Random #
Weekly Demand
(case)
Number of
cases ordered
per week
12
Weekly
shortage
(case)
Weekly
surplus
(case)
1
2
Fill in the Excel sheet with appropriate formulas/functions. Note that you should use
formulas (instead of particular numbers) as far as possible, use cell addresses as far as possible,
and use absolute / relative addresses properly, so that the formulas can be copied to other
relevant cells later on.
(1) Cell B10:
(2) Cell C10:
3
(3) Cell D10: (this cell should refer to the cell E3 to be ready to try other alternatives)
(4) Cell E10: (“Shortage” occurs if demand is more than on hand. Shortage cannot be negative.)
(5) Cell F10: (“Surplus” occurs if on hand if more than demand. Surplus cannot be negative.)
(6) Cell E4: (Count how many weeks with shortage in 52 weeks. The 52nd week is in row 61.)
(7) Cell E5: (Calculate how many cases short totally in 52 weeks. The 52nd week is in row 61.)
(8) Cell E6: (Count how many weeks with surplus in 52 weeks. The 52nd week is in row 61.)
(9) Cell E7: (Calculate how many surplus cases totally in 52 weeks. The 52nd week is in row 61.)
(10) How to fill in A12 through A61 with 3, 4, 5, …, 51, 52?
a. Type the numbers in one by one.
b. Highlight A10 and A11, then copy them all the way down to A61.
(11) How to fill in cells B11 through F61?
a. Type in the formulas one cell at a time.
b. Type in the formulas in B10 through F10 as above in items (1) through (5); then copy
them all the way down to row 61.
4
Download