Skip to content

Commit

Permalink
Regressione
Browse files Browse the repository at this point in the history
  • Loading branch information
etabeta1 committed Oct 28, 2023
1 parent 3c0a724 commit 34ce24a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Misure/formulario.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,22 @@ $$
x_{mp} = \frac{x_1 \cdot \frac{1}{u^2(x_1)} + x_2 \cdot \frac{1}{u^2(x_2)} + \dots}{\frac{1}{u^2(x_1)} + \frac{1}{u^2(x_2)}} + \dots \\
u(x_{mp}) = \sqrt{\frac{1}{\frac{1}{u^2(x_1)}+\frac{1}{u^2(x_2)} + \dots}}
$$

## Regressione lineare

Data una serie di coppie $(x_i, y_i)$ è possibile calcolarne la regressione lineare (nella forma $y = mx + q$) con le seguenti formule.

$$
m = \frac{n\sum[x_i y_i] - \sum x_i \sum y_i}{n \sum x_i^2 - (\sum x_i)^2} \\
q = \frac{\sum x_i^2 \sum y_i - \sum x_i \sum x_i y_i}{n \sum x_i^2 - (\sum x_i)^2} = \frac{\sum y_i - m \sum x_i}{n} = \overline y - m \overline x
$$

La formula per la soglia si può derivare dalla formula della regressione una volta che si conoscono $m$ e $q$:

$$
\begin{cases}
y = mx + q \\
y = 0
\end{cases} \implies x = -\frac{q}{m}
$$

0 comments on commit 34ce24a

Please sign in to comment.