Skip to content

Relevant files for my sections of Stat 102C at UCLA (Spring 2014)

Notifications You must be signed in to change notification settings

jarfa/Stat-102C-TA-Notes

Repository files navigation

This repository contains files for my Stat 102C sections.

Many of our discussion sections will involve me going over R code that’s relevant to what you’ve been learning that week. I’ll (hopefully) be uploading the code here by Tuesday night before our section.

Note on the .Rnw files: if you're going to compile them into PDF's yourself, check your Rstudio preferences to see if it's going to use Sweave or Knitr. Make sure you're using the right one.

1st Week

PI simulation.R: This is part of an assignment we had for Stat 202A, the grad-level intro R class. Along with reviewing key R concepts, this should demonstrate how (and why) we vectorize our code.

ReservoirSampling.R: this is an interesting problem (that is not directly applicable to this course, but is good to practice you R skills): how do we sample from a vector of unknown length? The R code is pretty basic, but if you can understand what the code does you will be ready for this course.

2nd Week

Rejection Sampling & Inverse CDF Sampling, yay!. These are both ways to use random samples from a very simple distribution (like uniform) to get samples from more complex (but usually univariate) distributions.

Sampling from complex multivariate distributions is what MCMC algorithms are for - so hold your horses.

3rd Week

Homework #1 hints. The solution will be posted once Prof. Wu is sure that nobody else will be turning it in.

4th Week

Monte Carlo integration, get psyched! A bit of classic MC integration & importance sampling.

Prof. Wu is letting you all re-do parts of HW1 for credit. So we'll give you even more hints.

5th Week

Went over HW2. Check the repository for Pseudo-code for Prob 3.2

8th Week

Week 8 already? HW3 solutions will be uploaded, and we're moving from MC into MCMC. Metropolis and Metropolis-Hastings will be introduced. I highly recommend watching this youtube video to understand MH samplers.

9th Week

We'll mostly talk about HW#4, and maybe get a tiny bit into Gibbs Sampling. Remember that you have yet another homework due in week 10.

10th Week

We'll provide a bit of help for HW5 (which should be much easier than the last two), and talk a little bit about the Final.

About

Relevant files for my sections of Stat 102C at UCLA (Spring 2014)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages