MBMG-7104/ ITHS-2202/ IMAS-3101/ IMHS-3101
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
2
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Introduction
Simulation
3
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo Simulation (MCS)
 Monte Carlo simulations are a mathematical technique used
across a diverse range of industries and fields to model
difficult-to-predict scenarios and outcomes.
 Monte Carlo simulation is the process of
 generating random values for uncertain inputs in a
model,
 computing the output variables of interest, and
 repeating this process for many trials to understand
the distribution of the output results.
4
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo Simulation (MCS)
5
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo Simulation
6
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo Simulation (MCS) : Manual Solution
 In using the Monte Carlo method, a given problem is solved by
simulating the original data with random number generators.
 Basically, its use requires two things,
1. First, Probability distribution of the variable in question.
2. Second, the distribution may be obtained by direct
observation or from past records.
What is significant here is that the variable may not be known
to explicitly follow any of the theoretical distribution like
Poisson, Normal and so on.
7
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo Simulation (MCS) : Manual Solution
 A confectioner sells confectionery items. Past data of demand per
week in hundred kilograms with frequency is given below:
Using the following sequence of random numbers, generate the demand
for the next 10 weeks. Also find out the average demand per week.
Demand/Week 0 5 10 15 20 25
Frequency 2 11 8 21 5 3
Random
numbers
35 52 13 90 23 73 34 57
35 83 94 56 67 66 60
8
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Solution :
 Step 1. Create Random No. Range Table
 1. Calculate Probability (p = f ÷ ∑f)
 2. Cumulative Probability
 3. Range of Random Nos.
For given Random Nos. are of X digits, the ranges of Random Nos. has
also been considered to have X digits only.
Also the range of Random Nos. corresponds to cumulative probability values
which lies between 0 & 1 and can be correlated as nos. between 00 and 99.
 Step 2. Create Simulation Table
 Simulate the expected variable using the time, random no., and the range of
random variable.
 E.g. if for time t=1, if random demand is given 35, which fall in the random
range of 26-41. Then for expected demand, we need to look for the demand in
range 26-41.
 Step 3. Calculate required problem
9
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Solution :
Table 1
†As the given Random Nos. are of 2 digits, the ranges of Random Nos. has also been
considered to have 2 digits only. Also the range of Random Nos. corresponds to
cumulative probability values which lies between 0 & 1 and can be correlated as nos.
between 00 and 99.
Random No. Range Table for demand
Demand per
week
Frequency (f)
Probability
(p = f ÷ ∑f)
CumulativeP
robability
Range† of
Random Nos.
0 2 .04 .04 00-03
5 11 .22 .26 04-25
10 8 .16 .42 26-41
15 21 .42 .84 42-83
20 5 .10 .94 84-93
25 3 .06 1.00 94-99
∑f = 50 1.00
10
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Table 2
*From Table (1), Random No. 35 appears in the range of 26-41. Also
the demand for this range is 10.
 Average weekly demand = 120 /10 = 12
Simulated Values for next 10 weeks
Weeks Random Nos. Demand
1 35* 10*
2 52 15
3 13 5
4 90 20
5 23 5
6 73 15
7 34 10
8 57 15
9 35 10
10 83 15
Total – 120
11
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Exercise
 The manager of a book store has to decide the number of copies of a particular tax
law book to order. A book costs Rs. 60 and is sold for Rs. 80. From past records,
the distribution of demand for this book has been obtained as follows:
Using the following sequence of random numbers, generate the demand for 20 time
periods( years). Also find out the average demand per year.
Demand
(No of copies)
15 16 17 18 19 20 21 22
Proportion 0.05 0.08 0.20 0.45 0.10 0.07 0.03 0.02
14 02 93 99 18 71 37 30 12 10
88 13 00 57 69 32 18 08 92 73
12
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Solution :
Table 1 Table 1. Random No. Range Table
Demand Probability
Cumulative
Probability
Random No.
Range
15 .05 .05 00-04
16 .08 .13 5-12
17 .20 .33 13-32
18 .45 .78 33-77
19 .10 .88 78-87
20 .07 .95 88-94
21 .03 .98 95-97
22 .02 1.00 98-99
Total 1.00 – –
13
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Solution :
Table 2 : Simulation table
 Average yearly demand = 352 /20 = 17.6
Calculation of demand and profit for next 20 years
Year
Random
Numbers
Expected
demand
Year
Random
Numbers
Expected
demand
1 14 17 11 88 20
2 02 15 12 13 17
3 93 20 13 00 15
4 99 22 14 57 18
5 18 17 15 69 18
6 71 18 16 32 17
7 37 18 17 18 17
8 30 17 18 08 16
9 12 16 19 92 20
10 10 16 20 73 18
Total 352
14
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Exercise
 The manager of a book store has to decide the number of copies of a particular tax
law book to order. A book costs Rs. 60 and is sold for Rs. 80. Since some of the
tax laws change year after year, any copies unsold while the edition is not
current must be sold for Rs. 30. From past records, the distribution of demand for
this book has been obtained as follows:
Using the following sequence of random numbers, generate the demand for 20 time
periods( years). Also find out the average demand per year. Calculate the average
profit obtainable under each of the courses of action open to the manager. What
is the optimal policy?
Demand
(No of copies)
15 16 17 18 19 20 21 22
Proportion 0.05 0.08 0.20 0.45 0.10 0.07 0.03 0.02
14 02 93 99 18 71 37 30 12 10
88 13 00 57 69 32 18 08 92 73
Calculation of demand and profit for next 20 years
Year
Random
Numbers
Expected
demand
No. of books unsold if stock is
15* 16* 17* 18*
1 14 17 - - - 1
2 02 15 - 1 2 3
3 93 20 - - - -
4 99 22 - - - -
5 18 17 - - - 1
6 71 18 - - - -
7 37 18 - - - -
8 30 17 - - - 1
9 12 16 - - 1 2
10 10 16 - - 1 2
11 88 20 - - - -
12 13 17 - - - 1
13 00 15 - 1 2 3
14 57 18 - - - -
15 69 18 - - - -
16 32 17 - - - 1
17 18 17 - - - 1
18 08 16 - - 1 2
19 92 20 - - - -
20 73 18 - - - -
Total 0 2 7 18
 *Looking at the simulated demand
pattern, these stock figures (15, 16,
17, 18) have been chosen to find
out optimal course of action.
 Stock figures of 20 or more have
not been considered because it is
quite obvious that such figures will
not give optimal course of action
due to high losses for the unsold
books.
 Calculation of profit
 * Net Profit = No. of books sold × Rs. 20# – No.
of books unsold ×Rs. 30@
 Selling price/book = Rs. 80, Cost/book = Rs. 60
# = Profit /book = 80 – 60 = Rs. 20
Selling price of any unsold book = Rs. 30
@ = Loss incurred/unsold book = Rs. 60 – Rs. 30 = Rs. 30
Statement Showing Computation of Profit
No. of
Books
order
(n)
No. of Books sold in
20 years (n × 20 -
Books unsold)
*Net Profit (Rs.)
Average
Profit/Year
(Profit ÷ 20)
15 15 x 20 = 300 Rs. 6000 Rs. 300
16 16 x 20 – 2 = 318 Rs. 6300 (318 x 20) – 2 x 30 Rs. 315
17 (17 x 20) – 7 = 333 Rs. 6450 (333 x 20) -7 x 30 Rs. 322.5
18 (18 x 20) – 18 Rs. 6300 (342 x 20) – 18 x 30 Rs. 315
 Since profit is maximum for 17 books order, the optimal policy is to order 17
books per year
17
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Advantages of MCS
18
@Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
Monte Carlo simulation : Simulation using MCSM

Monte Carlo simulation : Simulation using MCSM

  • 1.
    MBMG-7104/ ITHS-2202/ IMAS-3101/IMHS-3101 @Ravindra Nath Shukla (PhD Scholar) ABV-IIITM
  • 2.
    2 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Introduction Simulation
  • 3.
    3 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Monte Carlo Simulation (MCS)  Monte Carlo simulations are a mathematical technique used across a diverse range of industries and fields to model difficult-to-predict scenarios and outcomes.  Monte Carlo simulation is the process of  generating random values for uncertain inputs in a model,  computing the output variables of interest, and  repeating this process for many trials to understand the distribution of the output results.
  • 4.
    4 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Monte Carlo Simulation (MCS)
  • 5.
    5 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Monte Carlo Simulation
  • 6.
    6 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Monte Carlo Simulation (MCS) : Manual Solution  In using the Monte Carlo method, a given problem is solved by simulating the original data with random number generators.  Basically, its use requires two things, 1. First, Probability distribution of the variable in question. 2. Second, the distribution may be obtained by direct observation or from past records. What is significant here is that the variable may not be known to explicitly follow any of the theoretical distribution like Poisson, Normal and so on.
  • 7.
    7 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Monte Carlo Simulation (MCS) : Manual Solution  A confectioner sells confectionery items. Past data of demand per week in hundred kilograms with frequency is given below: Using the following sequence of random numbers, generate the demand for the next 10 weeks. Also find out the average demand per week. Demand/Week 0 5 10 15 20 25 Frequency 2 11 8 21 5 3 Random numbers 35 52 13 90 23 73 34 57 35 83 94 56 67 66 60
  • 8.
    8 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Solution :  Step 1. Create Random No. Range Table  1. Calculate Probability (p = f ÷ ∑f)  2. Cumulative Probability  3. Range of Random Nos. For given Random Nos. are of X digits, the ranges of Random Nos. has also been considered to have X digits only. Also the range of Random Nos. corresponds to cumulative probability values which lies between 0 & 1 and can be correlated as nos. between 00 and 99.  Step 2. Create Simulation Table  Simulate the expected variable using the time, random no., and the range of random variable.  E.g. if for time t=1, if random demand is given 35, which fall in the random range of 26-41. Then for expected demand, we need to look for the demand in range 26-41.  Step 3. Calculate required problem
  • 9.
    9 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Solution : Table 1 †As the given Random Nos. are of 2 digits, the ranges of Random Nos. has also been considered to have 2 digits only. Also the range of Random Nos. corresponds to cumulative probability values which lies between 0 & 1 and can be correlated as nos. between 00 and 99. Random No. Range Table for demand Demand per week Frequency (f) Probability (p = f ÷ ∑f) CumulativeP robability Range† of Random Nos. 0 2 .04 .04 00-03 5 11 .22 .26 04-25 10 8 .16 .42 26-41 15 21 .42 .84 42-83 20 5 .10 .94 84-93 25 3 .06 1.00 94-99 ∑f = 50 1.00
  • 10.
    10 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Table 2 *From Table (1), Random No. 35 appears in the range of 26-41. Also the demand for this range is 10.  Average weekly demand = 120 /10 = 12 Simulated Values for next 10 weeks Weeks Random Nos. Demand 1 35* 10* 2 52 15 3 13 5 4 90 20 5 23 5 6 73 15 7 34 10 8 57 15 9 35 10 10 83 15 Total – 120
  • 11.
    11 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Exercise  The manager of a book store has to decide the number of copies of a particular tax law book to order. A book costs Rs. 60 and is sold for Rs. 80. From past records, the distribution of demand for this book has been obtained as follows: Using the following sequence of random numbers, generate the demand for 20 time periods( years). Also find out the average demand per year. Demand (No of copies) 15 16 17 18 19 20 21 22 Proportion 0.05 0.08 0.20 0.45 0.10 0.07 0.03 0.02 14 02 93 99 18 71 37 30 12 10 88 13 00 57 69 32 18 08 92 73
  • 12.
    12 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Solution : Table 1 Table 1. Random No. Range Table Demand Probability Cumulative Probability Random No. Range 15 .05 .05 00-04 16 .08 .13 5-12 17 .20 .33 13-32 18 .45 .78 33-77 19 .10 .88 78-87 20 .07 .95 88-94 21 .03 .98 95-97 22 .02 1.00 98-99 Total 1.00 – –
  • 13.
    13 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Solution : Table 2 : Simulation table  Average yearly demand = 352 /20 = 17.6 Calculation of demand and profit for next 20 years Year Random Numbers Expected demand Year Random Numbers Expected demand 1 14 17 11 88 20 2 02 15 12 13 17 3 93 20 13 00 15 4 99 22 14 57 18 5 18 17 15 69 18 6 71 18 16 32 17 7 37 18 17 18 17 8 30 17 18 08 16 9 12 16 19 92 20 10 10 16 20 73 18 Total 352
  • 14.
    14 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Exercise  The manager of a book store has to decide the number of copies of a particular tax law book to order. A book costs Rs. 60 and is sold for Rs. 80. Since some of the tax laws change year after year, any copies unsold while the edition is not current must be sold for Rs. 30. From past records, the distribution of demand for this book has been obtained as follows: Using the following sequence of random numbers, generate the demand for 20 time periods( years). Also find out the average demand per year. Calculate the average profit obtainable under each of the courses of action open to the manager. What is the optimal policy? Demand (No of copies) 15 16 17 18 19 20 21 22 Proportion 0.05 0.08 0.20 0.45 0.10 0.07 0.03 0.02 14 02 93 99 18 71 37 30 12 10 88 13 00 57 69 32 18 08 92 73
  • 15.
    Calculation of demandand profit for next 20 years Year Random Numbers Expected demand No. of books unsold if stock is 15* 16* 17* 18* 1 14 17 - - - 1 2 02 15 - 1 2 3 3 93 20 - - - - 4 99 22 - - - - 5 18 17 - - - 1 6 71 18 - - - - 7 37 18 - - - - 8 30 17 - - - 1 9 12 16 - - 1 2 10 10 16 - - 1 2 11 88 20 - - - - 12 13 17 - - - 1 13 00 15 - 1 2 3 14 57 18 - - - - 15 69 18 - - - - 16 32 17 - - - 1 17 18 17 - - - 1 18 08 16 - - 1 2 19 92 20 - - - - 20 73 18 - - - - Total 0 2 7 18  *Looking at the simulated demand pattern, these stock figures (15, 16, 17, 18) have been chosen to find out optimal course of action.  Stock figures of 20 or more have not been considered because it is quite obvious that such figures will not give optimal course of action due to high losses for the unsold books.
  • 16.
     Calculation ofprofit  * Net Profit = No. of books sold × Rs. 20# – No. of books unsold ×Rs. 30@  Selling price/book = Rs. 80, Cost/book = Rs. 60 # = Profit /book = 80 – 60 = Rs. 20 Selling price of any unsold book = Rs. 30 @ = Loss incurred/unsold book = Rs. 60 – Rs. 30 = Rs. 30 Statement Showing Computation of Profit No. of Books order (n) No. of Books sold in 20 years (n × 20 - Books unsold) *Net Profit (Rs.) Average Profit/Year (Profit ÷ 20) 15 15 x 20 = 300 Rs. 6000 Rs. 300 16 16 x 20 – 2 = 318 Rs. 6300 (318 x 20) – 2 x 30 Rs. 315 17 (17 x 20) – 7 = 333 Rs. 6450 (333 x 20) -7 x 30 Rs. 322.5 18 (18 x 20) – 18 Rs. 6300 (342 x 20) – 18 x 30 Rs. 315  Since profit is maximum for 17 books order, the optimal policy is to order 17 books per year
  • 17.
    17 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM Advantages of MCS
  • 18.
    18 @Ravindra Nath Shukla(PhD Scholar) ABV-IIITM