Koga Kobayashi
September 07, 2020
94

# 基礎数学の公式

「ベイズ統計の理論と方法」勉強会の資料

## Koga Kobayashi

September 07, 2020

## Transcript

1. جૅ਺ֶͷެࣜ
ϕΠζ౷ܭͷཧ࿦ͱํ๏ษڧձ

2. సஔߦྻ τϨʔε ߦྻࣜ

3. సஔߦྻɺϕΫτϧ
Ұൠʹ ߦྻ ʹ͍ͭͯɺ
ͦͷసஔߦྻ ͱ͸ ߦྻͰ ͷ͜ͱͰ͋Δɻ
k × d A = (Aij
)
AT d × k A = (Aji
)
࣍ݩϕΫτϧ Λ ߦྻͱߟ͑Δɻ͜ΕΛॎϕΫτϧͱ͍͏ɻ
·ͨɺ͜ͷͱ͖ԣϕΫτϧ ͸ ߦྻͰ͋Δɻ
d v d × 1
vT 1 × d

4. τϨʔε
ߦྻ ͷτϨʔεΛ
d × d A

tr(A) =
d

i=1
Aii
ͱॻ͘ɻ
tr(AB) = tr(BA)
͕੒Γཱͭɻ
ߦྻ ʹ͍ͭͯҰൠʹ ͕ͩɺҰൠʹ
d × d A, B AB ≠ BA
ର֯੒෼ͷ࿨

5. ಺ੵ
Λ ࣍ݩͷϕΫτϧͱ͢Δͱ͖ɺͦͷ಺ੵΛ
u, v d
u ⋅ v =
d

i=1
ui
vi
ͱॻ͘ɻ

6. ϊϧϜ
ϕΫτϧ ͷϊϧϜΛ Ͱද͢ɻ Ͱ͋Δɻ
u ∥u∥ ∥u∥ = u ⋅ u
u ⋅ v = uTv = tr(v ⋅ uT)
͕੒Γཱͭɻ͜ΕΑΓ
(u ⋅ v)2 = vTuuTv = tr(uuTvvT)
͕ಘΒΕΔɻ·ͨ
u ⋅ Av = (ATu) ⋅ v = tr(AvuT)
͕੒Γཱͭɻ

7. ߦྻࣜ
ߦྻ ͷߦྻࣜΛ
d × d A
det(A) = ∑
σ
sgn(σ)A1σ(1)
A2σ(2)
ͱॻ͘ɻ
͜͜Ͱ ͸ཁૉͷ਺͕ ݸͷू߹͔Βࣗ෼ࣗ਎΁ͷશ୯ࣹ ஔ׵
Λද͢ɻ
ஔ׵ͷݸ਺͸શ෦Ͱ ݸͰ͋Δ͕ɺ ͸ஔ׵શମͷू߹ʹର͢Δ࿨Ͱ͋Γɺ
σ d
d! ∑
σ

͸حஔ׵ͷͱ͖ ɺۮஔ׵ͷͱ͖ Ͱ͋Δɻ
sgn(σ) −1 1
IUUQTPHVFNPODPNTUVEZMJOFBSBMHFCSBEFUXIBU

8. ߦྻࣜ
ߦྻ ʹ͍ͭͯ
d × d A, B
det(AB) = det(A) det(B)
͕੒Γཱͭɻ

9. ରশߦྻ ݻ༗஋ ਖ਼ఆ஋ߦྻ

10. ਖ਼ଇɾٯߦྻɾରশߦྻɾ௚ߦߦྻ
ߦྻ ͕Մٯ͋Δ͍͸ਖ਼ଇͰ͋Δͱ͸
͕୯ҐߦྻͱͳΔΑ͏ͳߦྻ ͕ଘࡏ͢Δ͜ͱͰ͋Δɻ
d × d A
A−1A A−1
͕ՄٯͰ͋Δͱ͖ Λ ͷٯߦྻͱ͍͏ɻ
A A−1 A
࣮਺Λཁૉʹ࣋ͭ ߦྻ ͕ରশߦྻͰ͋Δͱ͸ɺ
͕੒Γཱͭ͜ͱͰ͋Δɻ
d × d A = (Aij
)
A = AT
࣮਺Λཁૉʹ࣋ͭ ߦྻ ͕௚ߦߦྻͰ͋Δͱ͸ɺ
͕୯ҐߦྻͰ͋Δ͜ͱͰ͋Δɻ
d × d R = (Rij
)
RTR

11. ର֯ߦྻɾର֯Խ
ߦྻ ͕ର֯ߦྻͰ͋Δͱ͸ ͕੒Γཱͭ͜ͱͰ͋Δɻ
d × d A i ≠ j ⇒ Aij
= 0
೚ҙͷରশߦྻ ʹରͯ͠ Λର֯ߦྻʹ͢ΔΑ͏ͳ௚ߦߦྻ ͕ଘࡏ͢Δɻ
͢ͳΘͪ
A R−1AR R
ͱग़དྷΔɻ͜ͷͱ͖ର֯ߦྻ ΛٻΊΔ͜ͱΛʮ Λର֯Խ͢Δʯͱ͍͏ɻ
R−1AR A

12. δϣϧμϯඪ४ܗ
ର֯ߦྻͰͳ͍ߦྻ͸Ұൠతʹ͸ର֯Խग़དྷΔͱ͸ݶΒͳ͍͕ɺ
ՄٯߦྻΛ༻͍ͯδϣϧμϯඪ४ܗʹ͢Δ͜ͱ͕ग़དྷΔɻ
δϣϧμϯࡉ๔ δϣϧμϯඪ४ܗ

13. ݻ༗஋ɾਖ਼ఆ஋ߦྻ
ߦྻ ʹ͍ͭͯɺෳૉ਺ ͱෳૉ਺Λཁૉͱ͢ΔϕΫτϧ ͕
ଘࡏͯ͠
d × d A λ v ≠ 0
͕੒Γཱͭͱ͖ɺ Λ ͷݻ༗஋ͱ͍͍ɺ Λ ͷݻ༗ϕΫτϧͱ͍͏ɻ
ରশߦྻ ͷݻ༗஋͕શͯ ΑΓେ͖͍ͱ͖ɺ Λਖ਼ఆ஋ߦྻͰ͋Δͱ͍͏ɻ
λ A v A
A 0 A
Av = λv
͕ਖ਼ఆ஋ߦྻͰ͋Ε͹ೋ࣍ࣜʹ͍ͭͯฏํ׬੒͕ग़དྷΔɻ
A
1
2
(u ⋅ Au) − u ⋅ v =
1
2
∥A1/2(u − A−1v)∥2 −
1
2
∥A−1/2v∥2

14. ੵ෼ެࣜ

15. ਖ਼ن෼෍
ͱ͠ɺ Λ ͷਖ਼ఆ஋ߦྻͰ͋Δͱ͢Δɻ͜ͷͱ͖
w ∈ ℝd A d × d

exp(−
n
2
w ⋅ A−1w)dw =
(2π)d/2 det(A)1/2
nd/2
ฏۉ͕ Ͱ෼ࢄڞ෼ࢄߦྻ͕ ͷਖ਼ن෼෍͸
a ∈ ℝd A
(a, A) = p(w) =
1
(2π)d/2 det(A)1/2
exp(−
1
2
(w − a) ⋅ A−1(w − a))
ͱ͍͏ࣜͰද͞ΕΔɻ

16. ਖ਼ن෼෍
͜ͷͱ͖

wp(w)dw = a
Ͱ͋Γɺ೚ҙͷ ߦྻ ʹ͍ͭͯ
d × d B

(w − a) ⋅ B(w − a)p(w)dw = tr(BA)
ͷ֬཰෼෍͸ Ͱ͋Δɻ
(Ba + b, BABT)
Ͱ͋Δɻ Λ ͷՄٯߦྻͱ͢Δɻ
֬཰ม਺ ͷ֬཰෼෍͕ Ͱ͋Δͱ͖֬཰ม਺
B d × d
X (a, A)
Y = BX + b

17. ฏۉ஋ͷఆཧ

18. ଟม਺͔ΒͳΔؔ਺ͷඍ෼ͷه๏
Λඇෛͷ੔਺ͱ͢Δɻଟॏࢦ਺ ʹ͍ͭͯ࣍ͷΑ͏ʹఆΊΔɻ
k1
, …, kd
k = (k1
, …, kd
)
|k| = k1
+ k2
+ ⋯ + kd
, k! = (k1
)!(k2
)!⋯(kd
)!
ͷ ΛؚΉ։ू߹্Ͱఆٛ͞Εͨ
ճ࿈ଓඍ෼Մೳͳؔ਺ ʹ͍ͭͯ ͷͱ͖
ℝd w = w0
(r + 1) g(w) |k| ≤ r + 1
∂kg
∂wk
(w) = (
d

j=1
∂kj
∂wkj
j
)g(w),
ͱఆٛ͢Δɻ
͜ΕΒ͸ଟม਺ͷؔ਺ͷඍ෼ʹ͓͍ͯҰൠతʹར༻͞ΕΔه๏Ͱ͋Δɻ
(w − w0
)k =
d

j=1
(wj
− (w0
)j
)kj

19. ฏۉ஋ͷఆཧ
೚ҙͷ ʹରͯ͠ɺ ʹΑΔఆ·Δ ͕ଘࡏͯ͠
w w w*
g(w) = ∑
|k|≤r
∂kg
∂wk
(w0
)
(w − w0
)k
k!
+ ∑
|k|=r+1
∂kg
∂wk
(w*)
(w − w0
)k
k!
͕੒ཱ͢Δɻ
͜Ε͕ฏۉ஋ͷఆཧͰ͋Γɺؔ਺ͷมԽͷฏۉతͳڍಈʹ͍ͭͯͷఆཧͰ͋Δɻ
·ͨ͜͜Ͱ ͸͋Δ ͕ଘࡏͯ͠
w* 0 < θ < 1
w* = w0
+ θ(w − w0
)
ͱද͞ΕΔɻ
ಛʹ Ͱ͋Δ͔Βɺ ͷͱ͖ ͕੒Γཱͭɻ
∥w* − w0
∥ ≤ ∥w − w0
∥ w → w0
w* → w0