SlideShare une entreprise Scribd logo
1  sur  14
RANDOM VARIATE
GENERATION
Chapter 9
Random Variate
 A value being sampled from a proven
distribution of an input variable.
 Examples such as inter-arrival time and
service time.
 RV generators – techniques used to generate
random variates.
Techniques in Generating
Random Variates
 Inverse transform technique
 Direct transformation for the normal
distribution
 Convolution method
 Acceptance and rejection technique
Inverse Transform Technique
 This technique is used to sample from
distributions such as exponential, weibull,
triangular, and empirical distributions. Most
straightforward, but not always the most
efficient.
Steps in an Inverse Transform
Technique
 Compute the cdf of the desired random variable x.
 Set F(X)=R on the range of X.
 Solve the equation F(X)=R for X in terms of R.
X=f-1
(r).
 Generate uniform random numbers and compute
the desired random variates by Xi
= f-1
(Ri
).
Derivation of RV generator for
an exponential distribution
Ex. Given exponential distribution,
Thus, the Random Variate Generator is
f x
e x
otherwise
x
( )
,
,
=
≥





1
0
0
1
β
β
x R
or
x R
i i
i i
= −
=
β
β
ln( )
ln( )
1
Uniform Distribution
Thus, the RVG is
f x b a
a x b
otherwise
( )
,
,
= −
≤ ≤




1
0
x a b a Ri i= + −( )
Triangular Distribution
Thus, the RVG is (if a=0, b=1, and c=2)
f x
x a x b
c x b x c
otherwise
( )
,
,
,
=
≤ ≤
− ≤ ≤




0
x
R R
R R
=
≤ ≤
− − ≤ ≤






2 0
1
2
2 2 1
1
2
1
,
( ) ,
Direct Transformation for the
Normal Distribution
 Normal distribution
∞<<∞=
−
∞−∫ x-dtexf
t
x
2
2
2
1
)(
π
Direct Transformation for the
Normal Distribution
 Using 2 normal random variables, plotted as
a point and represented in a polar coordinates
as:
And
)2sin())(2(
)2cos())(2(
2/1
2
2/1
1
ii
ii
RRLnZ
RRLnZ
π
π
−=
−=
ii ZX σµ+=
Convolution Method
 The probability distribution of a sum of two or more
independent random variables is called a convolution of the
distributions of the original variables.
 The convolution method refers to adding together two or
more random variables to obtain a new random variable
with the desired distribution. This technique is useful for
Erlang and binomial variates.
 For Erlang distribution:
)(
1
ln
1
11
∏∑ ==
−
=
−
=
K
i
ii
K
i
RLn
K
R
K
X
θθ
Acceptance and Rejection
Technique
The efficiency of the technique
depends on being able to minimize
the number of rejections.
Example of Acceptance
Rejection Technique
 Generate uniformly distributed random
variates [1/4,1]:
STEP 1: generate RN
STEP 2: if RN > or = ¼, accept, let X=RN. If
RN < ¼, reject and return to 1.
STEP 3:if another uniform random Variate on
[1/4,1] is needed, go to step 1.
Analysis of Simulation Data
 Data Collection
 Identification of Distribution of Data
 Parameter Estimation
 Goodness of fit Test

Contenu connexe

Tendances

Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,
Dronak Sahu
 
Discrete And Continuous Simulation
Discrete And Continuous SimulationDiscrete And Continuous Simulation
Discrete And Continuous Simulation
Nguyen Chien
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochastic
sohail40
 
The monte carlo method
The monte carlo methodThe monte carlo method
The monte carlo method
Saurabh Sood
 

Tendances (20)

Simplex method concept,
Simplex method concept,Simplex method concept,
Simplex method concept,
 
Gradient Descent, Back Propagation, and Auto Differentiation - Advanced Spark...
Gradient Descent, Back Propagation, and Auto Differentiation - Advanced Spark...Gradient Descent, Back Propagation, and Auto Differentiation - Advanced Spark...
Gradient Descent, Back Propagation, and Auto Differentiation - Advanced Spark...
 
System simulation & modeling notes[sjbit]
System simulation & modeling notes[sjbit]System simulation & modeling notes[sjbit]
System simulation & modeling notes[sjbit]
 
Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture Notes
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...
 
Markov Chains
Markov ChainsMarkov Chains
Markov Chains
 
Chap 4 markov chains
Chap 4   markov chainsChap 4   markov chains
Chap 4 markov chains
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing models
 
Discrete And Continuous Simulation
Discrete And Continuous SimulationDiscrete And Continuous Simulation
Discrete And Continuous Simulation
 
System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)
 
Optimization problems and algorithms
Optimization problems and  algorithmsOptimization problems and  algorithms
Optimization problems and algorithms
 
Applications of simulation in Business with Example
Applications of simulation in Business with ExampleApplications of simulation in Business with Example
Applications of simulation in Business with Example
 
Lesson 11: Markov Chains
Lesson 11: Markov ChainsLesson 11: Markov Chains
Lesson 11: Markov Chains
 
Unit 4 simulation and queing theory(m/m/1)
Unit 4  simulation and queing theory(m/m/1)Unit 4  simulation and queing theory(m/m/1)
Unit 4 simulation and queing theory(m/m/1)
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochastic
 
Simulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemSimulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing System
 
Monte carlo
Monte carloMonte carlo
Monte carlo
 
The monte carlo method
The monte carlo methodThe monte carlo method
The monte carlo method
 
ARIMA
ARIMA ARIMA
ARIMA
 

En vedette (6)

Input modeling
Input modelingInput modeling
Input modeling
 
Pseudorandom number generators powerpoint
Pseudorandom number generators powerpointPseudorandom number generators powerpoint
Pseudorandom number generators powerpoint
 
Pseudo Random Number Generators
Pseudo Random Number GeneratorsPseudo Random Number Generators
Pseudo Random Number Generators
 
Simulation in terminated system
Simulation in terminated system Simulation in terminated system
Simulation in terminated system
 
Random Number Generation
Random Number GenerationRandom Number Generation
Random Number Generation
 
Generate and test random numbers
Generate and test random numbersGenerate and test random numbers
Generate and test random numbers
 

Similaire à Random variate generation

Measures of variation and dispersion report
Measures of variation and dispersion reportMeasures of variation and dispersion report
Measures of variation and dispersion report
Angelo
 
Numerical
NumericalNumerical
Numerical
1821986
 
Discrete Signal Processing
Discrete Signal ProcessingDiscrete Signal Processing
Discrete Signal Processing
margretrosy
 

Similaire à Random variate generation (20)

Z Transform And Inverse Z Transform - Signal And Systems
Z Transform And Inverse Z Transform - Signal And SystemsZ Transform And Inverse Z Transform - Signal And Systems
Z Transform And Inverse Z Transform - Signal And Systems
 
Measures of variation and dispersion report
Measures of variation and dispersion reportMeasures of variation and dispersion report
Measures of variation and dispersion report
 
2 random variables notes 2p3
2 random variables notes 2p32 random variables notes 2p3
2 random variables notes 2p3
 
A new implementation of k-MLE for mixture modelling of Wishart distributions
A new implementation of k-MLE for mixture modelling of Wishart distributionsA new implementation of k-MLE for mixture modelling of Wishart distributions
A new implementation of k-MLE for mixture modelling of Wishart distributions
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
 
v39i11.pdf
v39i11.pdfv39i11.pdf
v39i11.pdf
 
Quadrature
QuadratureQuadrature
Quadrature
 
Secant Method
Secant MethodSecant Method
Secant Method
 
Numerical
NumericalNumerical
Numerical
 
Discrete Signal Processing
Discrete Signal ProcessingDiscrete Signal Processing
Discrete Signal Processing
 
Chapter7
Chapter7Chapter7
Chapter7
 
Optimization tutorial
Optimization tutorialOptimization tutorial
Optimization tutorial
 
Problems 2
Problems 2Problems 2
Problems 2
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Digital signal processing part2
Digital signal processing part2Digital signal processing part2
Digital signal processing part2
 
Z transfrm ppt
Z transfrm pptZ transfrm ppt
Z transfrm ppt
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
 
ITS World Congress :: Vienna, Oct 2012
ITS World Congress :: Vienna, Oct 2012ITS World Congress :: Vienna, Oct 2012
ITS World Congress :: Vienna, Oct 2012
 
FPDE presentation
FPDE presentationFPDE presentation
FPDE presentation
 
勾配法
勾配法勾配法
勾配法
 

Plus de De La Salle University-Manila

Chapter3 general principles of discrete event simulation
Chapter3   general principles of discrete event simulationChapter3   general principles of discrete event simulation
Chapter3 general principles of discrete event simulation
De La Salle University-Manila
 

Plus de De La Salle University-Manila (20)

Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Queuing problems
Queuing problemsQueuing problems
Queuing problems
 
Verfication and validation of simulation models
Verfication and validation of simulation modelsVerfication and validation of simulation models
Verfication and validation of simulation models
 
Markov exercises
Markov exercisesMarkov exercises
Markov exercises
 
Markov theory
Markov theoryMarkov theory
Markov theory
 
Game theory problem set
Game theory problem setGame theory problem set
Game theory problem set
 
Game theory
Game theoryGame theory
Game theory
 
Decision theory Problems
Decision theory ProblemsDecision theory Problems
Decision theory Problems
 
Decision theory handouts
Decision theory handoutsDecision theory handouts
Decision theory handouts
 
Sequential decisionmaking
Sequential decisionmakingSequential decisionmaking
Sequential decisionmaking
 
Decision theory
Decision theoryDecision theory
Decision theory
 
Decision theory blockwood
Decision theory blockwoodDecision theory blockwood
Decision theory blockwood
 
Decision theory
Decision theoryDecision theory
Decision theory
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 
Conceptual modeling
Conceptual modelingConceptual modeling
Conceptual modeling
 
Chapter3 general principles of discrete event simulation
Chapter3   general principles of discrete event simulationChapter3   general principles of discrete event simulation
Chapter3 general principles of discrete event simulation
 
Comparison and evaluation of alternative designs
Comparison and evaluation of alternative designsComparison and evaluation of alternative designs
Comparison and evaluation of alternative designs
 
Chapter2
Chapter2Chapter2
Chapter2
 
Chapter1
Chapter1Chapter1
Chapter1
 
Variance reduction techniques (vrt)
Variance reduction techniques (vrt)Variance reduction techniques (vrt)
Variance reduction techniques (vrt)
 

Dernier

Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Dernier (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

Random variate generation

  • 2. Random Variate  A value being sampled from a proven distribution of an input variable.  Examples such as inter-arrival time and service time.  RV generators – techniques used to generate random variates.
  • 3. Techniques in Generating Random Variates  Inverse transform technique  Direct transformation for the normal distribution  Convolution method  Acceptance and rejection technique
  • 4. Inverse Transform Technique  This technique is used to sample from distributions such as exponential, weibull, triangular, and empirical distributions. Most straightforward, but not always the most efficient.
  • 5. Steps in an Inverse Transform Technique  Compute the cdf of the desired random variable x.  Set F(X)=R on the range of X.  Solve the equation F(X)=R for X in terms of R. X=f-1 (r).  Generate uniform random numbers and compute the desired random variates by Xi = f-1 (Ri ).
  • 6. Derivation of RV generator for an exponential distribution Ex. Given exponential distribution, Thus, the Random Variate Generator is f x e x otherwise x ( ) , , = ≥      1 0 0 1 β β x R or x R i i i i = − = β β ln( ) ln( ) 1
  • 7. Uniform Distribution Thus, the RVG is f x b a a x b otherwise ( ) , , = − ≤ ≤     1 0 x a b a Ri i= + −( )
  • 8. Triangular Distribution Thus, the RVG is (if a=0, b=1, and c=2) f x x a x b c x b x c otherwise ( ) , , , = ≤ ≤ − ≤ ≤     0 x R R R R = ≤ ≤ − − ≤ ≤       2 0 1 2 2 2 1 1 2 1 , ( ) ,
  • 9. Direct Transformation for the Normal Distribution  Normal distribution ∞<<∞= − ∞−∫ x-dtexf t x 2 2 2 1 )( π
  • 10. Direct Transformation for the Normal Distribution  Using 2 normal random variables, plotted as a point and represented in a polar coordinates as: And )2sin())(2( )2cos())(2( 2/1 2 2/1 1 ii ii RRLnZ RRLnZ π π −= −= ii ZX σµ+=
  • 11. Convolution Method  The probability distribution of a sum of two or more independent random variables is called a convolution of the distributions of the original variables.  The convolution method refers to adding together two or more random variables to obtain a new random variable with the desired distribution. This technique is useful for Erlang and binomial variates.  For Erlang distribution: )( 1 ln 1 11 ∏∑ == − = − = K i ii K i RLn K R K X θθ
  • 12. Acceptance and Rejection Technique The efficiency of the technique depends on being able to minimize the number of rejections.
  • 13. Example of Acceptance Rejection Technique  Generate uniformly distributed random variates [1/4,1]: STEP 1: generate RN STEP 2: if RN > or = ¼, accept, let X=RN. If RN < ¼, reject and return to 1. STEP 3:if another uniform random Variate on [1/4,1] is needed, go to step 1.
  • 14. Analysis of Simulation Data  Data Collection  Identification of Distribution of Data  Parameter Estimation  Goodness of fit Test