WnioskowanieStatystyczne/Interpretacja współczynnika korelacji: Różnice pomiędzy wersjami
(Utworzono nową stronę "==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> \under...") |
|||
(Nie pokazano 10 pośrednich wersji utworzonych przez tego samego użytkownika) | |||
Linia 1: | Linia 1: | ||
+ | [[Wnioskowanie_Statystyczne_-_wykład]] | ||
+ | |||
+ | |||
+ | |||
==Interpretacja współczynnika korelacji== | ==Interpretacja współczynnika korelacji== | ||
Rozważmy wariancję zmiennej <math>y</math> z poprzedniego | Rozważmy wariancję zmiennej <math>y</math> z poprzedniego | ||
rozdziału. Niech <math>y_{i}^{p}=a+bx_{i}</math> | rozdziału. Niech <math>y_{i}^{p}=a+bx_{i}</math> | ||
+ | |||
+ | [[Plik:Wsp kor war.png|500px]] | ||
+ | |||
<math> | <math> | ||
Linia 21: | Linia 28: | ||
[https://en.wikipedia.org/wiki/Explained_sum_of_squares#Simple_derivation znika]). | [https://en.wikipedia.org/wiki/Explained_sum_of_squares#Simple_derivation znika]). | ||
− | '''Współczynnik korelacji''' | + | '''Współczynnik korelacji liniowej (Pearsona)''' |
+ | |||
+ | przypominamy wyprowadzone w poprzednim rozdziale zależności: | ||
<math> | <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}}, | ||
+ | \qquad a=\overline{y}-b\overline{x} | ||
+ | </math> | ||
+ | |||
+ | oraz estymator współczynnika korelacji liniowej | ||
+ | |||
+ | <math> | ||
+ | r_{x, y}= \frac{\sigma_{x, y}}{\sigma_x \sigma_y}= | ||
\frac{E\left( \left(x-\mu_{x})(y-\mu_{y}\right)\right)} | \frac{E\left( \left(x-\mu_{x})(y-\mu_{y}\right)\right)} | ||
{\sqrt{E\left( (x-\mu_{x})^2\right) E\left( (y-\mu_{y})^2\right)}}, | {\sqrt{E\left( (x-\mu_{x})^2\right) E\left( (y-\mu_{y})^2\right)}}, | ||
Linia 33: | Linia 50: | ||
<math> | <math> | ||
− | + | r^{2}=\frac{\left( \underset{i=1}{\overset{N}{\sum }}(x_{i}- | |
\overline{x})(y_{i}-\overline{y})\right) ^{2}}{\underset{i=1}{\overset{N}{ | \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}- | \sum }}(x_{i}-\overline{x})^{2}\underset{i=1}{\overset{N}{\sum }}(y_{i}- | ||
Linia 40: | Linia 57: | ||
− | + | Ponieważ | |
+ | <math> | ||
+ | \forall_i (y_i - \overline{y}) = | ||
+ | b (x_i - \overline{x} ) | ||
+ | </math>, | ||
+ | |||
+ | |||
+ | <math> | ||
+ | \underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}= | ||
+ | \underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}= | ||
+ | </math> | ||
<math> | <math> | ||
− | + | =\frac{\left( | |
− | |||
\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})(y_{i}-\overline{y} | \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} | )\right) ^{2}}{\left( \underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x} | ||
)^{2}\right) ^{2}}\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x} | )^{2}\right) ^{2}}\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x} | ||
− | )^{2}= | + | )^{2}= |
</math> | </math> | ||
<math> | <math> | ||
− | + | =\frac{\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}- | )(y_{i}-\overline{y})\right) ^{2}}{\underset{i=1}{\overset{N}{\sum }}(x_{i}- | ||
\overline{x})^{2}}\frac{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y} | \overline{x})^{2}}\frac{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y} | ||
− | )^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2}}= | + | )^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2}}=r^{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> | ||
Linia 62: | Linia 88: | ||
<math> | <math> | ||
− | { | + | {r^{2}=\frac{\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}- |
\overline{y})^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2} | \overline{y})^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2} | ||
}\ } | }\ } | ||
</math> | </math> | ||
+ | |||
przykłady interpretacji podaje też [https://en.wikipedia.org/wiki/Correlation_and_dependence artykuł z Wikipedii] | przykłady interpretacji podaje też [https://en.wikipedia.org/wiki/Correlation_and_dependence artykuł z Wikipedii] |
Wersja z 06:44, 20 maj 2022
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ą wariancię zmiennej [math]y[/math] podzieliliśmy 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).
Współczynnik korelacji liniowej (Pearsona)
przypominamy wyprowadzone w poprzednim rozdziale zależności:
[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}},
\qquad a=\overline{y}-b\overline{x}
[/math]
oraz estymator współczynnika korelacji liniowej
[math] r_{x, y}= \frac{\sigma_{x, y}}{\sigma_x \sigma_y}= \frac{E\left( \left(x-\mu_{x})(y-\mu_{y}\right)\right)} {\sqrt{E\left( (x-\mu_{x})^2\right) E\left( (y-\mu_{y})^2\right)}}, [/math]
jego kwadrat estymujemy jako
[math] r^{2}=\frac{\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}} [/math]
Ponieważ
[math]
\forall_i (y_i - \overline{y}) =
b (x_i - \overline{x} )
[/math],
[math]
\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}-\overline{y})^{2}=
\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x})^{2}=
[/math]
[math] =\frac{\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}}\underset{i=1}{\overset{N}{\sum }}(x_{i}-\overline{x} )^{2}= [/math]
[math] =\frac{\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}}\frac{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y} )^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2}}=r^{2} \underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2} [/math]
czyli
[math] {r^{2}=\frac{\underset{i=1}{\overset{N}{\sum }}(y_{i}^{p}- \overline{y})^{2}}{\underset{i=1}{\overset{N}{\sum }}(y_{i}-\overline{y})^{2} }\ } [/math]
przykłady interpretacji podaje też artykuł z Wikipedii