# Nakafa Framework: LLM
URL: https://nakafa.com/en/subject/high-school/11/mathematics/statistics/linear-regression-concept
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/statistics/linear-regression-concept/en.mdx
Output docs content for large language models.
---
import { ScatterDiagram } from "@repo/design-system/components/contents/scatter-diagram";
export const metadata = {
  title: "Linear Regression Concept",
  description: "Learn linear regression to create best-fit lines through data points. Understand prediction, slope calculations, and how to model variable relationships.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "04/30/2025",
  subject: "Statistics",
};
## What Is Linear Regression?
With [Scatter Diagrams](/subject/high-school/11/mathematics/statistics/scatter-diagram/en), we can see the relationship between two variables (X data and Y data).
Now, if the points on the scatter diagram seem to form a straight pattern (there's a linear correlation, whether positive or negative), we can try to draw a straight line that best fits through the middle of that cluster of points. This line is called the **Linear Regression Line**. The process of finding this line is called **Linear Regression**.
## The "Best-Fit" Line
The Linear Regression Line is often called the _best-fit_ line. Why? Because out of the many possible straight lines that could be drawn, this is the line whose position is "closest" to all the data points overall. This line attempts to summarize the trend or linear pattern present in the data.
## Example of a Regression Line
Let's say we have data on study time (hours) and exam scores again. The points tend to rise (positive correlation).