## Thursday, August 28, 2008

### How Much Day-to-Day Variation Should We Expect in the Gallup Poll?

Here's something that might help you to understand what Brad DeLong is talking about when he discusses the expected variation in the daily Gallup poll results (he follows up here). I'll just do one or two of the calculations to show how it's done, it's easy to take it from there.

Let the poll result at time t be Pt. Brad has noted this has a standard deviation of 1.67 percent. Note this implies the variance of the daily poll is is var(Pt) = σ2 = (1.67%)2 =  (.0167)2 = .000277.

1. First, where does the 1.67 percent figure come from?

To get this number, remember that the variance of P can be calculated as:

Var(P) = E(P2)-[E(P)]2

we know that E(P) = 1/2 from the assumption Brad made, so this is

Var(x) = E(P2)-[1/2]2 = E(P2)-1/4

What is E(P2)? It is (see, e.g. here, though you have to divide the value they give by n2 since this is the proportion, i.e. the sum divided by n, rather than the sum itself):

[E(P)]2 = (1/n)*[pr(npr - pr + 1)] where the sample size is n=900 and the probability of P occurring is pr=1/2 in this example. Then

Var(P) = E(P2)-[1/2]2 = [(1/n)*[pr(npr - pr + 1)]] -1/4

or, plugging in,

Var(x)  = [(1/900)*[.5(900*.5 - .5 + 1)]] -1/4 = (225.25/900) - 1/4

Var(x) = .250277778 - .25

Var(x) = .0002777778.

Take the square root of the variance to get the standard error:

sqrt(.0002777778) = .01666667.

Thus, the standard deviation is 1.67%

2. Next, how is the variance of the daily polls calculated?

The polls are reported as three day averages, so at time t Gallup reports:

Xt = (1/3)*(Pt + Pt-1 + Pt-2)

So the reported poll result is the simple average over a three day time period.

To calculate the variance of the daily poll:

Var(Xt ) = Var[(1/3)*(Pt + Pt-1 + Pt-2)]

Var(Xt ) = (1/9)*Var[Pt + Pt-1 +  Pt-2]

and with the assumption that the polls each day are independent, the cross-product terms (covariances) vanish, so this becomes (with an assumption of homoskedasticity, or equal variances at each point in time):

Var(Xt ) = (1/9)*[Var(Pt) + Var(Pt-1) +  Var(Pt-2)]

Var(Xt ) = (1/9)*[σ2 + σ2 + σ2] = (1/9)*[3σ2 ] = (1/3)σ2

where var(Pt) = σ2 = (.0167)2 = .0002778.

3. How much day-to-day variation should we expect in the Gallup poll?

Now, Brad is looking at the variance in the difference in poll results day-to-day. The question is how much day-to-day variation should we expect in the Gallup poll? By calculating the variance of the difference in the averages on consecutive days, we can answer that question.

Xt - Xt-1 = [(1/3)*(Pt + Pt-1 + Pt-2)] - [(1/3)*(Pt-1 + Pt-2 + Pt-3)]

Canceling terms leaves:

Xt - Xt-1 = [(1/3)*(Pt - Pt-3)]

Now calculate the variance:

Var[Xt - Xt-1] = Var[(1/3)*(Pt - Pt-3)] = (1/9)*[Var(Pt) + Var(Pt-3)]

Therefore,

Var[Xt - Xt-1] = (1/9)*[σ2 + σ2] = (2/9)σ2.

(for a two day difference, Xt - Xt-2, something else Brad talks about, it comes out (4/92, for three days it's (6/9)σ2, and so on).

Let's apply this. Plugging in the value for the variance Brad uses:

Var[Xt - Xt-1] = (2/9)*(.000278) = .0000617.

Take the square root to get the standard deviation:

sqrt{Var[(Xt - Xt-1)]} = .007857 = .7857%.

This is the .79 percent value Brad uses when he says:

(1) The standard deviation of the difference between today's sample and the sample of three days ago should be 2.35%--meaning that the daily change in the moving average has a standard deviation of 0.79%. only a one-day change in the moving average of 2% is interesting--smaller changes are likely to be statistical noise from a hypothesis-testing point of view.

Posted by on Thursday, August 28, 2008 at 05:31 PM in Economics, Politics | Permalink  TrackBack (0)  Comments (2) You can follow this conversation by subscribing to the comment feed for this post.