Back to General discussions forum
Hi experts,
I just tried with the following formula
and got the answer K = 1.52864823681 and B = 108.2096433 for test data wfich is wrong. I just manually calculated in
Excel prior to coading. Can someone explain the issue here please?
Hi Sam,
Difficult to say what exactly is wrong without any further details. What values do you get for the numerator and denominator in the first equation?
This is the data set I used to calculate.
input data:
1925 1947
1925: 89 257
1926: 75 226
1927: 83 235
1928: 52 173
1929: 148 332
1930: 109 268
1931: 129 306
1932: 115 289
1933: 102 265
1934: 99 269
1935: 50 228
1936: 102 265
1937: 91 256
1938: 79 238
1939: 118 298
1940: 134 311
1941: 61 155
1942: 146 340
1943: 108 274
1944: 96 242
1945: 89 232
1946: 143 328
1947: 133 303
answer: 1.54053779316 107.312854273
Thanks mate
Hi Sam,
I understand what the input data set is, and my calculations produce 1.54053779316
and 107.312854273
just as expected.
As you get different values, you need to share a bit more detail.
More specifically, what values do you get for the following sums: sum(x_i)
, sum(y_i)
, sum(x_i*x_i)
, sum(x_i*y_i)
?
I suspect that you have somewhere a small calculation mistake, and this partial results will allow us to zoom in.
Sorry for the confusion, that was my bad. I have used n = 21 instead 23. Now all good.
Thanks for your time mate.
sum(xi) : 2351
sum(yi) : 6090
sum(xi*yi) : 14317590
sum(xi*xi) : 258277
sum(xi) * sum(xi): 5527201
1.5405377931602005 107.31285427305951 23
Cheers, Sam