Archive for LaTeX

stuck exchange

Posted in Books, Kids, Statistics with tags , , , , , , , on August 16, 2022 by xi'an

Made an attempt at explaining on X validated why simulating from the joint was equivalent to simulating from the marginal then from the conditional. Unfortunately failed as I could not fathom where the OP’s difficulty was. It seems it started at defining what drawing from a distribution meant… Then someone came by asking why I was writing the exponential in this unusual way (this was a barred E for expectation) and whether or not the “thin hollow rectangle” (a barred I for indicator) was standing for identity, that is

\mathbb E\quad\text{and}\quad \mathbb I

Reaching a point of incomprehension from which I could not recover…

page overflow

Posted in Books, Kids, Statistics with tags , , , , , , , on March 17, 2021 by xi'an

wrong algebra for slice sampler

Posted in Books, Kids, R, Statistics with tags , , , , , , , , , , , , on January 27, 2021 by xi'an

Once more, and thrice alas!, I became aware of a typo in our “Use R!” book through a question on X validated from a reader unable to reproduce the slice of a basic 2D slice sampler for a logistic regression with coefficients (a,b). Indeed, our slice reads as the incorrect set (missing the i=1,…,n)

\left\{ (a,b): y_i(a+bx_i) > \log \frac{u_i}{1-u_i} \right\}

when it should have been

\bigcap_{i=1} \left\{ (a,b)\,:\ (-1)^{y_i}(a+bx_i) > \log\frac{u_i}{1-u_i} \right\}

which is the version I found in my LaTeX file. So I do not know what happened (unless I corrected the LaTeX file at a later date and cannot remember it, but the latest chance on the file reads October 2011…). Fortunately, the resulting slices in a and b and the following R code remain correct. Unfortunately, both French and Japanese translations reproduce the mistake…

on-line course

Posted in Kids, pictures, Statistics, University life with tags , , , , , , , , , , , on September 4, 2020 by xi'an

Since this teaching semester is 100% on-line in Paris Dauphine for the third year students, I started last Monday to teach my statistical modelling course from my office on my computer. Using a Teams connection with the 180⁺ students,  sharing my slides or my webcam with them, and writing on a Huion drawing tablet to write on the pdf slides (or on Teams whiteboard). I found the most convenient way to write on the slides was via Xournalpp. From my end of the exchange, the class went on rather smoothly, with students interacting about the practical and contents of the course. As I have also recorded my lectures (in August), and hope the students to first go through the recordings, I will see next time how much effort they have put into assimilating the material, as the on-line class will mostly concentrate on questions and applications. I also hope to have a quick multiple choice question at the end (or beginning?) of each class, but am still fishing for an interface that would (a) handle LaTeX or MathJax (b) shuffle questions from a pool of questions so that each student gets a different question (or thinks so) and (c) store the outcome of the test. Any suggestion welcome!

sans sérif & sans chevron

Posted in Books, R, Statistics, University life with tags , , , , , , , , , , , , on June 17, 2020 by xi'an
{\sf df=function(x)2*pi*x-4*(x>1)*acos(1/(x+(1-x)*(x<1)))}

As I was LaTeXing a remote exam for next week, including some R code questions, I came across the apparent impossibility to use < and > symbols in the sans-sérif “\sf” font… Which is a surprise, given the ubiquity of the symbols in R and my LaTeXing books over the years. Must have always used “\tt” and “\verb” then! On the side, I tried to work with the automultiplechoice LaTeX package [which should be renamed velomultiplechoice!] of Alexis Bienvenüe, which proved a bit of a challenge as the downloadable version contained a flawed file of automultiplechoice.sty! Still managed to produce a 400 question exam with random permutations of questions and potential answers. But not looking forward the 4 or 5 hours of delivering the test on Zoom…

%d bloggers like this: