Confidence interval

L

Lance

Hi all,
I am trying to get the confidence interval for data in a given time. I
tried to write up a macro which does this by defining the t-function
etc. But the macro seems very very slow, due to the large amount of
data. Is there any other way to get the confidence interval of a data set??.

Thanks in advance,
-Lance
 
M

Michel Walsh

Hi,


the critical value t[a/2] from the t-distribution value is supplied, I
assumed, as parameter.

Once given, the confidence interval on, say, b0 in

y = b0 + b1 * x

is +/- k0 (ie, the real b0 is between b0[estimated] - k and
b0[estimated] +k )

with k0 = t[a/2] * standardError[estimated] * ( 1/COUNT(*) + AVG(X)^2 /
SUM((x-AVG(X))^2) ) ^0.5


and b1 confidence interval:

k1 = t[a/2] * standardError[estimated] / SUM((x-AVG(x))^2) ^ 0.5



Computing those values should not be much more than computing the standard
deviation, but you can expand the ( x - AVG(x) ) ^2 = x^2 -2*x*AVG(x)
+ AVG(x) ^2 so that the SUM can then recuperate SUM(x^2) already computed
for the standard error, and thus, the extra time required for these
computations becomes negligible.

I used formula from CRC Standard Mathematical Tables and Formulae, 30th
edition, section 7.10.1


Hoping it may help
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top