Archive for solution manual

out of desperation

Posted in Books, Kids, Statistics, University life with tags , , , on November 9, 2018 by xi'an

Someone desperately seeking solutions to the even numbered questions of Introducing Monte Carlo Methods with R…. How odd!

solution manual for Bayesian Essentials with R

Posted in Books, Kids, Statistics, University life with tags , , , , , , on March 18, 2015 by xi'an

The solution manual to our Bayesian Essentials with R has just been arXived. If I link this completion with the publication date of the book itself, it sure took an unreasonable time to come out and sadly with no obvious reason or even less justification for the delay… Given the large overlap with the solution manual of the previous edition, Bayesian Core, this version should have been completed much much earlier but, paradoxically if in-line with the lengthy completion of the book istelf, this previous manual is one of the causes for the delay, as we thought the overlap allowed for self-study readers to check some of the exercises. Prodded by Hannah Bracken from Springer-Verlag, and unable to hire an assistant towards this task, I eventually decided to spend the few days required to clean up this solution manual, with the unintentional help from my sorry excuse for an Internet provider who accidentally cutting my home connection for a whole week so far…!

solmanIn the course of writing solutions, I stumbled upon one inexplicably worded exercise about the Lemer-Schur algorithm for testing stationarity, exercise that I had to rewrite from scratch. Apologies to any reader of Bayesian Essentials with R getting stuck on that exercise!!!

Joining R-bloggers

Posted in Books, R, Statistics with tags , , , on February 19, 2010 by xi'an

Upon request by the blog administrator, Tal Galili, I have joined R-bloggers, which aggregate blog entries about R into a central place. I feel I have much more to learn than to teach about R (as can be seen from earlier comments on my R programs in Introducing Monte Carlo Methods with R). As I was tagging some of my older posts with the newly created R category, I realised most tags were either about typos or books! Anyway, I figure joining a conglomerate of blogs cannot hurt!

Springer solution manuals on line

Posted in Books, R, Statistics with tags , , , on February 17, 2010 by xi'an

Springer Verlag has just posted on its webpage both the student and the instructor solution manuals to “Introducing Monte Carlo Methods with R”. Yes, both! Before you rush there, the Catch-22 in this announcement is that the access to the instructor version is restricted to registered instructors. So, if you are registered as an instructor with Springer Verlag, you are welcome to it. If not and you think you should be registered, feel free to contact Springer Verlag. Else, enjoy the student odd-numbered exercise version.

Andrew’s criticisms

Posted in Books, Statistics with tags , , , , , , , , on January 23, 2010 by xi'an

Andrew Gelman has just written a most entertaining review of “Introducing Monte Carlo Methods with R” on his blog. The first sentence is ominous as the book seemingly reminded him of communists and fascists…! The explanation for this frightening debut is that the connection between the components of statistics

… ↔ Probability theory ↔ Theoretical statistics↔Statistical methodology ↔ Applications ↔ Computation ↔ Probability theory ↔ …

may be seen as a torus just as the range of political ideologies, the argument being that both George and I switched from proving mathematical minimaxity theorems about James-Stein estimators to proving convergence theorems. about Metropolis-Hastings algorithms. After pondering Andrew’s lines for a while, I am far from sure this is a positive assessment of Introducing Monte Carlo Methods with R! Indeed, at the first glance, it may give the blog reader the feeling that this is yet another theoretical book about Monte Carlo methods, written by theorists and mainly for theorists (Andrew wrote “applied researchers such as myself will get much more use out of theory as applied to computation“)… While we strive to distance ourselves from making a baby version of Monte Carlo Statistical Method, choosing the format of a Use R! book to clarify even further the purpose of the book: to lead (our students and) our readers to understand Monte Carlo methods through worked-out examples to the point of developping their own methods, while keeping the theory at bay.

A second read shows that Andrew’s point is much more subtle, namely that as (formerly?) mathematical statisticians, we have adopted a terse style that (maybe unconsciously) shy way from giving too much detail and explanations: once a definition is provided, it should suffice to itself! This leads to what Andrew calls little puzzles, where the reader needs to stop and reason out why things are as they are. (“I noticed a bunch of other examples of this sort, where the narrative just flows by and, as a reader, you have to stop and grab it. Lots of fun.”)  I noticed the same reactions from my students, so I quite agree with this point. When learning with a book, you need to sit with a piece of paper on one side (if the margins are too narrow), your computer on the other side and test everything for yourself. This is actually an intended feature, if not spelled out more clearly, and I thus appreciate very much Andrew’s conclusion that “it would also be an excellent book for a course on statistical computing“!

There is also Andrew’s comment that the book is ugly, which stings, but again can be seen in a different light.I obviously do not find Introducing Monte Carlo Methods with R ugly but the printing could have been indeed nicer and the fact that the printers used the jpeg versions of the figures instead of the postscript or pdf versions did not help. The raw R output presented verbatim in most pages is not particularly beautiful either, but this is truly intended, for readers who cannot test the code immediately (as when reading in the metro or listening to the course at the same time). The R programs are far from perfect R programs, but examples of what a “standard” beginner would do. I also agree with the suggestion of an epilogue: we wrote several times during the course of the book that we were not providing the big picture and that many aspects of the Monte Carlo methodology were not covered, but this would be worth repeating at the end, along with the few general recommendations we can make about better R programming. Another thing to add in the next edition!

A final interesting remark is that the very first comment on Andrew’s post was about solutions! This is a strong request from readers. nowadays, and thus seems like a compulsory element of publishing books with exercises. (As we discovered a wee too late for Bayesian Core!)

Solution manual for Introducing Monte Carlo Methods with R

Posted in Books, R, Statistics with tags , , on January 19, 2010 by xi'an

After the complete solution manual for Bayesian Core, the solution manual for the odd numbered exercises of “Introducing Monte Carlo Methods with R” is now arXived. The fuller 133 page version for instructors is available from Springer Verlag by demand only, in order to keep the appeal of the book as a textbook (even though this is open to debate). Since the LaTeX code is available from the arXiv deposit, it can also be used and modified freely. (It may be argued that publishing a solution manual on arXiv is somehow borderline, because, while it is hopefully useful to readers and original, it does not truly qualify as research. And won’t be published anywhere else. I agree with this perspective but the final decision was up to the administrators of the site who did not object. So I do not complain!)

The warnings associated with publishing the complete solution manual for Bayesian Core, are worth repeating with this solution manual for “Introducing Monte Carlo Methods with R”, namely that “some self-study readers will undoubtedly come to the realisation that the solutions provided here are too sketchy for them because the way we wrote those solutions assumes some minimal familiarity with the maths, with the probability theory and with the statistics behind the arguments. There is unfortunately a limit to the time and to the efforts we can dedicate to this solution manual“, which is about a week for both manuals. As of earlier, comments and suggestions are welcome.

LaTeX surprises

Posted in Books, University life with tags , , , , , on January 18, 2010 by xi'an

When compiling the solution manual to “Introducing Monte Carlo Methods with R” into a version with only the odd-numbered exercises, I used a \relax{…} command to comment out the even-numbered solutions. This produced a strange bug when applied to a paragraph that included the lines

> system.time({for (t in 1:100) y=rmnorm(n=1,var=Sigma)})
user  system elapsed
 0.028   0.000   0.028

as somehow the curly bracket } in the group of commands was understood as the end of the \relax command. It took me a while to spot the reason for this bug as I implicitely assumed that anything within the verbatim environment was not understood as a LaTeX command. But the bug was also helpful in pointing out an extra curly bracket } in an R code provided as a solution (within the verbatim environment). While switching between the long and the short versions of the solution manual to “Introducing Monte Carlo Methods with R”, I also found a point I had been seeking for a while, namely that

\subsection{Exercise \ref{exo:helpme}} 
Test the \verb+help+ command on the functions \verb+seq+, 
\verb+sample+, and \verb+order+.

works out nicely to comment out whole paragraphs once the verbatim package is included. However, if I try to shorten the syntax by defining


I get a compilation error

Runaway argument?! 
File ended while scanning use of \next.
<inserted text>

Strange, isn’t it?!