{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5f5b22fd",
   "metadata": {},
   "source": [
    "# Regression\n",
    "\n",
    "This chapter introduces prediction with relationships between numeric variables. You will study correlation, regression lines, least squares, and residual diagnostics.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30c9ace7",
   "metadata": {},
   "source": [
    "<h2>Chapter Video</h2>\n",
    "\n",
    "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube-nocookie.com/embed/WWqE7YHR4Jc\" title=\"Regression: Crash Course Statistics #32\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen referrerpolicy=\"strict-origin-when-cross-origin\"></iframe>\n",
    "\n",
    "<div class=\"video-credit\">\n",
    "<p><strong>Video credit:</strong> CrashCourse. (2018, October 3). <em>Regression: Crash Course Statistics #32</em>. YouTube. <a href=\"https://youtube.com/watch?v=WWqE7YHR4Jc\">Watch on YouTube</a>.</p>\n",
    "<p class=\"video-rights\">This embedded video is provided for educational reference only. All rights are retained by the respective copyright holder.</p>\n",
    "</div>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eae4c360",
   "source": "```{contents}\n:local:\n:depth: 2\n```",
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "id": "eddfd494",
   "metadata": {},
   "source": [
    "<h2>Learning Objectives</h2>\n",
    "\n",
    "By the end of this chapter, you will be able to:\n",
    "\n",
    "1. Describe linear association with scatter plots and correlation.\n",
    "2. Use a regression line to make numeric predictions.\n",
    "3. Explain least squares as a method for choosing a fitted line.\n",
    "4. Use residual plots to diagnose patterns that a line misses.\n",
    "5. Communicate prediction limits and uncertainty in applied settings.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9be901dc",
   "metadata": {},
   "source": [
    "<h2>Chapter Flow</h2>\n",
    "\n",
    "```{div} chapter-flow\n",
    "{doc}`Correlation <1201-correlation>`\n",
    "\n",
    "{doc}`Regression Line <1202-regression-line>`\n",
    "\n",
    "{doc}`Least Squares <1203-least-squares>`\n",
    "\n",
    "{doc}`Visual Diagnostics <1204-visual-diag-residual>`\n",
    "```\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "52dd539e",
   "metadata": {},
   "source": [
    "<h2>Glossary</h2>\n",
    "\n",
    "| # | Term | Explanation |\n",
    "|---:|---|---|\n",
    "| 1 | Regression | A method for modeling or predicting an outcome from one or more features. |\n",
    "| 2 | Prediction | An estimate of an outcome for a new or existing case. |\n",
    "| 3 | Feature | An input variable used to predict an outcome. |\n",
    "| 4 | Target | The outcome variable being predicted. |\n",
    "| 5 | Scatter plot | A plot showing paired numeric values. |\n",
    "| 6 | Association | A relationship or pattern between variables. |\n",
    "| 7 | Correlation | A standardized measure of linear association. |\n",
    "| 8 | Regression line | A straight line used to predict an outcome from a feature. |\n",
    "| 9 | Slope | The predicted change in the outcome for a one-unit change in the feature. |\n",
    "| 10 | Intercept | The predicted outcome when the feature is zero. |\n",
    "| 11 | Fitted value | The model prediction for an observed case. |\n",
    "| 12 | Residual | The observed value minus the fitted value. |\n",
    "| 13 | Least squares | A method that chooses the line with the smallest sum of squared residuals. |\n",
    "| 14 | Residual plot | A plot of residuals used to check model patterns. |\n",
    "| 15 | Standard units | Values expressed in standard deviations from the mean. |\n",
    "| 16 | Root mean squared error | A typical prediction error measured in outcome units. |\n",
    "| 17 | Linearity | The assumption that a straight line captures the main trend. |\n",
    "| 18 | Extrapolation | Prediction outside the range of observed data. |\n",
    "| 19 | Influential point | An observation that strongly affects a fitted model. |\n",
    "| 20 | Diagnostics | Checks used to evaluate how well a model fits. |\n",
    "| 21 | Overfitting | Fitting noise instead of a durable pattern. |\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "15115d21",
   "metadata": {},
   "source": [
    "<h2><a href=\"overview.html\" target=\"_blank\" rel=\"noopener noreferrer\">Chapter Overview Slides</a></h2>\n"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "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.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
