
WnioskowanieStatystyczne/Interpretacja współczynnika korelacji: Różnice pomiędzy wersjami
| (Nie pokazano 10 pośrednich wersji utworzonych przez tego samego użytkownika) | |||
| Linia 44: | Linia 44: | ||
Rozważmy stosunek wariancji tłumaczonej przez model do całkowitej wariancji | Rozważmy stosunek wariancji tłumaczonej przez model do całkowitej wariancji | ||
<center> | <center> | ||
| − | :<math>\dfrac{\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}} | + | :<math> |
| + | S^2 = | ||
| + | \dfrac{\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}} | ||
{\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | ||
</math> | </math> | ||
</center> | </center> | ||
| + | podstawiając <math>y_i^p = a + b x_i</math> dostajemy | ||
| − | + | :<math> S^2 = | |
| − | + | \dfrac{\underset{i=1}{\overset{N}{\sum }}(a + b x_i-\overline{y})^{2}} | |
| − | + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | |
| − | \underset{i=1}{\overset{N}{\sum }}( | ||
| − | |||
</math> | </math> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | Ponieważ <math>\overline{y} = a + b \overline{x}</math>, czyli <math>a=\overline{y}-b\overline{x}</math>, | |
| − | |||
| − | = b | ||
| − | </math> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | :<math> S^2 = | |
| − | + | \dfrac{\underset{i=1}{\overset{N}{\sum }}(\overline{y}-b\overline{x} + b x_i-\overline{y})^{2}} | |
| − | \overline{ | + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} |
| − | )^ | + | = |
| − | \underset{i=1}{\overset{N}{\sum }}( | + | \dfrac{\underset{i=1}{\overset{N}{\sum }}b^2(x_i-\overline{x})^2} |
| + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | ||
| + | = | ||
| + | b^2\dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} | ||
| + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | ||
</math> | </math> | ||
| − | |||
| − | <math> | + | Skoro prosta <math>y= a + b x</math> została dopasowana metodą największej wiarygodności, to <math> |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | b | ||
| − | </math>, | ||
| − | <math> | ||
b=\frac{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- | b=\frac{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- | ||
\overline{y})}{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}} | \overline{y})}{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}} | ||
| − | </math> | + | </math>, czyli |
| − | |||
| − | :<math>\ | + | :<math> S^2 = |
| − | + | b^2 \,\,\, \dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} | |
| − | + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | |
| − | \underset{i=1}{\overset{N}{\sum }}( | + | = |
| − | + | \dfrac | |
| − | =\ | + | {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- |
| − | \underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}-\overline{y} | + | \overline{y})\right)^2} |
| − | )\right) ^ | + | {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}\right)^2} |
| − | )^{2}\right) ^ | + | \;\;\; |
| − | + | \dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} | |
| − | + | {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | |
| − | |||
| − | |||
| − | \overline{x})^ | ||
| − | |||
| − | |||
</math> | </math> | ||
| + | <math> | ||
| + | S^2 = | ||
| + | \dfrac | ||
| + | {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- | ||
| + | \overline{y})\right)^2} | ||
| + | {{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}} | ||
| + | \underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} | ||
| + | =\rho_{x,y}^2 | ||
| + | </math>, | ||
| + | czyli kwadrat [[WnioskowanieStatystyczne/Momenty#Kowariancja_i_wsp.C3.B3.C5.82czynnik_korelacji|współczynnika korelacji]]. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Aktualna wersja na dzień 09:37, 30 maj 2025
Wnioskowanie_Statystyczne_-_wykład
Interpretacja współczynnika korelacji
Rozważmy wariancję zmiennej [math]y[/math] z poprzedniego rozdziału. Niech [math]y_{i}^{p}=a+bx_{i}[/math]
[math] \underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2}= \underset{i=1}{\overset{N}{\sum }}(y_{i}-y_{i}^{p}+y_{i}^{p}-\overline{y} )^{2}= [/math] [math] \underset{i=1}{\overset{N}{\sum }}(y_{i}-y_{i}^{p})^{2}+\underset{i=1}{ \overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}+2\underset{i=1}{\overset{N}{ \sum }}(y_{i}-y_{i}^{p})(y_{i}^{p}-\overline{y}) [/math]
Całkowitą wariancję zmiennej [math]y[/math] można podzielić na dwa człony: wariancję estymaty [math]y_{i}^{p}[/math] wokół wartości średniej [math]\overline{y}[/math] i wariancję obserwowanych [math]y_{i}[/math] wokół estymaty [math]y_{i}^{p}[/math] (trzeci człon znika):
[math] \underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2}= \underset{i=1}{\overset{N}{\sum }}(y_{i}-y_{i}^{p})^{2}+\underset{i=1}{ \overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2} [/math]
Współczynnik korelacji liniowej (Pearsona)
Rozważmy stosunek wariancji tłumaczonej przez model do całkowitej wariancji
- [math] S^2 = \dfrac{\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} [/math]
podstawiając [math]y_i^p = a + b x_i[/math] dostajemy
- [math] S^2 = \dfrac{\underset{i=1}{\overset{N}{\sum }}(a + b x_i-\overline{y})^{2}} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} [/math]
Ponieważ [math]\overline{y} = a + b \overline{x}[/math], czyli [math]a=\overline{y}-b\overline{x}[/math],
- [math] S^2 = \dfrac{\underset{i=1}{\overset{N}{\sum }}(\overline{y}-b\overline{x} + b x_i-\overline{y})^{2}} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} = \dfrac{\underset{i=1}{\overset{N}{\sum }}b^2(x_i-\overline{x})^2} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} = b^2\dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} [/math]
Skoro prosta [math]y= a + b x[/math] została dopasowana metodą największej wiarygodności, to [math]
b=\frac{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}-
\overline{y})}{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}}
[/math], czyli
- [math] S^2 = b^2 \,\,\, \dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} = \dfrac {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- \overline{y})\right)^2} {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}\right)^2} \;\;\; \dfrac{\underset{i=1}{\overset{N}{\sum }}(x_i-\overline{x})^2} {\underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} [/math]
[math] S^2 = \dfrac {\left(\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}- \overline{y})\right)^2} {{\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}} \underset{i=1}{\overset{N}{\sum }}(y_i-\overline{y})^{2}} =\rho_{x,y}^2 [/math], czyli kwadrat współczynnika korelacji.
Ciekawe przykłady korelacji liniowych dla zależności nieliniowych podaje artykuł z Wikipedii
Istotność statystyczna współczynnika korelacji
...to osobny problem :-)
