BasicProbability / LectureNotes

Lecture Notes (with exercises) for Basic Probability course at University of Amsterdam
18 stars 12 forks source link

Gaussian Distribution #24

Open philschulz opened 8 years ago

philschulz commented 8 years ago

Hey Christian,

I pushed a folder called multivariateGaussian into the branch philip_edits. It is only the univariate part that's relevant for our course (I will appreciate feedback on the multivariate part, though). My main question would be whether it's understandable and whether I should add the Gaussian integral. Right now I didn't (just provided a link) because I thought it might be too much for the students.

Please write any comments into the Rnw files which I use to generate the tex files. Rnw allows me to have R code inside the document (just look at the plots at the end and you will appreciate this).

philschulz commented 8 years ago

Actually, you can even compile the Rnw yourself. You only need to have R installed. Then use Rscript -e "knitr::knit2pdf('multivariateGaussian.Rnw')"

The result is a .tex file that you can compile as usual.

cschaffner commented 8 years ago

➜ multivariateGaussian git:(philip_edits) ✗ Rscript -e "knitr::knit2pdf('multivariateGaussian.Rnw')" Error in loadNamespace(name) : there is no package called ‘knitr’ Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted

I guess I need to install the R package, how do I do that?

philschulz commented 8 years ago

You need to open up R in sudo mode and then type install.packages("knitr, dependencies=T)

It will ask you to select a mirror. After that, everything should happen automatically. You can check whether the installation succeeded by typing library(knitr)

If you don't get any complaints, everything is fine.

philschulz commented 8 years ago

Sorry, I forgot some quotes there. It should be install.packages("knitr", dependencies=T)

cschaffner commented 8 years ago

Thanks! I had to do install.packages("mvtnorm", dependencies=T) as well, but now it seems to work

cschaffner commented 8 years ago

I've read through this part and put the comments in .Rnw, and I also understood what it means now