Hi all, I will appreciate your statistical advise on how to compare a slope extracted from my data set, therefore with 95% CI, is it different or equal to a theoretical value (i.e 0.75)? Huge thanks!
Wilhem suggest the easy answer for your question, but if you want to know about the methods so many notes and journals are available in net. please do a web search. The link given below may be helpful.....
Wilhem suggest the easy answer for your question, but if you want to know about the methods so many notes and journals are available in net. please do a web search. The link given below may be helpful.....
consider your predictor values are in column A and the response values are in column B. You can get all statistics about the linear regression with the function LINEST. Select the range D1:D5, enter the formula =LINEST(B:B;A:A;1;1) and then press Ctrl+Shift+Enter (to tell Excel that you enered a so-called "matrix formula").
The estimated slope is now in D1, its standard error is in D2, the degrees of freedom for a confidence intervals or hypothesis tests is in E4.
The estimate divided by its standard error gives the t-value. Under H0, the t value ist expected to have a t-distribution, so the function T.DIST.2T can be used to get the corresponding p-value for a two-sided test. Usually, as Jeffrey pointed out, this test assumes H0:slope=0. If you assume another H0, say slope=A, then the value of A must simply be subtracted from the estimate.
So consider your H0 value for the slope is given in D7. Then you can calculate in D8 the t value by =(D1-D7)/D2. The corresponding p-value can be calculated in D9 by =T.DIST.2T(ABS(D8);E4). This is it.
PS: this is just one (to my knowledge quite simple) way to do this in Excel. There are 1001 more possible ways to come to the same results.
PPS: I do not recommend to use Excel for scientific data analysis / statistics! At best, it's an emergency solution.
PPPS: sure, the same calculations can be done in R using the results from lm. There is no need for an add-on package:
> m m$coefficients[2] summary(m)$coef[2,4]
(y: numeric response vector, x: numeric predictor vector, 0.75: H0 for the slope. The final value printed is the p-value for the slope being different to the H0 value)
Actually it is easy with any package that gives the coefficient and their s.e., simply take the difference between the coefficient and the test value, then divide by the s.e. and look up the p-value as for a t-value.
None of thes answers given will tell you if your slope is "EQUAL" to .75. The confidence interval will give you bounds for range of values where your slope lies with 95% confidence...for example between .72 and .78. This is not the same thing as concluding your estimate of the slope is equal to .75. As mentioned by Wilhelm, if your CI does not include .75 (for example .78 - .82), then you may conclude that it is DIFFERENT from the theroetical value.
@Susan, the "usual" understanding of a confidence interval is not as you stated a range of values where the (true, population) slope is likely to be. Philosophically it is ensures that statistically 95% of such intervals constructed this way will include the true slope. In this frequentistic interpretation (that is closely linked to the hypothesis tests) you do not get a hint about the correctnes of *this* particular conclusion (i.e., whether or not 0.75 is the "true" slop). If this particular interval does not include 0.75, then it may be one of the 95% of intervals correcly not-including 0.75 or one of the 5% of intervals falsely not-including 0.75. This is used to decide to assume that the true slope is not 0.75. Anyway, you still don't know anything about this particular result. All you can say is that 95% of intervals constructed this way *will* include the true slopes, 5% won't. You deal with a single, unique interval, but you draw a *statistic* conclusion. You mentioned a kind of a Bayesian interpretation. Starting with a flat prior, the 95% confidence interval is similar to the 95% credible interval. Philosophically this tells you a range of plausible/likely/expected values of the true slope, given this particular, unique set of data.