t-test

Problem

Consider the Crime data at http://www.oswego.edu/~kane/econometrics/data.htm . Run a regression with y = crime, x2 = pov, x3 = metro, x4 = popdens. \(α=0.05\) .

  1. Find the critical t-value for \(H_0: β_2=0\) . Hint: @qtdist(p,v)
  2. Confirm that you reach the same conclusion for the hypothesis comparing the t-value and the critical t-value as you get from the \(p\) -value.
  3. Calculate the \(p\) -value by hand. Hint: eq01.@tstats(2) and @ctdist(x,v)
  4. Find the critical value for \(H_0: β_2<0\) and test the hypothesis.

Solution

  1. qtdist is the inverse cdf function. This is a two-sided test with 2.5% in each tail and 97.5% to the left of the critical value. The degrees of freedom is n-k = 51-4 = 47. So @qtdist(0.975,47)=2.01.
  2. p-value is 0.0229 so reject H0. t-value is 2.35 > 2.01 so reject H0
  3. .@tstats(2) will give you the second t-value, the ne for pov, 2.35. @ctdist(x,v) is the cdf function. You get one tail from 1 - @ctdist(eq01.@tstats(2),47) and the p-value by doubling this. We can double check that this is correct. If we use \(α=0.0229\) we should be indifferent between reject and not, that is, the t-value should be equal to the critical one. The critical t-value with \(α=0.0229\) is @qtdist(1-alpha/2,47) and this comes out to be 2.35 as expected.
  4. Now we have only one tail so @qtdist(0.95,47)=1.68. 2.35 > 1.68 so reject H0