In a lecture I attended, it was said that until recently (the last 20-30 years), the weather today was on average the best weather forecast for tomorrow you could attain. On that note, let's do some weather forecasting!
In this clip, I'll check if a dataset of thresholded rain data contains day-to-day dependency or not. I'm doing this by considering two model. One without dependency (model 1, the free binomial model, see clip 19) and one with a day-to-day dependency. The structure of the latter model (model 2) is that of a stationary Markov chain. So if you know the previous state, the states before it are irrelevant for the current state. And because of stationarity, the transition probabilities from rain to not rain and vice versa are the same for each day.
In a sense this is the same setup as for clip 22. We've got two sources namely days where it rained the day before, and days where it didn't rain the day before.
Other examples where Markov chains can be used: other weather related data (temperature, humidity etc), hydrology (water level, discharge, development of hydraulic parameters), rocketry (updating of trajectory state calculations, Kalman filters, used for instance in the Apollo missions), economics (stock prizes) and much much more.
Slides can be found here:
http://folk.uio.no/trondr/uncert23.pdf
R code can be found here:
http://folk.uio.no/trondr/uncert23.R
Data (with most surrounding info removed) can be found here:
http://folk.uio.no/trondr/blindern_tersklet.txt
Prerequisites: RUU 16-20 and 22
Relevant: RUU #13 and YT Identity Survey #5:
http://www.youtube.com/watch?v=UoyYlkjeBWs
My apologies to BrunoTheQuestionable for accidentally erasing his comment. Youtube should have a "do you really want to do this" dialog button for us chronically clumsy people.
Bruno asked about other uses for Markov chains. I'll try to put a few of them in the description box.
trondreitan 3 years ago
No problem, its easier to switch to the messaging system anyway :)
Thanks for the examples.
Its been sunny here all this week, after raining all last week - looks like it works !
BrunoTheQuestionable 3 years ago
The Markov chain strikes back again! :)
trondreitan 3 years ago
Cool. Was it raining yesterday, too? :)
trondreitan 3 years ago