+ All Categories
Home > Documents > A Small Wager (cont’d) - DCU School of Computingmcrane/CA659/NewSlides/CA659Lecture3_DM… · A...

A Small Wager (cont’d) - DCU School of Computingmcrane/CA659/NewSlides/CA659Lecture3_DM… · A...

Date post: 05-Jul-2018
Category:
Upload: vulien
View: 218 times
Download: 0 times
Share this document with a friend
12
Intro to the Topic Time Series Discrete Models Growth and Decay Linear Difference Equations A Small Wager (cont’d) Which may be shown to be: u n = 1.7 -0.65 1 1 1.7 n 0 0 (-0.65) n × 0.43 0.28 -0.43 0.78 u 0 Which reduces to u n =0.43 (1.7 n+1 ) - (-0.65) n+1 1.7 n - (-0.65) n (3.41) for an initial sum of u 0 = (1, 0) T , this givesu 1 1.05 1 etc. 34 / 59 Intro to the Topic Time Series Discrete Models Growth and Decay Linear Difference Equations The Leslie Matrix The Leslie matrix is a generalization of the above. It describes annual increases in various age categories of a population. As above we write p n+1 = Ap n where p n , A are given by: p n = p 1 n p 2 n . . . p m n , A = α 1 α 2 ... α m-1 α m σ 1 0 ... 0 0 0 σ 2 . . . . . . . . . 0 0 ... σ m-1 0 (3.42) α i , σ i , the number of births in age class i in year n & probability that i year-olds survive to i +1 years old, respectively. 35 / 59 Notes Notes
Transcript

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

A Small Wager (cont’d)

Which may be shown to be:

un =(

1.7 −0.651 1

)(1.7n 0

0 (−0.65)n

)×(

0.43 0.28−0.43 0.78

)u0

Which reduces to

un = 0.43[

(1.7n+1)− (−0.65)n+1

1.7n − (−0.65)n]

(3.41)

for an initial sum of u0 = (1, 0)T , this givesu1 ≈(

1.051

)etc.

34 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix

The Leslie matrix is a generalization of the above.It describes annual increases in various age categories ofa population.As above we write pn+1 = Apn where pn, A are given by:

pn =

p1n

p2n...pmn

, A =

α1 α2 . . . αm−1 αmσ1 0 . . . 0 0

0 σ2...

. . ....

0 0 . . . σm−1 0

(3.42)

αi, σi, the number of births in age class i in year n & probabilitythat i year-olds survive to i+ 1 years old, respectively.

35 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

Long-term population demographics found as with Eqn.(3.21)using λis of A in Eqn.(3.42)& det(A− λI) = 0 to give Leslie characteristic equation:

λn − α1λn−1 − α2σ1λ

n−2 − α3σ1σ2λn−3 − · · · − αn

n−1∏i=1

σi = 0

(3.43)αi, σi, are births in age class i in year n & the fraction that iyear-olds live to i+ 1 years old, respectively.

36 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

Eqn.(3.43) has one +ive eigenvalue λ∗ & correspondingeigenvector, v∗.For a general solution like Eqn.(3.19)

Pn = c1λn1 v1 +����:

0c2λ

n2 v2 + · · ·+���

��:0cnλ

nmvm,

with dominant eigenvalue λ1 = λ∗ gives long-term solution:

Pn ≈ c1λn1 v1 (3.44)

with stable age distribution v1 = v∗. The relative magnitudes ofits elements give stable state proportions.

37 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

Example 3: Leslie Matrix for a Salmon PopulationSalmon have 3 age classes & females in the 2nd & 3rd produce4 & 3 offspring, each season.Suppose 50% of females in 1st age class survive to 2nd ageclass & 25% of females in 2nd age class live on into 3rd.The Leslie Matrix (c.f. Eqn.(eqn:1.14)) for this population is:

A =

0 4 30.5 0 00 0.25 0

(3.45)

Fig. 3.4 shows the growth of age classes in the population.

38 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Leslie Matrix cont’d

Example 3: Leslie Matrix for a Salmon Population

FIGURE 3.4 : Growth of Salmon Age Classes

39 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

Example 3: Leslie Matrix for a Salmon PopulationThe eigenvalues of the Leslie matrix may be shown to be

Λ =

λ1 0 00 λ2 00 0 λ3

=

1.5 0 00 −1.309 00 0 −0.191

(3.46)

and the eigenvector matrix S to be given by

S =

0.9474 0.9320 0.22590.3158 −0.356 −0.5910.0526 0.0680 0.7741

(3.47)

Dominant e-vector: (0.9474, 0.3158, 0.0526)T , can benormalized (divide by sum), to (0.72, 0.24, 0.04)T .

40 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

Example 3: Leslie Matrix for a Salmon Population cont’dLong-term, 72% of pop’n are in 1st age class, 24% in 2ndand 4% in 3rd.Thus, due to principal e-value λ1 = 1.5, populationincreases.Can verify by taking any initial age distribution &multiplying it by A.It always converges to the proportions above.

41 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

The Leslie Matrix cont’d

A side note on matrices similar to the Leslie matrix.Any lower diagonal matrix of the form 0 0 0

1 0 00 1 0

(3.48)

Can ‘move’ a vector of age classes forward by 1 generation e.g. 0 0 01 0 00 1 0

× a

bc

=

0ab

(3.49)

42 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Stability in Difference Equations

If difference equation system has the form un = Aun−1then growth as n→∞ depends on the λi thus:

If all eigenvalues |λi| < 1, system is stable & un → 0 asn→∞.

Whenever all values satisfy |λi| ≤ 1, system is neutrallystable & un is bounded as n→∞.

Whenever at least one value satisfies |λi| > 1, system isunstable & un is unbounded as n→∞.

43 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes

Often with difference equations don’t have certainties of events, butprobabilities.So with Leslie Matrix Eqn.(3.42):

pn =

p1

n

p2n

...pm

n

, A =

α1 α2 . . . αm−1 αm

σ1 0 . . . 0 0

0 σ2. . .

......

0 0 . . . σm−1 0

(3.50)

σi is probability that i year-olds survive to i+ 1 years old.Leslie model resembles a discrete-time Markov chain

Markov chain: discrete random process with Markov propertyMarkov property: state at tn+1 depends only on that at tn.

The difference between Leslie model & Markov model, is:In Markov αm + σm must = 1 for each m.Leslie model may have these sums <> 1.

44 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Stochastic ProcessesA Markov Process is a particular case of a Stochastic Process.Stochastic Process is where probabilities govern entering astate.A Markov Process is a Stochastic Process where probability toenter a state depends only on the last state occupiedas well as on the Transition matrix governing the process.If Transition Matrix terms are constant from one timestep to thenext, process is Stationary.

45 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

General form of discrete-time Markov chain is given by:

un+1 = Mun

where un, M are given by:

un =

u1

n

u2n

...up

n

, M =

m11 m12 . . . m1 p−1 m1p

m21 m22 . . . m2 p−1 m2p

......

. . ....

...mp1 mp2 . . . mp p−1 mpp

(3.51)

M is p× p Transition matrix & its mij terms are called Transitionprobabilities such that

∑p

i=1 mij = 1.

mij is probability that that item goes from state i at tn to state j at tn+1.

46 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 4: Two Tree Forest EcosystemIn a forest there are only two kinds of trees: oaks and cedars.At any time n sample space of possible outcomes is (O,C)Here O = % of tree population that is oak in a particular yearand C, = % that is cedar.If same life spans & on death same chance an oak is replacedby an oak or a cedarBut that cedars are more likely (p = 0.74) to be replaced by anoak than another cedar (p = 0.26).How can we track changes in the different tree types with time?

47 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 4: Two Tree Forest EcosystemThis is a Markov Process as oak/cedar fractions at tn+1 etc aredefined by those at tn.Transition Matrix (from Eqn.(3.51)) is Table 3.1:

FromOak Cedar

Oak 0.5 0.74To

Cedar 0.5 0.26

TABLE 3.1 : Tree Transition Matrix

Table 3.1 in matrix form is:

M =(

0.5 0.740.5 0.26

)(3.52)

48 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 4: Two Tree Forest EcosystemTo track system changes, let un = (on, cn)T be probability of oak& cedar after n generations.If forest is initially 50% oak and 50% cedar, then u0 = (0.5, 0.5)T .Hence

un = Mun−1 = Mnu0 (3.53)

M can be shown to have one positive λ & correspondingeigenvector (0.597, 0.403)T

This is the distribution of oaks and cedars in the nth generation.

49 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 5: Soft Drink Market ShareIn a soft drinks market there are two Brands: Coke & Pepsi.At any time n sample space of possible outcomes is (P,C)Here P = % market share that is Pepsi’s in one year and C,= % that is Coke’s.Know that chance of switching from Coke to Pepsi is 0.1And the chances of someone switching from Pepsi to Cokeare 0.3.How can the changes in the different proportions bemodelled?

50 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 5: Soft Drink Market ShareThis is a Markov Process as shares of Coke/Pepsi at tn+1 are definedby those at tn.

Transition Matrix (from Eqn.(3.51)) is Table 3.2:

FromCoke Pepsi

Coke 0.9 0.3To

Pepsi 0.1 0.7

TABLE 3.2 : Soft Drink Market Share Matrix

Table 3.2 in matrix form:

M =(

0.9 0.30.1 0.7

)(3.54)

51 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 5 can also be represented using a Transition Diagram,thus:

FIGURE 3.5 : Market Share Transition Diagram

The eigenvalues of the matrix in Eqn(3.53) are 1, 35 .

The largest eigenvector, can be found to be (0.75, 0.25)T .This is the proportions of Coke and Pepsi in the nthgeneration.

52 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Absorbing States

A state of a Markov Process is said to be absorbing or Trappingif Mii = 1 and Mij = 0 ∀j

Absorbing Markov Chain

A Markov Chain is absorbing if it has one or more absorbingstates. If it has one absorbing state (for instance state i, thenthe steady state is given by the eigenvector X where Xi = 1and Xj = 0 ∀j 6= i

53 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 5: Soft Drink Market Share, RevisitedAs Soft Drinks market is ‘liquid’, KulKola decides to trial productBrand ‘X’.Despite its name, Brand ‘X’ has potential1 to ‘Shift the Paradigm’in Cola consumption.They think, inside 5 years, they can capture nearly all the market.Investigate if this is true, given that they take 20% of Coke’sshare and 30% of Pepsi’s per annum.

1from KulKola’s Marketing viewpoint54 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Example 5: Soft Drink Market ShareAgain, shares of Coke/Pepsi/Brand ‘X’ at n+ 1 etc are defined by thoseat n.Transition Matrix (from Eqn.(3.51)) is Table 3.3:

FromCoke Pepsi Brand ‘X’

Coke 0.6 0.4 0To Pepsi 0.2 0.3 0

Brand ‘X’ 0.2 0.3 1

TABLE 3.3 : Soft Drink Market Share Matrix Revisited

Table 3.3 in matrix form:

M =

( 0.6 0.4 00.2 0.3 00.2 0.3 1

)(3.55)

55 / 59

Notes

Notes

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

The Transition Diagram corresponding to Example 5 Revisitedis:

FIGURE 3.6 : Market Share Transition Diagram

λmax of the matrix in Eqn(3.55) is 1.vmax, is (0, 0, 1)T giving the shares of Coke, Pepsi andBrand ‘X’ in the nth generation, respectively.

56 / 59

Intro to the TopicTime Series

Discrete ModelsGrowth and Decay

Linear Difference Equations

Markov Processes cont’d

Markov Models have a visible stateSo the state transition probabilities & transition matrix canbe noted by the observer.In another type of model, Hidden Markov Models thisvisibility restriction is relaxedThe transition probabilities are generally not known.These kind of models are very useful in AI as well as manyother applications.

57 / 59

Notes

Notes


Recommended