Download presentation

Presentation is loading. Please wait.

Published byNash Turner Modified over 4 years ago

1
Markov chains

2
Probability distributions

3
Exercise 1.Use the Matlab function nchoosek(n,k) to implement a generic function BinomialPMF(k,n,p) for calculating the Binomial PMF with k successes in n trials with probability p. 2.Use the barplot function to plot the pmf values (k=0..10) for Bin(10,0.5) as below:

4
Markov chains

6
Example: A very simple weather model (modified from Wikipedia page Examples of Markov chains) The probabilities of weather conditions, modeled as either sunny=0 or rainy=1, given the weather on the preceding day, can be represented by a transition matrix

7
Weather model example The matrix P represents the weather model in which a sunny day is 90% likely to be followed by another sunny day, and a rainy day is 50% likely to be followed by another rainy day. The columns can be labelled sunny and rainy respectively, and the rows can be labelled in the same order. P ij is the probability that, if a given day is of type i, it will be followed by a day of type j. Note that the rows of P add up to 1: sum(P)

8
Weather model example

9
Exercise If the the weather on the first day has 50% probability of being sunny or rainy, then what is the probability of the ninth day being sunny? What about the 30 th day?

10
Weather model example

11
Eigenvectors / Eigenvalues

12
We can calculate eigenvalues and eigenvectors in Matlab using the built-in function eig. The default behavior is for right eigenvalues/eigenvectors, but left eigenvalues/eigenvectors are easily obtained by transposing the matrix. We will be using the form (from Matlab help for eig): [V,D] = eig(A) produces matrices of eigenvalues (D) and eigenvectors (V) of matrix A, so that A*V = V*D. Matrix D is the canonical form of A a diagonal matrix with As eigenvalues on the main diagonal. Matrix V is the modal matrix - its columns are the eigenvectors of A. Note that Matlab always returns eigenvectors with norm 1.

13
Exercise 1.Use the eig function to find out, in the long term, what is the percentage of sunny days in the weather example.

Similar presentations

OK

MARKOV CHAIN A, B and C are three towns. Each year: 10% of the residents of A move to B 30% of the residents of A move to C 20% of the residents of B move.

MARKOV CHAIN A, B and C are three towns. Each year: 10% of the residents of A move to B 30% of the residents of A move to C 20% of the residents of B move.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on needle stick injury treatment Computer brain ppt only Ppt on hydrogen fuel cell vehicles Ppt on indian retail industry Ppt on power electronics application Ppt on regular expression generator Ppt on tata motors history Ppt on media research analyst Ppt on limits and derivatives examples Ppt on programmable logic array diagram