Home > MCMC > Cell phone story

## Cell phone story

I’m interested in learning about the pattern of text message use for my college son.  I pay the monthly cell phone bill and I want to be pretty sure that he won’t exceed his monthly allowance of 5000 messages.

We’ll put this problem in the context of a normal distribution inference problem.  Suppose $y$, the number of daily text messages (received and sent) is normal with mean $\mu$ and standard deviation $\sigma$.  We’ll observe $y_1, ..., y_{13}$, the number of text messages in the first 13 days in the billing month.  I’m interested in the predictive probability that the total of the count of text message in the next 17 days exceeds 5000.

We’ll talk about this problem in three steps.

1. First I talk about some prior beliefs about $(\mu, \sigma)$ that we’ll model by independent conjugate priors.
2.  I’ll discuss the use of Gibbs sampling to simulate from the posterior distribution.
3. Last, we’ll use the output of the Gibbs sampler to get a prediction interval for the sum of text messages in the next 17 days.
Here we talk about prior beliefs.  To be honest, I didn’t think too long about my beliefs about my son’s text message usage, but here is what I have.
1. First I assume that my prior beliefs about the mean $\mu$ and standard deviation $\sigma$ of the population of text messages are independent.  This seems reasonable, especially since it is easier to think about each parameter separately.
2. I’ll use conjugate priors to model beliefs about each parameter.  I believe my son makes, on average, 40 messages per day but I could easily be off by 15.  So I let $\mu \sim N(40, 15)$.
3. It is harder to think about my beliefs about the standard deviation $\sigma$ of the text message population.   After some thought, I decide that my prior mean and standard deviation of $\sigma$ are 5 and 2, respectively.  We’ll see shortly that it is convenient to model the precision $P = 1/\sigma^2$ by a $gamma(a, b)$ distribution.  It turns out that $P \sim gamma(3, 60)$ is a reasonable match to my prior information about $\sigma$.
In the next blog posting, I’ll illustrate writing a R script to implement the Gibbs sampling.
Advertisements
Categories: MCMC
1. No comments yet.
1. No trackbacks yet.