Here is the summary of my linear model:
Call:
lm(formula = weight ~ height, data = height and weight)
Residuals:
Min 1Q Median 3Q Max
-10.267 -4.267 -1.267 6.455 11.538
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 20.4878 5.8335 3.512 0.00158 **
height 0.3195 0.1447 2.208 0.03596 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 6.703 on 27 degrees of freedom
Multiple R-squared: 0.1529, Adjusted R-squared: 0.1215
F-statistic: 4.873 on 1 and 27 DF, p-value: 0.03596
And here is my confidence interval for $\hat{\beta}_1$: 0.02260012 0.61639988 at $5\%$ level.
As you can see $0 \notin $CI at $5\%$ level. Also, the $p$-value for the test $H_0: \beta_1=0$ turns out to be $0.03596 $ which is in between $0.01 <0.03596 < 0.05$.
How do I interpret this?
The p-value < 0.05 should mean that there is moderate evidence against the null hypothesis $H_0: \beta_1=0$, also, $0$ is not in CI. So should I reject the fact that $\beta_1=0$ or should I say the evidence is not strong enough?
Furthermore, what would happen if in the same situation, I would get $0 \in CI$ but still $p-$value <0.05?
What about $p-$value >0.05 but $0\in CI$?
1) Interpretation: The probability of making a mistake in rejecting $H_0$ is $0.03596$.
2) Your hypothetical scenarios are impossible as for confidence level of $95\%$, p.value$<0.05$ iff $0 \notin CI $.
Let $T$ be a random variable that follows the Student's $T$ distribution with $n$ df, then by definition, $$ p.v = P(T> |T_{stat}(\hat{\beta})|) = 1- P(T\le |T_{stat}(\hat{\beta})|), $$ i.e., $$ 1-p.v = P(T\le |T_{stat}(\hat{\beta})|) = P( - |T_{stat}(\hat{\beta})| \le T\le |T_{stat}(\hat{\beta})|). $$ Thus, $(1-p.v)100\%$ CI of the studentized $\beta$ is $$ ( -| T_{stat}(\hat{\beta})| , |T_{stat}(\hat{\beta})|). $$