# Material for the course held for section HS, NVE

### Presentations

• Day 1: Why statistics, summary statistics, probabilities, conditional probabilities, the law of total probability, Bayes formula, probability densities, properties and relationship to summary statistics, diagnostic plots, some core statistical distributions and processes, short recap of frequentist statistics, estimation, confidence intervals, classic hypothesis testing, p-values, other model choice strategies.
Exercises: Not yet determined.
• Day 2: Bayesian statistics, a simple example, the types of distributions involved, pre-knowledge and setting the prior distribution, model averaging, simulation, MCMC, single variable linear regression, multivariate linear regression, non-linear regression, non-normal regression, Bayesian regression, warning against regression for time series, intro to time series analysis, diagnostic plots, ARIMA models, Markov chains with linear examples, hidden Markov chains, Kalman filtering with example, spatial statistics.
Exercises: Not yet determined.

### Exercises, data and help material

• Exercises Collection of exercises.
• Answers. My own answers to the exercises.
• Exercise 1: Model adaption, normal and lognormal, used on data from Hølen. R code. Data.
• Exercise 2: Frequentist examination of the expected discharge at Hølen. Confidence intervals and model testing on expected discharge=10m^3/s. R code. Data.
• Exercise 3: Analysis of repeat period for a given threshold value in continuous time. Data given in the text. No R required.
• Exercise 4: Independence, Markov chains and precipitation at Blindern. (Will probably be used on the second day, Thursday). Check if the rain status at Blindern is time dependent or not. R code. Data.
• Exercise 5: Medical example translated to the language of Bayesian statistics. Data given in the text. No R required.
• Exercise 6: Expectation value for mean discharge at Hølen – Bayesian analysis. R code. Data.
• Exercise 7: Bayesian analysis of repeat period for a given threshold value in continuous time. R code. Data given in the text.
• Exercise 8: Perform a power-law regression on discharge as a function of stage at station Gryta, that is do a linear regression of log(discharge) against log(stage). (Zero-plane, h0=0) R code. Data.
• Exercise 9: Examine enviromental/ecological data to find the relationship between number of species and environmental factors. Use Poisson regression. R code. Data.
• Exercise 10: Perform a power-law regression on discharge as a function of stage at station Gryta, that is do a linear regression of log(discharge) against log(stage-zero plane), now with unknown zero-plane. R code. Data.

### Side exercises for the specially interested

These are also listed in .
• 1: Illustrate the law of large numbers and the central limit theorem R code. Artificially made data.
• 2: Outcome of dice throws. R not required. Not a data exercise.
• 3: Marginal probability of rain at Blindern plus use of Bayes formula. R not required. Not a data exercise.
• 4: "Ecological" exercise using conditional probabilities, the law of total probability and Bayes formula. R not required. Not a data exercise. PS: Slightly silly.
• 5: Extreme value analysis at Bulken (about 120 years of data). R code. Data.
• 6: Will de-trend daily data from Hølen using linear regression. Then a relatively naive ARMA time series analysis will be performed. R code. Data.
• 7: Use the Kalman filter to interpolate over holes at the station Farstad, year 1993. Will use the simplest type of continuous time Markov chain, namely the Wiener process (random walk). R code. Data.
• 8: Use the Kalman filter to interpolate over holes at the stations Etna and Hølervatn, 2010-2011. The data has equi-distant time resolution (days) and will be log-transformed before the analysis. Use a 2-dimensional AR(1) process (thus stationary), corr-correlated noise (so that completition is possible), equal auto-correlation, variance and seasonal trends but individual expectancy. R code. Data.

### Links

Trond Reitan, , 8/3-2013