1201 search results for "latex"

Bank of England Fan Charts in R

April 24, 2013
By

I managed to catch David Spiegelhalter’s Tails You Win on BBC iplayer last week. I missed it the first time round, only for my parents on my last visit home to tell me about a Statistician jumping out of a … Continue reading →

The Golden Section Search Method: Modifying the Bisection Method with the Golden Ratio for Numerical Optimization

Introduction The first algorithm that I learned for root-finding in my undergraduate numerical analysis class (MACM 316 at Simon Fraser University) was the bisection method.  It’s very intuitive and easy to implement in any programming language (I was using MATLAB at the time).  The bisection method can be easily adapted for optimizing 1-dimensional functions with

In three months, I’ll be in Vegas (trying to win against the house)

April 20, 2013
By

In fact, I’m going there with my family and some friends, including two probabilists (I mean professionals, I am merely an amateur), with this incredible challenge: will I be able to convince  probabilists to go to play at the Casino? Actually, I also want to study them carefully, to understand how we should play optimally. For example, I hope...

Le Monde puzzle [#817]

April 18, 2013
By

The weekly Le Monde puzzle is (again) a permutation problem that can be rephrased as follows: Find where denotes the set of permutations on {0,…,10} and is defined modulo 11 . Same question for and for This is rather straightforward to code if one adopts a brute-force approach:: (where I

Math symbols in R charts: a cheat sheet

April 15, 2013
By

If you're creating a scientific graphic in the R language, there's a good chance you'll be wanting to include some mathematical symbols somewhere on the chart. You might want to use a symbol like μ as an axis label, annotate a curve with simple math like x2, or even put a complete equation like: in the title. You can...

Simulating the Gambler’s Ruin

April 14, 2013
By

The gambler’s ruin problem is one where a player has a probability p of winning  and probability q of losing. For example let’s take a skill game where the player x can beat player y with probability 0.6 by getting closer to target. The game play begins with player x being allotted 5 points and player y allotted 10

Checking the Goodness of Fit of the Poisson Distribution in R for Alpha Decay by Americium-241

Introduction Today, I will discuss the alpha decay of americium-241 and use R to model the number of emissions from a real data set with the Poisson distribution.  I was especially intrigued in learning about the use of Am-241 in smoke detectors, and I will elaborate on this clever application.  I will then use the Pearson chi-squared

knitr documents with tikzDevice graphics

April 13, 2013
By

Setting up tikzDevice output in knitr may be a frustrating task, but gives outstandingly aesthetic, LaTeX-like figures. Here are my global knitr settings for typesetting documents in Polish (in UTF-8, make sure your R also runs in a Unicode locale…Read more ›

Configure Kile for knitr under GNU/Linux

April 13, 2013
By

Kile – a convenient LaTeX editor – may also be used to prepare knitr-generated reports. Here is how we may make our work much more efficient with a convenient compile-on-keypress feature. Create a bash script in your home directory, named…Read more ›

Travis CI for R! (not yet)

April 12, 2013
By

A few days ago I wrote about Travis CI, and was wondering if we could integrate the testing of R packages into this wonderful platform. A reader (Vincent Arel-Bundock) pointed out in the comments that Travis was running Ubuntu that allows you to install software packages at your will. I took a look at the documentation, and realized...