DON'T download this file, it was damaged. If you like this ebook, please use another poster.
zgp480
================================================================
ebook: Computational Statistics with Matlab. (Mark Steyvers, March 15, 2010)
Contents
1 Sampling from Random Variables 4
1.1 Standard distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Sampling from non-standard distributions . . . . . . . . . . . . . . . . . . . 7
1.2.1 Inverse transform sampling with discrete variables . . . . . . . . . . . 8
1.2.2 Inverse transform sampling with continuous variables . . . . . . . . . 11
1.2.3 Rejection sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 Markov Chain Monte Carlo 16
2.1 Monte Carlo integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3 Putting it together: Markov chain Monte Carlo . . . . . . . . . . . . . . . . 19
2.4 Metropolis Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5 Metropolis-Hastings Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.6 Metropolis-Hastings for Multivariate Distributions . . . . . . . . . . . . . . . 26
2.6.1 Blockwise updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.6.2 Componentwise updating . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.7 Gibbs Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3 Graphical Models 39
3.1 A Short Review of Probability Theory . . . . . . . . . . . . . . . . . . . . . 39
3.2 The Burglar Alarm Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.2.1 Conditional probability tables . . . . . . . . . . . . . . . . . . . . . . 42
3.2.2 Explaining away . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.2.3 Joint distributions and independence relationships . . . . . . . . . . . 45
3.3 Graphical Model Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.3.1 Example: Consensus Modeling with Gaussian variables . . . . . . . . 47
4 Approximate Inference in Graphical Models 50
4.1 Prior predictive distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2 Posterior distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2.1 Rejection Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2.2 MCMC Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
1
CONTENTS 2
4.2.3 Example: Posterior Inference for the consensus model with normally
distributed variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.2.4 Example: Posterior Inference for the consensus model with contaminants 59
5 Sequential Monte Carlo 62
5.1 Hidden Markov Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.1.1 Example HMM with discrete outcomes and states . . . . . . . . . . . 64
5.1.2 Viterbi Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.2 Bayesian Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.3 Particle Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3.1 Sampling Importance Resampling (SIR) . . . . . . . . . . . . . . . . 67
5.3.2 Direct Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
附件列表