Tutorials › Econometrics (Graduate) › Sample IV In The Just-Identified Case

Instrumental Variables Foundations · Tutorial 171 of 952

Sample IV In The Just-Identified Case

Learn to derive and calculate the just-identified IV slope and intercept from sample moments, and distinguish the sample calculation from the assumptions needed for a population interpretation.

Intermediate 10 min read

What You'll Learn

  • State the structural equation and the population moment and relevance conditions for just-identified IV.
  • Derive the sample covariance-ratio slope by solving the two sample moment equations with an intercept.
  • Calculate the slope and intercept from a small dataset using centered sums.
  • Check whether the sample denominator permits calculation of the estimator.
  • Explain why a computed IV estimate does not by itself establish instrument validity or a causal effect.

From the Population IV Ratio to a Sample Estimate

The just-identified IV ratio gives a population relationship: under suitable moment and relevance conditions, the structural slope is the ratio of the covariance of the instrument with the outcome to its covariance with the endogenous regressor. In an empirical dataset, those population covariances are unknown. The sample IV estimator replaces them with centered sample cross-products. With an intercept, the centering is essential: the slope must account for the sample means of the instrument, regressor, and outcome.

This tutorial derives that estimator directly from its sample moment equations and works through three hypothetical datasets. The algebra is simple, but it is important to distinguish two questions: whether the sample formula can be calculated, and whether the instrument conditions justify interpreting the result as an estimate of a structural parameter.

Model and conditions: For observations \(i=1,\ldots,n\), consider the structural equation \(Y_i=\beta_0+\beta_1X_i+U_i\), where \(Y_i\) is the outcome, \(X_i\) is one potentially endogenous regressor, and \(Z_i\) is one instrument. The population moment conditions are \(E[U_i]=0\) and \(E[Z_iU_i]=0\). The population relevance condition is \(\operatorname{Cov}(Z_i,X_i)\ne 0\), with the required moments finite. The first moment supports the intercept; the second expresses instrument exogeneity in moment form; relevance allows the slope to be identified.

The just-identified setting has one endogenous regressor and one excluded instrument, in addition to the intercept. “Just-identified” means that the number of instrumental moment conditions matches the number of structural coefficients to determine: the intercept and slope are pinned down by the intercept moment and the instrument moment. A sample estimate is obtained by imposing their sample analogues.

Deriving the Sample Covariance-Ratio Estimator

Write \(\hat\beta_0^{IV}\) and \(\hat\beta_1^{IV}\) for the sample IV intercept and slope. The sample moment equations set the sample averages of the structural residual and of the instrument multiplied by that residual equal to zero. These are estimating equations, not a claim that each observation’s residual is zero.

$$ \frac{1}{n}\sum_{i=1}^n \left(Y_i-\hat\beta_0^{IV}-\hat\beta_1^{IV}X_i\right)=0, \qquad \frac{1}{n}\sum_{i=1}^n Z_i\left(Y_i-\hat\beta_0^{IV}-\hat\beta_1^{IV}X_i\right)=0. $$

The first equation immediately determines the intercept for any proposed slope. Define the sample means \(\bar Y=n^{-1}\sum_iY_i\) and \(\bar X=n^{-1}\sum_iX_i\). Then \(\hat\beta_0^{IV}=\bar Y-\hat\beta_1^{IV}\bar X\). Substituting this expression into the second moment gives a single equation for the slope:

$$ \begin{aligned} 0 &=\sum_{i=1}^n Z_i \left(Y_i-\bar Y+\hat\beta_1^{IV}\bar X-\hat\beta_1^{IV}X_i\right)\\ &=\sum_{i=1}^n Z_i(Y_i-\bar Y) -\hat\beta_1^{IV}\sum_{i=1}^n Z_i(X_i-\bar X). \end{aligned} $$

Because the centered outcome and regressor deviations each sum to zero, multiplying them by \(Z_i\) gives the same total as multiplying them by \(Z_i-\bar Z\). Thus, if the sample cross-product in the denominator is nonzero, solving for the slope gives the sample covariance-ratio estimator.

Sample IV formula: In the just-identified model with an intercept, if \(\sum_{i=1}^n(Z_i-\bar Z)(X_i-\bar X)\ne 0\), then $$ \hat\beta_1^{IV} = \frac{\sum_{i=1}^n(Z_i-\bar Z)(Y_i-\bar Y)} {\sum_{i=1}^n(Z_i-\bar Z)(X_i-\bar X)}, \qquad \hat\beta_0^{IV} = \bar Y-\hat\beta_1^{IV}\bar X. $$ Equivalently, the slope is the sample covariance of \(Z\) and \(Y\) divided by the sample covariance of \(Z\) and \(X\), since the common covariance divisor cancels.

The derivation also identifies a sample-level requirement: the instrument must vary with \(X\) in this particular dataset. If the denominator is zero, the sample moment equations do not determine a unique slope by this ratio. This is distinct from population relevance. A nonzero population covariance does not guarantee a nonzero sample denominator in every finite dataset; conversely, a nonzero sample denominator does not prove that population relevance or exogeneity holds.

Worked Calculations

For each example, the observations are hypothetical. The calculations show what the sample formula returns; the numbers alone cannot establish that the instrument satisfies the population conditions.

Worked Example: Computing Both Coefficients From Four Observations

Suppose a hypothetical dataset records the following values. Calculate the just-identified sample IV slope and intercept.

ObservationInstrument \(Z_i\)Regressor \(X_i\)Outcome \(Y_i\)
1012
2123
3225
4346

The sample means are \(\bar Z=1.5\), \(\bar X=9/4=2.25\), and \(\bar Y=4\). The centered cross-product for the numerator is

$$ \sum_{i=1}^4(Z_i-\bar Z)(Y_i-\bar Y) =(-1.5)(-2)+(-0.5)(-1)+(0.5)(1)+(1.5)(2)=7. $$

The denominator is

$$ \sum_{i=1}^4(Z_i-\bar Z)(X_i-\bar X) =(-1.5)(-1.25)+(-0.5)(-0.25)+(0.5)(-0.25)+(1.5)(1.75)=4.5. $$

Therefore,

$$ \hat\beta_1^{IV}=\frac{7}{4.5}=\frac{14}{9}\approx 1.556. $$

Use the exact slope when calculating the intercept: \(\hat\beta_0^{IV}=4-(14/9)(9/4)=4-3.5=0.5\). The fitted structural equation from this sample is \(\hat Y=0.5+1.556X\), with the slope rounded for display. The slope’s units are outcome units per regressor unit; the intercept is in outcome units.

Worked Example: Using Raw Sums to Obtain Centered Cross-Products

In another hypothetical dataset, the instrument values are \(1,2,4\), the regressor values are \(2,3,6\), and the outcomes are \(5,7,10\). Calculate the estimator using the identity \(\sum_i(Z_i-\bar Z)(X_i-\bar X)=\sum_iZ_iX_i-(\sum_iZ_i)(\sum_iX_i)/n\), and the corresponding identity for \(Y\).

Here \(\sum_iZ_i=7\), \(\sum_iX_i=11\), \(\sum_iY_i=22\), and \(n=3\). Also, \(\sum_iZ_iX_i=2+6+24=32\), while \(\sum_iZ_iY_i=5+14+40=59\). Thus the centered denominator and numerator are

$$ 32-\frac{(7)(11)}{3}=\frac{19}{3}, \qquad 59-\frac{(7)(22)}{3}=\frac{23}{3}. $$

The denominator is nonzero, so the sample slope is \(\hat\beta_1^{IV}=(23/3)/(19/3)=23/19\approx1.211\). Since \(\bar X=11/3\) and \(\bar Y=22/3\), calculate the intercept without first rounding the slope:

$$ \hat\beta_0^{IV} =\frac{22}{3}-\frac{23}{19}\frac{11}{3} =\frac{418-253}{57} =\frac{55}{19} \approx 2.895. $$

The raw-sum shortcut and the centered-deviation formula produce the same result. The exact fractions make the calculation transparent; using a rounded slope too early could change the displayed intercept in its last digits.

Worked Example: Keeping the Intercept Arithmetic Consistent

For a final hypothetical dataset, let \(Z=(0,1,2,3)\), \(X=(1,2,2,5)\), and \(Y=(2,3,5,8)\). The sample means are \(\bar Z=1.5\), \(\bar X=2.5\), and \(\bar Y=4.5\). The centered cross-products are

$$ \begin{aligned} \sum_i(Z_i-\bar Z)(X_i-\bar X) &=(-1.5)(-1.5)+(-0.5)(-0.5)+(0.5)(-0.5)+(1.5)(2.5)\\ &=2.25+0.25-0.25+3.75=6,\\ \sum_i(Z_i-\bar Z)(Y_i-\bar Y) &=(-1.5)(-2.5)+(-0.5)(-1.5)+(0.5)(0.5)+(1.5)(3.5)\\ &=3.75+0.75+0.25+5.25=10. \end{aligned} $$

Therefore \(\hat\beta_1^{IV}=10/6=5/3\approx1.667\). The intercept must be computed from the unrounded slope, or with its exact fraction:

$$ \hat\beta_0^{IV} =4.5-\left(\frac{5}{3}\right)(2.5) =\frac{9}{2}-\frac{25}{6} =\frac{1}{3} \approx 0.3333. $$

If the rounded display value \(1.667\) is used instead, the arithmetic is \(4.5-(1.667)(2.5)=0.3325\), not \(0.3333\). The difference is only from rounding the slope, but the calculation should not present an exact-looking intercept that does not follow from its displayed inputs. Reporting the exact calculation and then rounding the final coefficient avoids this inconsistency.

What the Sample Ratio Does—and Does Not—Establish

The estimator is a sample counterpart to the population IV ratio. To see the population connection, substitute the structural equation into the population moments. Under \(E[U]=0\) and \(E[ZU]=0\), the intercept moment gives \(E[Y]=\beta_0+\beta_1E[X]\). Subtracting this mean relation from the instrument moment yields \(\operatorname{Cov}(Z,Y)=\beta_1\operatorname{Cov}(Z,X)\). If \(\operatorname{Cov}(Z,X)\ne0\), then \(\beta_1=\operatorname{Cov}(Z,Y)/\operatorname{Cov}(Z,X)\). The sample formula replaces the population covariances with their sample versions.

This argument explains the formula but does not make the sample estimate automatically causal or unbiased. A causal interpretation requires a defensible structural model and instrument conditions; in particular, the instrument must be relevant and satisfy the exogeneity or exclusion requirement appropriate to the model. The sample calculations check only arithmetic features, such as whether the observed denominator is zero. They do not test or certify the exclusion restriction.

Likewise, a nonzero sample denominator is not by itself evidence of strong population relevance. If the denominator is small relative to the numerator, the ratio can be highly sensitive to changes in the observed data. This tutorial concerns how to calculate the estimator, not how to conduct inference or assess weak-instrument behavior.

Common Mistakes

  • Leaving out the intercept adjustment. Using \(\sum_iZ_iY_i/\sum_iZ_iX_i\) is generally not the just-identified estimator with an intercept. Center the variables, or use the raw-sum identities that subtract the products of sample means.
  • Using the wrong denominator. The slope denominator is the instrument-regressor cross-product, \(\sum_i(Z_i-\bar Z)(X_i-\bar X)\), not the instrument’s sum of squares.
  • Confusing sample variation with instrument validity. A nonzero sample denominator permits the ratio calculation; it does not establish population relevance, exogeneity, or a causal interpretation.
  • Rounding too early. A rounded slope may not reproduce the reported intercept exactly. Carry the exact fraction or more digits through \(\bar Y-\hat\beta_1^{IV}\bar X\), then round the final result.
  • Interpreting a coefficient without units or context. The slope is in outcome units per regressor unit. Its calculation alone does not show that changing the regressor causes the outcome to change.
Key takeaway: With one endogenous regressor, one instrument, and an intercept, the just-identified sample IV slope is the centered instrument-outcome cross-product divided by the centered instrument-regressor cross-product. The intercept is the sample outcome mean minus that slope times the sample regressor mean.

Check Your Understanding

Use the sample moment equations and keep exact values through the calculations where possible.

  1. In the structural model \(Y_i=\beta_0+\beta_1X_i+U_i\), what two population moment conditions and what relevance condition identify the just-identified IV coefficients?
  2. Explain why the sample slope formula uses centered cross-products when the structural equation includes an intercept.
  3. Suppose the sample denominator \(\sum_i(Z_i-\bar Z)(X_i-\bar X)\) is zero. What does this imply about calculating the slope from the two sample moment equations?
  4. For \(\bar Y=6\), \(\bar X=2\), and an exactly calculated IV slope of \(3/2\), calculate the intercept. Why could substituting a rounded slope produce a slightly different displayed result?
  5. Does a nonzero sample denominator establish that the instrument is valid for causal interpretation? Explain the distinction between the sample calculation and the population conditions.
Clinical Biostats