11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.4. ADDING A PREDICTOR 105Here’s how it works, in the simplest case of only one predictor variable. We’ll wait untilthe next chapter to confront more than one predictor. Recall the basic Gaussian model:h i ∼ Normal(µ, σ)[likelihood]µ ∼ Normal(156, 10) [µ prior]σ ∼ Uniform(0, 50)[σ prior]Now how do we get weight into a Gaussian model of height? Let x be the mathematical namefor the column of weight measurements, d2$weight. Now we have a predictor variable x,which is a list of measures of the same length as h. We’d like to say how knowing the valuesin x can help us describe or predict the values in h. To get weight into the model in thisway, we define the mean µ as a function of the values in x. is is what it looks like, withexplanation to follow:h i ∼ Normal(µ i , σ)[likelihood]µ i = α + βx i [linear model]α ∼ Normal(156, 100)β ∼ Normal(0, 10)σ ∼ Uniform(0, 50)[α prior][β prior][σ prior]Again, I’ve labeled each line on the righthand side, by the type of definition it encodes. We’lldiscuss them in turns.4.4.1.1. Likelihood. To decode all of this, let’s begin with just the likelihood, the first lineof the model. is is nearly identical to before, except now there is a little index i on the µ, aswell as the h. is is necessary now, because the mean µ now depends upon unique predictorvalues on each row i. So the little i on µ i indicates that the mean depends upon the row.4.4.1.2. Linear model. e mean µ is no longer a parameter to be estimated. Rather, asseen in the second line of the model, µ i is constructed from other parameters, α and β, andthe predictor variable x. is line is not a stochastic relationship—there is no ∼ in it, butrather an = in it—because the definition of µ i is deterministic, not probabilistic. at is tosay that, once we know α and β and x i , we also know µ i .e value x i is just the weight value on row i. It refers to the same individual as theheight value, h i , on the same row. e parameters α and β are more mysterious. Where didthey come from? We made them up. e parameters µ and σ are necessary and sufficient todescribe a Gaussian distribution. But α and β are instead devices we invent for manipulatingµ, allowing it vary systematically across cases in the data.You’ll be making up all manner of parameters as your skills improve. One way to understandthese made-up parameters is the think of them as targets of learning. Each parameteris something that must be described in the posterior density. So when you want to knowsomething about the data, you ask your golem by inventing a parameter for it. is willmake more and more sense as you progress. Here’s how it works in this context. e secondline of the model definition is just:µ i = α + βx iWhat this tells the regression golem is that you are asking two questions about the mean ofthe outcome.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!