# Why such a big difference in t values calculated using 2 different formulae?

I'm new here, please bare with me.

Now I was calculating the t-value to get the probability and check the significance of the slope of a regression equation.

I don't have a stat calculator (I can't afford it :|), so I calculate all my values manually. Why I'm stressing on this is because I'm completely dependent on formulae, so it's important for me to know the significance and use of each of them and I don't have a teacher, so please help me here even if it seems at a very basic level. At the very end, I'm putting the exact question, and also my work on it.

First off, I had calculated the correlation coefficient: -0.976, pretty close to the actual one: -0.9725. Then, I calculated the residuals to get the standard error(se).

Now, obviously as I calculated r, I already had the standard deviation (s) of all the x-values. Then I used this formula to calculate t: se/s ~ 0.627. Also, I'm not making any mistake with residuals which could lead to a wrong standard error, and my plot matches the actual plot.

Then there is another formula too to calculate t: [r×(n-1)^1/2]/(1-r^2)^1/2 This one:

https://www.google.com/imgres?imgurl=https%3A%2F%2Ffabian-kostadinov.github.io%2Fpublic%2Fimg%2F20141030-t-value-formula.png&imgrefurl=https%3A%2F%2Ffabian-kostadinov.github.io%2F2014%2F10%2F30%2Fsignificance-testing-of-pearson-correlations-in-excel%2F&tbnid=itx1YFtYVB3x-M&vet=1&docid=cwoBHvM6mSgZBM&w=326&h=230&hl=en-GB&source=sh%2Fx%2Fim

Now, when I use this formula, I get t= -13.5, close to the actual one: -12.5. The difference here doesn't matter as probability already becomes very small to make any difference.

But my question is: Why such a big difference in t-value? I've calculated t using the standard error formula many times before and I've never faced any problem. I mean, at the end of the day, we're calculating t, using 2 different paths, so the answers should still be same or at least close. Please help me with this.

Question: Data:

| x | y |

|----|----|

|6.25|45.5|

|5.33|51.4|

|2.16|80.0|

|1.85|84.4|

|1.85|85.1|

|4.69|61.5|

|2.66|69.0|

|1.77|82.6|

|3.58|68.3|

|1.29|80.4|

|1.29|83.4|

I've labelled the page numbers.

Actual residual plot for comparison: https://imgur.com/gallery/K1E1W2z

• Sorry everyone, the table's not showing correctly, although it was when I was writing the question. But, I hope you understand it. Apr 16 at 14:17

## 1 Answer

The difference between the two t values calculated with the second formula (-13.5 vs. - 12.5) stem from the difference in the estimates for r (-0.9725 vs. -0.976). I presume that's just due to rounding values in the hand calculation.

With the first formula, there may be some error or confusion. Are you trying to use the formula that would be employed for linear regression: b/se(b) ? In this case, b = -7.8638, and you are correct that se = 0.627, yielding the correct t value = -12.53.

BTW, you can conduct or verify any of these calculations in R without installing the software, for example, at https://rdrr.io/snippets/ . The following can be run there.

Data = read.table(header=TRUE, text="
x   y
6.25 45.5
5.33 51.4
2.16 80.0
1.85 84.4
1.85 85.1
4.69 61.5
2.66 69.0
1.77 82.6
3.58 68.3
1.29 80.4
1.29 83.4
")

cor.test(~ x + y, data=Data)

tValue2 = -0.9725126*sqrt(11-2)/sqrt(1-(-0.9725126)^2)
tValue2

model = lm(y ~ x, data=Data)
summary(model)

tValue1 = -7.8638/0.6276
tValue1

# # #