2
$\begingroup$

I have just run a lm in R and here is the output:

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.182e+01  1.558e+01  -0.759   0.4482    
ht           1.978e-01  1.909e-01   1.036   0.3003    
educ         5.893e-02  7.564e-03   7.791 1.37e-14 ***
age          4.022e-03  2.361e-03   1.704   0.0887 .  
Hb           5.329e-02  1.845e-01   0.289   0.7728    
I(Hb^2)      2.048e-04  6.624e-03   0.031   0.9753    
I(ht^2)     -5.409e-04  5.883e-04  -0.919   0.3581 

Can someone please explain to me why for this line:

I(Hb^2)      2.048e-04  6.624e-03   0.031   0.9753  

I have a t value of 0.031 and this corresponds to a P value of 0.97? A t value this small is close to 0 meaning that I would expect for it to have a probability P('less than' t) close to 50%, maybe 52%? I have made an awful drawing of my understanding here:

enter image description here

I think my flawed understanding has something to do with the fact that R's output gives P(>|t|)?

$\endgroup$
  • $\begingroup$ Perhaps it might help to edit your question to say what you think the $p$-value should be especially if you do not understand @peterflom's answer. $\endgroup$ – mdewey Oct 21 '18 at 16:12
  • $\begingroup$ good suggestion, thank you and I have made this edit. $\endgroup$ – tbrick Oct 21 '18 at 16:14
  • $\begingroup$ Hint: graph the interval (on the horizontal axis) corresponding to points whose sizes (absolute values) exceed 0.031. As a check, obviously this interval will not include 0, which rules out your graphic. $\endgroup$ – whuber Oct 21 '18 at 20:31
9
$\begingroup$

One thing you might be missing is that R performs a two-tailed t-test - the probability of a test statistic whose value is more extreme than the observed value, i.e. whose absolute value is $\geq$ the (absolute value of the) observed value.

The open space in the middle of this curve is the region with $-0.031 < t < 0.031$; the pink and blue areas, which add up to 0.9753, is the region with $|t|>0.031$.

enter image description here

png("tcurve.png")
tx <- seq(from=0.031,to=3.5,length=51)
par(yaxs="i")
curve(dt(x,df=10),from=-3.5,to=3.5,axes=FALSE,ylab="")
axis(side=1)
box(bty="l")
tvals <- dt(tx,df=10)
polygon(c(tx,rev(tx)),c(tvals,rep(0,length(tx))),col="pink")
polygon(c(rev(-tx),-tx),c(rev(tvals),rep(0,length(tx))),col="lightblue")
dev.off()
$\endgroup$
0
$\begingroup$

That line makes perfect sense. A t value close to 0 corresponds to a high (that is very nonsignificant) p value.

$\endgroup$
  • $\begingroup$ Thanks for your answer, please see the edits I have made to my question for what I expected the p value should be. $\endgroup$ – tbrick Oct 21 '18 at 16:14
  • $\begingroup$ Sorry, but your edit doesn't help. PR (>T) describes what a p value is. What the 0.97 says is that, if the null hypothesis is true, it is still very likely to get a p value this far or farther from 0. When T = 0.00, the p would be 1.00 (approx). When t is far from 0, p will be small. $\endgroup$ – Peter Flom - Reinstate Monica Oct 21 '18 at 16:23
  • $\begingroup$ Sorry, my edit didnt make any sense because stackexchange hid all my text behind my < sign. Not sure why it did this and I have replaced < with 'less than'. I've also added a terrible drawing for why I think the P value should be ~52%. I didnt actually run this t test but thought it should be something a little larger than 50%. $\endgroup$ – tbrick Oct 21 '18 at 18:29
  • 1
    $\begingroup$ Nope, close to 1. That's because it is two sided, as is indicated by the absolute value sign around the t. $\endgroup$ – Peter Flom - Reinstate Monica Oct 22 '18 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.