Python matplotlibを使って学ぶ統計処理 正規分布 新しいページはコチラ
提供: yonewiki
(→求めるべき係数の算出の前に〜確率密度関数から考える期待値・平均値と分散値について) |
(→求めるべき係数の算出の前に〜確率密度関数から考える期待値・平均値と分散値について) |
||
167行: | 167行: | ||
<ymath>$ (a - b)^2 = a^2 -2ab + b^2 $</ymath>のような計算を適用して展開すると | <ymath>$ (a - b)^2 = a^2 -2ab + b^2 $</ymath>のような計算を適用して展開すると | ||
<big><ymath>$$ = \textcolor{red}{\int x^2 \cdot f(x) \cdot dx} - \textcolor{blue}{\int 2\mu x \cdot f(x) \cdot dx} + \textcolor{green}{\int \mu^{2} \cdot f(x) \cdot dx} $$ </ymath> </big> | <big><ymath>$$ = \textcolor{red}{\int x^2 \cdot f(x) \cdot dx} - \textcolor{blue}{\int 2\mu x \cdot f(x) \cdot dx} + \textcolor{green}{\int \mu^{2} \cdot f(x) \cdot dx} $$ </ymath> </big> | ||
− | 上記のように整理できて1項<span style="color:red;"><span>(</span>赤<span>)</span></span>はデータを2乗した平均の形になっており、2項<span style="color:blue;"><span>(</span>青<span>)</span></span>は<ymath>$2\mu \times$</ymath>期待値の形、3項<span style="color:green;"><span>(</span>緑<span>)</span></span>は<ymath>$ \int f(x) \cdot dx = 1 $</ymath>という確率密度関数の定義に従って<ymath>$ \mu^2 \times 1 $</ymath>となります。従って、<ymath>$ = E[ ] $</ymath> | + | 上記のように整理できて1項<span style="color:red;"><span>(</span>赤<span>)</span></span>はデータを2乗した平均の形になっており、2項<span style="color:blue;"><span>(</span>青<span>)</span></span>は<ymath>$2\mu \times$</ymath>期待値の形、3項<span style="color:green;"><span>(</span>緑<span>)</span></span>は<ymath>$ \int f(x) \cdot dx = 1 $</ymath>という確率密度関数の定義に従って<ymath>$ \mu^2 \times 1 $</ymath>となります。従って、<ymath>$ = E[ ] $</ymath>のEはExpected Valueを意味するEで、大文字のEに[]の中にかかれたデータの平均という意味の記号を用いて表現していくと、 |
<big><ymath>$$ = E[\mathrm{X}^2] - 2\mu \times \mu + \mu^2 $$ </ymath> </big> | <big><ymath>$$ = E[\mathrm{X}^2] - 2\mu \times \mu + \mu^2 $$ </ymath> </big> | ||
となって、<ymath>$ 2\mu \times \mu = 2\mu^2 $</ymath>と整理して | となって、<ymath>$ 2\mu \times \mu = 2\mu^2 $</ymath>と整理して | ||
273行: | 273行: | ||
になります。なので、 | になります。なので、 | ||
<big><ymath>$$ E[\mathrm{X^2}] = \sigma^2 + 0 + \mu^2 $$</ymath></big> | <big><ymath>$$ E[\mathrm{X^2}] = \sigma^2 + 0 + \mu^2 $$</ymath></big> | ||
− | ですから、分散<ymath>$ V[X] = \textcolor{red}{ E[\mathrm{X^2}] } - \textcolor{blue}{ E[\mathrm{X}]^2 } $</ymath> | + | ですから、分散<ymath>$ V[X] = \textcolor{red}{ E[\mathrm{X^2}] } - \textcolor{blue}{ E[\mathrm{X}]^2 } $</ymath>VはVarianceのVで、これは |
<big><ymath>$$ V[X] = \textcolor{red}{ \sigma^2 + 0 + \mu^2 } \textcolor{black}{-} \textcolor{blue}{\mu^2} $$</ymath></big> | <big><ymath>$$ V[X] = \textcolor{red}{ \sigma^2 + 0 + \mu^2 } \textcolor{black}{-} \textcolor{blue}{\mu^2} $$</ymath></big> | ||
<big><ymath>$$ V[X] = \sigma^2 $$</ymath></big> | <big><ymath>$$ V[X] = \sigma^2 $$</ymath></big> |