From e53c35223bed9a32f1e9cd3fe75caf344d4b5c7e Mon Sep 17 00:00:00 2001
From: Christian Kolset <christian.kolset@gmail.com>
Date: Thu, 24 Apr 2025 17:37:21 -0600
Subject: Updated tex files

---
 book/module4/linear_regression.tex | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 book/module4/linear_regression.tex

(limited to 'book/module4/linear_regression.tex')

diff --git a/book/module4/linear_regression.tex b/book/module4/linear_regression.tex
new file mode 100644
index 0000000..5cd81db
--- /dev/null
+++ b/book/module4/linear_regression.tex
@@ -0,0 +1,22 @@
+\section{Linear Regression}\label{linear-regression}
+
+\subsection{Statical tools}\label{statical-tools}
+
+Numpy comes with some useful statistical tools that we can use to
+analyze our data.
+
+\subsubsection{Mean}\label{mean}
+
+The mean is the average of a set of numbers. It is calculated by summing
+all the numbers and dividing by the count of numbers.
+
+\begin{Shaded}
+\begin{Highlighting}[]
+\ImportTok{import}\NormalTok{ numpy }\ImportTok{as}\NormalTok{ np}
+
+\NormalTok{mean }\OperatorTok{=}\NormalTok{ np.mean([}\DecValTok{1}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{3}\NormalTok{, }\DecValTok{4}\NormalTok{, }\DecValTok{5}\NormalTok{])}
+\NormalTok{median }\OperatorTok{=}\NormalTok{ np.median([}\DecValTok{1}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{3}\NormalTok{, }\DecValTok{4}\NormalTok{, }\DecValTok{5}\NormalTok{])}
+\NormalTok{std }\OperatorTok{=}\NormalTok{ np.std([}\DecValTok{1}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{3}\NormalTok{, }\DecValTok{4}\NormalTok{, }\DecValTok{5}\NormalTok{])}
+\NormalTok{variance }\OperatorTok{=}\NormalTok{ np.var([}\DecValTok{1}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{3}\NormalTok{, }\DecValTok{4}\NormalTok{, }\DecValTok{5}\NormalTok{])}
+\end{Highlighting}
+\end{Shaded}
-- 
cgit v1.2.3

