{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0bad5c38",
   "metadata": {},
   "source": [
    "# Chapter Exercise\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8df6c5e0",
   "metadata": {},
   "source": [
    "Apply the key ideas from this chapter in the connected task below. Work in your own notebook or local project. Keep your implementation, reasoning, and verification results together.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3e30fb67",
   "metadata": {},
   "source": [
    "## Fit and diagnose a regression\n",
    "\n",
    "1. Use a real chapter dataset to inspect a scatterplot, calculate correlation, and fit a least-squares regression line in original units.\n",
    "\n",
    "2. Compute fitted values and residuals, verify one prediction by hand, and inspect residual plots for curvature and uneven spread.\n",
    "\n",
    "3. Bootstrap the slope using the chapter procedure and interpret its interval with the diagnostics. Distinguish association, prediction, slope uncertainty, and a causal claim, and avoid extrapolation beyond the supported range.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "04ab75e0",
   "metadata": {},
   "source": [
    "Return to the chapter lessons as needed: [Correlation](1201-correlation.ipynb), [Regression Line](1202-regression-line.ipynb), [Least Squares](1203-least-squares.ipynb), [Visual Diagnostics](1204-visual-diag-residual.ipynb), [Inference for the Slope](1205-slope-inference.ipynb).\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
