Vous êtes sur la page 1sur 9

EDRP - Winter 2014

Project

Laboratory Nr 3: Simulation of
branching processes and introduction
to simulation of Poisson process.

Supervisor:
Student:
dr hab. Pawe J.
Krzysztof Popawski
Szabowski

Wednesday 17th December, 2014


Warsaw, Poland
Faculty of Electronics & Information Technology
Choosing L and Random Variables D and E
The first task is to choose a positive integer L. This is done by generating a random value
on some reasonably small interval (1, 10).
= [{ }]
= / [ { }]

The next step is to generate random variables D and E with expectations less than,
and greater than 1, respectively. Lets consider D or E with probabilities of each non-
zero value p0 , and probability of zero 1 L p0 , accordingly. We can set p0 to be inverse
sum of values in the support times some coefficient x. In this way, we modulate proba-
bilities of non-zero values in such way, that expectation will simply be x.
[_ ] = (
[[] < - * * [] [[{ }]]]
)
[_ ] = (
[[] < - * * [] [[{ }]]]
)

1
Realizations of D and E
=
= [[] {}]
= [[] {}]

[]
[] //
[ ]

[]
[] //
[ ]

4 70

60

3
50

40
2
30

20
1

10

0
20 40 60 80 100 0 1 2 3 4 5

Figure 1: Listplot (left) and histogram (right) of 100 realizations of D. Mean value = 0.8.

4
50

3 40

30
2

20

1
10

0
20 40 60 80 100 0 1 2 3 4 5

Figure 2: Listplot (left) and histogram (right) of 100 realizations of E. Mean value = 1.15.

2
5 Realizations of Branching Processes with D and E
[]
= [{ } { }]
[[ ]] =
[ = ++
[[ ]] = [[] { [[ - ]]}]
]
[ ]

1.0

0.8

0.6

0.4

0.2

1 2 3 4 5

Figure 3: 5 Realizations of process X. It dies out immediately most of the time.

We expect most realizations of X to die out quickly because we start with only 1 in the
zero-th generation and the probability of non-zero values is relatively low. Alternatively
we expect most realizations of Y to grow because the expectation of E is greater than 1.

[]
= [{ } { }]
[[ ]] =
[ = ++ [[ ]] = [[] { [[ - ]]}]]
[ ]

15

10

1 2 3 4 5

Figure 4: 5 Realizations of process Y. The population grows as expected because expectation of


E is above 1.

3
Numerically smallest positive roots
[_ ] = (
[
[ - * * / [ { }]]
[ * / [ { }]]
]
)
[]

= / == * []
=
=
[ =
[]
++
[([[[]]] [[]] [[]] > )
= [[]]
]
]

[]
[_ ] = (
[
[ - * * / [ { }]]
[ * / [ { }]]
]
)

= / == * []
=
=
[ =
[]
++
[([[[]]] [[]] [[]] > )
= [[]]
]
]
//

These values, dpropmin and epropmin give some indication of the trend that the processes
X and Y will die out, since they are related directly to random variables D and E their
probabilities of zero and non-zero values. A value of 1 indicates that dying out is a
certainty. For higher expectation of E we would expect epropmin to drop significantly.

4
Simulating 100 Processes X
[_ _ ] = (
= [ {}]

[ = ++
=
=

[ >
= [[] { }]
+=
]
[[]] =
]
[]
)

60

50

40

30

20

10

0
2 4 6 8

Figure 5: Histogram of the generations at which branching process X/population died out.

We can see empirically the shape of the distribution of generations at which process X died
out resembles exponential with relatively high value. As expected most values are in the
range 1-2, with very little or no surviving to even the tenth generation. The probability
of surviving to each consecutive generation falls with the number of generation.

5
Simulating 100 Processes Y to the 100th generation
[_ _ ] = (
= [ {}]
[ = ++
=
=

[ = ++
= [[] { }]
]

[[]] = [ > ]
(* *)
]
[]
)

The function EDiedOut for successful population with many offspring caused huge com-
putation load for Mathematica due to the exponential growth of the population. This
value is around 0.9, very close to the value e calculated in the previous task. This gives
some indication of the probability that the generation will survive. Since the expectation
is above one, we expect this value to be less than 1 (indicating some populations sur-
vived). For expectations much larger than one, we would expect this value to be almost
0, indicating no populations died out.

6
Exponential Random Variables
=
= [[[]] { }]
= [[[ / ]] { }]
[ @ [[[] ]
{ { }}] { }


{ }]
[{ } { }]

2.0
300

250
1.5

200

1.0
150

100
0.5
50

0
2 4 6 8 10 0 2 4 6 8 10 12 14

Figure 6: Mathematically precise graphs (left) of exponential distributions, and histograms of


1000 realizations (right). Exponentials with = 2 in blue, and = 1/2 in red.

[{[[[] ] - ]
[[[] ] - ]}
{-/ -}

{ }]

80

60

40 X-1/2

20 Y-2

200 400 600 800 1000

-20

Figure 7: A comparison of both walking processes to show the relative growth.

We can see that due to the fact that Y 2 has much more spread out distribution (more
values

7
100
30

20 50

10

X-1/2 200 400 600 800 1000 Y-2


200 400 600 800 1000

-10 -50

-20
-100
-30

Figure 8: 5 realizations each of X 1/2 walking process (left) and Y 2 walking process (right).

As before the Y 2 has much more spread out values and we can see by the growth that
it reaches values on the order of 100, whereas X 1/2 only reaches around +-30.

Vous aimerez peut-être aussi