Documentos de Académico
Documentos de Profesional
Documentos de Cultura
GeneracionVariablesAleatorias PDF
GeneracionVariablesAleatorias PDF
Variables Aleatorias
UCR ECCI
CI-1453 Investigacin de Operaciones
Prof. M.Sc. Kryscia Daviana Ramrez Benavides
Introduccin
Tipos de Generadores
Distribucin Uniforme
f(x)
f(x)=y
1
F(x)
1 x
3.
Cada nmero aleatorio en una secuencia (en este caso de 00 a 99) tiene
una probabilidad igual (en este caso 0.01) de aparecer, y cada uno es
independiente de los nmeros antes y despus de l.
Generacin de Valores
Tiempo de Servicio
(minutos)
Probabilidad
Rango
0.35
0 34
0.40
35 74
0.25
75 99
Algoritmo de convolucin.
Mtodo directo.
10
11
F ( x ) = f (t )dt
x
2.
3.
12
Se calcula fda:
x t
x2
F ( x ) = dt =
0 2
4
0
x2
F (x ) =
4
1
x<0
0 x2
x2
13
14
e x
f (x ) =
0
x 0, > 0
en caso contrario
Se calcula fda:
F (x ) = e dt = 1 e
x
0
F (x ) =
x
1
e
x<0
x0
15
=r
e x = 1 r
x = ln (1 r )
x=
x=
ln (1 r )
ln (1 0 ) = 0
16
(
)
f x = b a
0
a0b
en caso contrario
Se calcula fda:
F (x ) =
1
xa
dt =
ba
ba
0
x a
F (x ) =
b a
1
x<a
a xb
x>b
17
x = a + r (b a )
x = a + 0.5(b a ) = 0.5a + 0.5b
18
2 x3
2
1
x
f (x ) = 2 3 x 6
3
2
en caso contrario
0
Se calcula fda:
0
x1
1
2
1
2
F1 (x ) = (t 2 )dt = (x 2 )
(
)
x
2 2
4
F (x ) = 4 1
2
x1
1 2
t
x
12 x + 24
F2 (x ) = 2 dt =
x 12 x + 24
3 2
12
3
12
x<2
2 x3
3 x 6
en caso contrario
19
0.25 r 1
1 2
x 12 x + 24 = r
12
20
1 2
x 12 x + 24 = r
12
x 2 12 x = 24 12r
x 2 12 x + 36 = 36 24 12r
(x 6)2 = 12 12r
x 6 = 12 12r
x = 2 + 4r
x = 6 2 3 3r
x = 2 + 4 0 = 2 x = 6 2 3 3 2 3 = 4
21
22
23
24
25
ms grande
de f(x) ocurre x = 6
El valor
y es igual a 1/3.
Entonces, M = 1/3.
Se genera dos nmeros aleatorios r1 y r2, por ejemplo, r1 = 0 y
r2 = 1.
Se calcula x* = a + (b a)r1 = 2 + (8 2)0 = 2
26
1 x*
2 x* 6
f ( x *) = f1 ( x *) = +
6 12
4 x*
f ( x *) = f 2 ( x *) =
6 x* 8
3 6
UCR-ECCI CI-1453 Investigacin de Operaciones
Generacin de Variables Aleatorias
27
28
29
Distribucin Normal
Algoritmo de convolucin.
Mtodo directo.
30
Distribucin Normal
Algoritmo de Convolucin
2
n
x
n
n
i
i =1
X=
x
i =1
31
Distribucin Normal
Algoritmo de Convolucin (cont.)
z=
r n
i =1
(n )
2 12
n (0,1)
32
Distribucin Normal
Algoritmo de Convolucin (cont.)
z=
r n
i =1
(n )
2 12
n (0,1)
x = z +
33
Distribucin Normal
Algoritmo de Convolucin (cont.)
n = 12.
= 0.5
2 = 1/12
Se calcula la variable z:
12
z = ri 6 n (0,1)
i =1
34
Distribucin Normal
Mtodo Directo
35
Distribucin Normal
Mtodo Directo (cont.)
z1 = ( 2 ln r1 ) sen (2r2 )
12
z 2 = ( 2 ln r1 ) cos(2r2 )
12
x1 = z1 +
x2 = z 2 +
UCR-ECCI CI-1453 Investigacin de Operaciones
Generacin de Variables Aleatorias
36
Referencias Bibliogrficas
37