0% found this document useful (0 votes)
3 views

Chapter 03 - Modeling Random Variables for Simulation

Chapter 3 discusses the modeling of random variables for simulation, covering both continuous and discrete random variables. It provides examples of generating random values using MATLAB and explains concepts such as continuous uniform distribution, exponential distribution, and their respective properties like mean and variance. The chapter also hints at further topics like normal and Poisson distributions.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Chapter 03 - Modeling Random Variables for Simulation

Chapter 3 discusses the modeling of random variables for simulation, covering both continuous and discrete random variables. It provides examples of generating random values using MATLAB and explains concepts such as continuous uniform distribution, exponential distribution, and their respective properties like mean and variance. The chapter also hints at further topics like normal and Poisson distributions.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Course

Simulation of Industrial Systems

Modeling
Random
Variables for
Simulation
Chapter 3

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 1 of 46


Continuous/Discrete Random
Variables
 A continuous/Discrete Random Variable X is a function that
returns real values defined on a set  (set of possible
events for example), such that the value taken by X, noted
X(), belongs to a finite or infinite interval.

Example1 for  :  = {obverse, reverse} i.e front face and


back face for a money coin). This is in the context of lunching
a money coin.
Example2 (discrete random variable)
 ={1,2,3,4}  X() = random value between 1,2,3,4
In Matlab: >> X=randi([1,4],1,1)
X =
2

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 2 of 46


Example2 (Continuous random variable)
 =[0,1[  X() = random real value between 0 and 1
In Matlab: >> X=rand(1,1)
X =
0.65428

X=rand(1,2)
X =
0.45125 0.14433

Question : How obtaining a random continuous


(real) variable between 1 and 4? In [1,4[

0 ≤rand(1,1)<1
0 ≤3*rand(1,1)<3
1 ≤1+(4-1)*rand(1,1)<4
A random real value in [a,b[: a + (b-a)*rand()

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 3 of 46


5+15*rand(3,4)

ans =

6.7850 10.1058 16.2690 15.4862


12.4755 13.7790 8.8264 18.3635
19.3962 8.3572 12.5894 19.3894

1+3*rand(1,1)

ans =

2.6416

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 4 of 46


Example of Continuous Uniform rule
• [Definition ]: Continuous Uniform distribution rule
Let X be a random variable susceptible to take all values of an
interval [a, b] without favoring any region of [a, b] (we speak
about equiprobable events).

This means that the probability that X takes a value belonging to


[u, v] ( [a, b] and u<v) is proportional to the length [u, v].

Density of probability

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 5 of 46


Example of Continuous Uniform rule
Note that:

• The Average M or mean value also called expected value or


Mathematical Expectation E() is defined as:

In case of
Uniform rule
• The Variance Var() = (), being the square of standard
deviation, is defined as:

In case of
Uniform rule

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 6 of 46


Example of Exponential rule

This law is often used in simulation practice. For example, in the


case of time separating the arrivals of two successive “customers" in
the study of a waiting (queuing) systems, or in the case of estimating
the duration of reliable operating of a technical equipment.
Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 7 of 46
Example of Exponential rule
Exponential distribution law is used in general to model the lifetime
of phenomenon “without memory”, i.e it verifies that:

This means that the probability that the phenomenon lasted at least
units of time knowing that it has already lasted units of time will be
the same as the probability of lasting units of time from its initial
activation.

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 8 of 46


• See (Homework2)

• Normal Distribution rule?


• Poisson rule?
• ?

• ----------------------------------------------------------
• Density Distribution function f(x)
• E(X), Var(X) ?

Dr Racem Mellouli Chapter 3 – Modeling Random Variables for Simulation Slide 9 of 46

You might also like