Stochastic Systems Analysis and Simulations
Stochastic Systems Analysis and Simulations
Alejandro Ribeiro
Dept. of Electrical and Systems Engineering
University of Pennsylvania
[email protected]
http://www.seas.upenn.edu/users/~aribeiro/
Presentations
Gambling
I Alejandro Ribeiro
I Professor, Electrical and Systems Engineering
I Walnut 3401 floor 4B. http://alliance.seas.upenn.edu/~aribeiro/wiki
I Teaching assistants: Harshat Kumar and Luana Rubini Ruiz
I Class email: [email protected]. Don’t write to our personal
addresses. Please.
I Probability theory
I Stochastic processes are time-varying random entities
I If unknown, need to learn as we go
I Will cover in first seven lectures
I Linear algebra
I Vector matrix notation, systems of linear equations, eigenvalues
I Programming in Matlab
I Needed for homework.
I If you know programming you can learn Matlab in one afternoon
I But it has to be this afternoon
I This is, really, a great class. You will do things that look like magic
I Also, the class is front loaded. It will become easier after the break.
⇒ Don’t drop it! You will enjoy it.
Presentations
Gambling
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
Amplitude
Amplitude
0 0
−0.2 −0.2
−0.4 −0.4
−0.6 −0.6
−0.8 −0.8
−1 −1
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
Time [sec] Time [sec]
“Bye” ‘S”
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
Amplitude
Amplitude
0 0
−0.2 −0.2
−0.4 −0.4
−0.6 −0.6
−0.8 −0.8
−1 −1
0 0.05 0.1 0.15 0.2 0.25 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14
Time [sec] Time [sec]
0.2dt
Presentations
Gambling
I Shall we play?
I She didn’t go broke. After t = 1000 bets, her wealth is w (t) = 109
I Less likely to go broke now because wealth increased
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
I But this does not mean that all players will turn out as winners
I The twelfth player j = 12 goes broke
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
I But this does not mean that all players will turn out as winners
I The twelfth player j = 12 goes broke
40
35
30
25
wealth (in $)
20
15
10
0
0 50 100 150 200 250
bet index
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
200
180
160
140
120
wealth (in $)
100
80
60
40
20
0
0 100 200 300 400 500 600 700 800 900 1000
bet index
I To discover average tendency notice that for all times t we can write
W (t + 1) = W (t) + 2X (t) − 1
I Consider J experiments
I For each experiment, there is a wealth history wj (t)
I We can estimate the average outcome as
J
1X
w̄J (t) = wj (t)
J
j=1
65
60
55
50
wealth (in $)
45
40
35
30
25
20
0 50 100 150 200 250 300 350 400
bet index
h i 1X J h i
H t; w (n) , w (n+1) = I w (n) ≤ wj (t) < w (n+1)
J
j=1
I The pdf broadens and shifts to the right (t = 10, 50, 100, 200)
0.25 0.25
0.2 0.2
frequency
frequency
0.15 0.15
0.1 0.1
0.05 0.05
0 0
0 10 20 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 80 90
wealth (in $) wealth (in $)
0.25 0.25
0.2 0.2
frequency
frequency
0.15 0.15
0.1 0.1
0.05 0.05
0 0
0 10 20 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 80 90
wealth (in $) wealth (in $)