0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

対称な確率密度関数の期待値

Posted at

対称な確率密度関数の期待値が中心点になる理由

確率分布の形が「左右対称」であるとき、その期待値は必ず対称の中心になります。
本記事ではその理由を、数式と直感、そしてPythonによるシミュレーションで確認します。

1. 対称性の定義

確率密度関数 $ f(x) $が $ x = a $ に関して対称であるとは、

$$
f(a + t) = f(a - t)
$$

がすべての実数 $ t $ に対して成り立つことをいいます。

2. 期待値の定義式

期待値 $ E[X] $ は次で定義されます。

$$
E[X] = \int_{-\infty}^{\infty} x f(x)dx
$$

変数を $ x = a + t $ とおくと:

$$
E[X] = \int_{-\infty}^{\infty} (a + t) f(a + t)dt
$$

これを2つに分けると:

$$
E[X] = a \int_{-\infty}^{\infty} f(a + t)dt + \int_{-\infty}^{\infty} t f(a + t)dt
$$

3. 対称性の効果

  • 第1項は確率密度の積分なので $ a $
  • 第2項は $ f(a+t) $ が偶関数、$ t $ が奇関数なので、積は奇関数
    ⇒ 積分値は $0$

したがって:

$$
E[X] = a
$$

4. 直感的説明

左右対称な分布では「右にずれる確率」と「左にずれる確率」が等しいため、
左右の重みが打ち消し合い、平均(重心)は中心 $ a $ に来ます。

5. 例

分布 対称軸 期待値
標準正規分布 $ N(0,1) $ $ x=0 $ $ 0 $
正規分布 $ N(a, \sigma^2) $ $ x=a $ $ a $
一様分布 $ U(a-b, a+b) $ $ x=a $ $ a $

6. Pythonによる確認

import numpy as np
import matplotlib.pyplot as plt

# 対称な分布(例: N(a, σ^2))
a = 5
sigma = 2
n = 10_0000
x = np.random.normal(a, sigma, n)

print("サンプル平均:", np.mean(x))
print("理論値:", a)

# 可視化
plt.hist(x, bins=50, density=True, alpha=0.6)
plt.axvline(np.mean(x), color="red", linestyle="--", label="sample mean")
plt.axvline(a, color="black", linestyle=":", label="center a")
plt.legend()
plt.title("Symmetric PDF: N(a, σ²)")
plt.show()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?