statistics and applied probability

national university of singapore

Month: March 2010

Chinese text in R graphs

Here’s the problem I was having: I use the English-language localisation of R, but for a couple of plots needed to include some Chinese text as well.  I didn’t want to have to mess around with image editors, but wanted to output the graph as a pdf.

A call for help from my Sinophonic colleagues led to David C sending this:

pdf(“chinese.pdf”, width = 10, height = 7)
grid.text(“華語”, y=7/8, gp=gpar(fontfamily=”CNS1″))
grid.text( “is ‘chinese’ in (Traditional) Chinese”, y=6/8)
grid.text(“华语”, y=5/8, gp=gpar(fontfamily=”GB1″))
grid.text(“is ‘chinese’ in (Simplified) Chinese”, y=4/8)
Seems you can either put the characters directly in or use unicode (e.g. the similar example from Murrel & Ripley, 2006, Non-Standard Fonts in PostScript and PDF Graphics.  R News 6:41–6):
grid.text(“\u4F60\u597D”, y=2/3, gp=gpar(fontfamily=”CNS1″))
Note that if the reader doesn’t have this font installed on his/her computer, they’ll not see aught.  Seems this should be addressable by embedding the font in the file, but I can’t work out how to do this as something isn’t installed that should be on my computer.  :o(  Anyway, the graph comes out nice on my computer at least.

Infectious disease talks today

Not stats, but for those of us interested in ID:

  • Ian Lubek is speaking on Challenges For Public Health Researchers:  Insights From A Cambodian Community Health Intervention On Turning Data Into Practice And Advocacy Into Policy at EPH, MD3, #02-01, 12 to 1.
  • Wong Mee Lian is speaking on HIV risks, condom use and health-seeking behaviour among indirect sex workers based in non-brothel entertainment establishments in Singapore at CDC, Blk 804, TTSH, Moulmein Rd, 5.30 to 6.30.

Should be good!

Peter Donnelly shows how stats fool juries

Some classical counter-intuitive examples from probability theory, presented by Peter Donnelly from Oxford University.

Six double yolked eggs? How unlikely is that?

On the 2nd of February, The Daily Mail ran a story on Fiona Exon, a Cumbrian woman who cracked open a half-dozen eggs to find, not one, but every single egg had two yolks!  (In the UK, eggs are sold in multiples of 6, unlike in Singapore.)  This was very exciting, and the Mail calculated the odds of this happening to be 0.001 to the power of 6, or one trillion (although my calculator says differently).

But the next day they’d changed their tune, after realising that the eggs in the box were not independent.  David Spiegelhalter had this to say:

Acknowledgement of parameter and structural uncertainty has become common in climate and other models. But there is a further level of uncertainty: of unforeseen surprises, Black Swans and Rumsfeldian unknown unknowns. There should always be a suspicion that there’s more going on than we can express in mathematics. Indeed, at Waitrose I bought a box marked “double-yolked eggs” for £2.49 [about S$5, i.e. quite a bit more than Chew’s]. Certainly not a one-in-a-trillion chance: double-yolked eggs can be common and can be detected, selected and packed at will.

masterfully moving from eggs to science as a whole.

Praise to statistics!

Louis wrote

During a cultural performance at the opening ceremony of the 57th ISI Session at Durban, South Africa, there was a recitation of a poem which contained the following phrases.   Praise to Statistics! Praise to Statistics. Nowadays if you don’t count, you don’t count.

Von Bing sent a link to a short clip:

Funny!  But not as funny as an old lady hitting a car.

Statistics: a dream job?

So a year and a bit ago, Val Harian, chief economist at Google, hails statistics as a dream job of the next decade. Here’s what he has to say:

Skip to toolbar