توضیح 1
The live starter code is self-contained and uses only runner-compatible functions.
Loading
درس 9 از 22
Connect estimands, uncertainty, intervals, tests, regression, diagnostics, and causal restraint.
Motivation
Models connect observed data to uncertain quantities, but only when the estimand, sample, assumptions, and evaluation design stay visible.
Why this matters
Connect estimands, uncertainty, intervals, tests, regression, diagnostics, and causal restraint.
Packages and data
Base stats; bootstrap simulation.
توضیح 1
The live starter code is self-contained and uses only runner-compatible functions.
توضیح 2
Book-only outputs are labelled when the separate source dataset or advanced package was not supplied.
توضیح 3
R code, paths, function names, and formulas remain left-to-right in every locale.
اصطلاحات
The population quantity a study seeks.
Population mean inflation
Estimated sampling variability of an estimator.
Not the sample standard deviation
Observed minus fitted value.
Inspect over time for dependence
نمادگذاری و فرمولها
Yi = beta0 + beta1 Xi + error_i
The slope describes conditional association under the model; it does not establish intervention causality.
مثال حلشده
سناریو
How is an outcome associated with a predictor in a small controlled example?
بررسی با R
x <- c(0,1,2,3,4,5,6,7)
y <- c(1.2,1.5,2.1,2.4,3.0,3.4,3.8,4.2)
fit <- lm(y ~ x)
print(coef(fit))
print(summary(fit)$r.squared)
plot(x,y); abline(fit,col='#08747D')Within this constructed sample, higher x is associated with higher y. Limitation: A strong fit in constructed data is not causal evidence and does not guarantee performance on new observations.
Visual
Constructed paired values rise together.
ارتباط با R
Run the self-contained starter code in the protected STATLAB R runner. The code prints an auditable result and avoids network or unrestricted file access.
Live R Lab
Run a self-contained example, verify its output, and explain one limitation for statistical foundations and linear regression.
Ready to run
Common mistake
Statistical significance is not practical importance; a nonsignificant estimate is not proof of no effect.
STATLAB Tip
Interpret with units and scope, then inspect residuals over fitted values and time.
تمرین هدایتشده
سناریو
Fit a quadratic term, compare residual plots, and explain why a larger R-squared alone is insufficient.
Compare your result with the definition, units, and model assumptions—not only with a target number.
Exercises
Complete these without looking at the selected solutions. More than one defensible program may exist.
توضیح 1
Calculate a coefficient confidence interval.
توضیح 2
Bootstrap the mean with a fixed seed.
توضیح 3
Explain why random time-series splits leak information.
Selected solutions
These are compact solution routes. Confirm dimensions, units, and any changed modelling choices.
توضیح 1
confint(fit)
توضیح 2
set.seed(9); replicate(1000, mean(sample(y, replace=TRUE)))
توضیح 3
Neighbouring future observations can enter training and make forecast accuracy optimistic.
Chapter summary
Connect estimands, uncertainty, intervals, tests, regression, diagnostics, and causal restraint.
توضیح 1
Estimands differ from estimates.
توضیح 2
Intervals and p-values depend on sampling assumptions.
توضیح 3
Regression slopes are conditional associations.
توضیح 4
Diagnostics and honest evaluation matter.
اصطلاحات
fit regression
Use in Statistical Foundations and Linear Regression.
coefficients
Use in Statistical Foundations and Linear Regression.
intervals
Use in Statistical Foundations and Linear Regression.
model errors
Use in Statistical Foundations and Linear Regression.
References and provenance
Safavi (2026), Chapter 9. Student notes: Mohammad Safavi, Ph.D., STATLAB Academy, Version 1.0.
منبع
The authoritative 125-page English PDF accompanies this native lesson.
دریافتبازاندیشی
Name the assumption, evidence you would seek, and how the recommendation might change.
ارزیابی پایانی