Upgrade to Pro — share decks privately, control downloads, hide ads and more …

確率・統計の基礎勉強会3

setten-QB
January 18, 2017

 確率・統計の基礎勉強会3

Slides of lecture

setten-QB

January 18, 2017
Tweet

More Decks by setten-QB

Other Decks in Education

Transcript

  1. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ୈ 3 ճ ֬཰ɾ౷ܭͷجૅษڧձ ౷ܭతਪఆ ాத

    ޺ণ (@setten QB) ಸྑઌ୺Պֶٕज़େֶӃେֶ ৘ใՊֶݚڀՊɹɹ஌ೳίϛϡχέʔγϣϯݚڀࣨ Ϗοάσʔλάϧʔϓ March 25, 2017 1 / 49
  2. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ֬཰࿦ͱ౷ܭֶ • ֬཰࿦͸ (Ω, B, P)

    ͔Βٞ࿦ΛਐΊͨ • ౷ܭֶͰ͸σʔλ͔Βग़ൃ͢Δ • ௐ΂͍ͨσʔλͷ΋ͱͱͳΔूஂͷ͜ͱΛ฼ूஂͱ͍͏ • ͍ͭ΋σʔλͷશͯΛௐ΂ΒΕΔΘ͚Ͱ͸ͳ͍ • ͦͷΑ͏ͳͱ͖ʹ༻͍ΒΕΔͷ͕ “ඪຊͷແ࡞ҝநग़” • ͜ͷΑ͏ͳ౷ܭΛਪଌ౷ܭͱ͍͏ • σʔλ͸֬཰ม਺ͷ࣮ݱ஋ ͱ͍͏ߟ͑ํ͕ॏཁ 3 / 49
  3. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ฼ूஂͱඪຊ • “฼ूஂ” ͱ “ඪຊ” ͷ۠ผ͸େࣄ

    • ฼ूஂ͔Β n ݸͷ؍ଌσʔλ x1, . . . , xn Λແ࡞ҝநग़͢Δ • ͜ΕΒ͸ɼX1, . . . , Xn: i.i.d. ͷ࣮ݱ஋ x1 = X1(ω), . . . , xn = Xn(ω) ͱΈͳ͞ΕΔɿ • ࣮ࡍͷ؍ଌσʔλ͸ɼෆ࣮֬ੑΛ൐ͬͯಘΒΕͨσʔλͩͱ͍͏͜ͱ • i.i.d. ͳ฼ूஂ෼෍͔Βͷແ࡞ҝඪຊͱ΋ݴ͍׵͑ΒΕΔ • X1, . . . , Xn ͷڞ௨ͷ֬཰෼෍ͷ͜ͱΛ฼ूஂ෼෍ͱ͍͍ɼநग़͞Εͨ σʔλͷࣄΛඪຊ (sample) ͱ͍͏ • ౷ܭֶͷश׳ͱͯ͠ɼඪຊ͸ “i.i.d. ͳ֬཰ม਺” Λࢦ͢͜ͱ΋ɼͦͷ ࣮ݱ஍Λࢦ͢͜ͱ΋͋ΔͷͰ஫ҙ 4 / 49
  4. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ඪຊͱ฼ूஂ ฼ूஂ fX(x; θ) ࣮ݱ஋ɿx1 ,

    . . . , xn ⇒ θ(x1 , . . . , xn ) ਪఆ஋ ֬཰ม਺ X1 , . . . , Xn ⇒ θ(X1 , . . . , Xn ) ਪఆྔ ແ࡞ҝநग़ ਪఆ 5 / 49
  5. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ύϥϝτϦοΫͳख๏ • ౷ܭతਪଌͰ͸ɼσʔλ͔Β฼ूஂ෼෍Λਪଌ͍ͯ͘͠ • ࠓճ͸ɼ฼ूஂ෼෍͕࣮਺ύϥϝʔλ θ

    = [ θ1 · · · θn ] ∈ Rk ʹґଘ ͠ɼͦΕʹΑΓ฼ूஂ෼෍͕Ұҙʹఆ·ΔͱԾఆͯ͠࿩Λ͢͢ΊΔ • ͜ͷΑ͏ʹɼ͍͔ͭ͘ͷύϥϝʔλ͕ܾ·Ε͹֬཰෼෍͕ఆ·Δͱ͍ ͏࿮૊ΈͰͷ౷ܭతख๏ΛɼύϥϝτϦοΫͳख๏ͱ͍͏ • ύϥϝτϦοΫͳख๏Ͱ͸ɼඪຊ x1, . . . , xn ͔Β θ ͷ஋Λܾఆͯ͠ద ੾ͳ֬཰෼෍Λਪఆ͢Δࣄ͕໨ඪʹͳΔ 6 / 49
  6. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ύϥϝʔλͷਪఆ • ύϥϝʔλ θ ʹґଘ͢Δ฼ूஂ෼෍Λͷ p.d.f.

    Λ f(x; θ) Ͱද͢ • θ ͷ஋Λσʔλʹج͍ͮͯਪଌ͢Δ͜ͱΛ౷ܭతਪఆ (Estimation) ͱ ͍͏ • X1, . . . , Xn iid ∼ f(x; θ) Λ૊Έ߹Θͤͯ࡞ΕΒΕΔ֬཰ม਺ɼͭ·Γ X = [ X1 · · · Xn ] ͷؔ਺Ͱ͋Δ֬཰ม਺Λ౷ܭྔ (Statistics) ͱ ͍͏ • ಛʹɼύϥϝʔλ θ ͷਪఆͷͨΊʹ༻͍ΒΕΔ౷ܭྔΛ θ = θ(X1, . . . , Xn) ͱॻ͖ɼਪఆྔ (Estimaor) ͱ͍͏ • ਪఆྔͷ࣮ݱ஋ θ = θ(x1, . . . , xn) = θ(x) Λਪఆ஋ (Estimate) ͱ ͍͏ 7 / 49
  7. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ύϥϝτϦοΫͳਪఆͷྫ ਖ਼ن฼ूஂͰͷύϥϝʔλਪఆ X ͕ਖ਼ن෼෍ʹै͍ͬͯΔͱ͍͏ԾఆͷԼͰͷύϥϝʔλਪఆΛߟ ͑Δɽ •

    ແ࡞ҝඪຊ X1, . . . , Xn ͔Βɼະ஌ύϥϝʔλ θ = [ µ σ2 ] Λਪఆ͢Δͱ͍͏໰୊ʹͳΔ • ʮͲ͏΍ͬͯਪఆ͢Δͷ͔ʁʯͱ͍͏࿩͸·ͨޙͰ 8 / 49
  8. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ఺ਪఆͱ۠ؒਪఆ • ύϥϝʔλʹؔ͢Δ౷ܭతਪఆʹ͸ 2 छྨ͋Δɿ ఺ਪఆ

    ະ஌ύϥϝʔλΛਪఆྔΛ༻͍ͯ 1 ఺Ͱਪఆ͢Δ ۠ؒਪఆ ະ஌ύϥϝʔλΛߴ͍֬཰ͰؚΉΑ͏ͳ۠ؒ (৴པ۠ؒ) ΛਪఆྔΛ༻͍ͯߏங͢Δ 9 / 49
  9. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਪఆྔͷ࣋ͭ΂͖ੑ࣭ • ύϥϝʔλͷਪఆʹ͸ɼجຊతʹ͸ͲͷΑ͏ͳਪఆྔΛ༻͍ͯ΋͔· Θͳ͍ • ͕͔ͩ͠͠ɼ౰વͳ͕Βద౰ͳج४ʹরΒ͠߹Θͤͯ๬·͍͠ਪఆྔ

    Λ༻͍Δ΂͖ • ҎԼͷઃఆͷԼͰɼͲͷΑ͏ͳਪఆྔ͕ “ྑ͍” ͷ͔ʁΛٞ࿦͍ͯ͘͠ ౷ܭతਪଌͷجຊతઃఆ ඪຊ X1, . . . , Xn iid ∼ f(x; θ) ʹج͖ͮɼਪఆྔ θ = θ(X1, . . . , Xn) Ͱ θ Λਪఆ͢Δɽ 11 / 49
  10. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ෆภੑͱόΠΞε ෆภੑͱόΠΞε ਪఆྔ θ ͷظ଴஋͕ਪఆ͍ͨ͠ θ

    ͱ౳͍͠ͱ͖ɼ͢ͳΘͪ E [ θ ] = θ ͕੒Γཱͭͱ͖ɼθ Λ θ ͷෆมਪఆྔ (unbiased estimator) ͱ͍͍ɼ θ ͸ෆภੑΛຬͨ͢ͱ͍͏ɽಛʹɼE [ θ ] ̸= 0 ͷͱ͖ɼE [ θ ] − θ Λό ΠΞε (bias) ͱ͍͍ɼBias [ θ ] Ͱද͢ɽ 12 / 49
  11. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ Ұகੑ ҰகਪఆྔͱҰகੑ ਪఆྔ θ ͕ θ

    ʹ֬཰ऩଋ͢Δͱ͖ɼ͢ͳΘͪɼ ∀ε > 0, lim n→∞ P ( θ − θ > ε ) = 0 ͕੒ཱ͢Δͱ͖ɼθ ͸ θ ͷҰகਪఆྔ (consistent estimator) ͱ͍͍ɼ θ ͸Ұகੑ (consistency) Λຬͨ͢ͱ͍͏ɽ 13 / 49
  12. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ϕϧψʔΠ෼෍ͷਪఆྔ ϕϧψʔΠ෼෍ ϕϧψʔΠ෼෍͔Βͷແ࡞ҝඪຊ X1, . .

    . , Xn iid ∼ B(1, p) ʹج͖ͮɼ p Λਪఆ͢Δɽ p = X ͱ͢Δͱɼ E [p] = E [ X ] = E [ 1 n n ∑ i=1 Xi ] = 1 n n ∑ i=1 E [Xi] = E [X1] = p ͱͳΓɼp ͕ p ͷෆภਪఆྔͰ͋Δ͜ͱ͕෼͔Δɽ·ͨɼେ਺ͷ๏ଇΑΓ X P −→ E [X1] ͳͷͰɼp P −→ p ͱͳΔɽ͕ͨͬͯ͠ɼp ͸ p ͷҰகਪఆྔ Ͱ͋Δɽ 14 / 49
  13. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਖ਼ن෼෍ͷਪఆྔ ਖ਼ن෼෍ ਖ਼ن෼෍͔Βͷແ࡞ҝඪຊ X1, . .

    . , Xn iid ∼ N ( µ, σ2 ) ʹج͖ͮ µ, σ2 Λਪఆ͢Δɽ µ = X ͱ͢Δͱɼ E [µ] = E [ X ] = µ ͱͳΔͷͰɼµ ͸ µ ͷෆภਪఆྔͰ͋Δɽ͞Βʹɼେ਺ͷऑ๏ଇ͔ΒҰக ਪఆྔͰ͋Δ͜ͱ΋෼͔Δɽ Ұํɼඪຊ෼ࢄ S2 ͸ σ2 ͷҰகਪఆྔͰ͋Δ͕ɼෆภਪఆྔͰ͸ͳ͍ɽ 15 / 49
  14. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ෼ࢄͷෆภਪఆྔ ฼෼ࢄͷෆภਪఆྔ ඪຊෆภ෼ࢄ S2 u =

    1 n − 1 n ∑ i=1 ( Xi − X )2 ͸ V [X1] = σ2 ͷෆภਪఆྔͰ͋Δ͕ɼඪຊ෼ࢄ͸ෆภਪఆྔͰ͸ ͳ͍ɽ 16 / 49
  15. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ෼ࢄͷෆภਪఆྔ ࣮ࡍʹظ଴஋Λܭࢉ͢Δͱɼ E [ S2 u

    ] = 1 n − 1 E [ n ∑ i=1 ( Xi − X )2 ] = 1 n − 1 n ∑ i=1 E [{ (Xi − µ) + ( µ − X )}2 ] (µ := E [X1 ]) = 1 n − 1 n ∑ i=1 { E [ (Xi − µ)2 ] − 2E [ (Xi − µ) ( X − µ )] + E [( X − µ )2 ]} = 1 n − 1 { n ∑ i=1 V [Xi ] − 2nE [( X − µ )2 ] + nV [ X ] } = 1 n − 1 ( nσ2 − 2σ2 + σ2 ) =σ2 ͱͳΓɼS2 u ͕ σ2 ͷෆภਪఆྔͰ͋Δ͜ͱ͕෼͔Δɽ 17 / 49
  16. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਪఆྔͷྑ͞ • ਪఆྔͷྑ͞ΛਤΔࢦඪͱͯ͠ɼฏۉ 2 ৐ޡࠩ (mean

    squared error) ͕͋Δ Mean Squared Error; MSE ਪఆྔ θ ͷฏۉ 2 ৐ޡࠩΛҎԼͰఆٛ͢Δɿ MSE [ θ ] = E [ θ − θ ] . • MSE ͕খ͍͜͞ͱ͸ɼਪఆ͍ͨ͠ θ ͱਪఆྔ θ ͷҧ͍͕খ͍͜͞ͱΛ ҙຯ͍ͯ͠ΔͷͰɼMSE ͕খ͍͞΄Ͳྑ͍ਪఆྔͷ͸ͣ 18 / 49
  17. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ Bias-Variance ෼ղ MSE ͷ෼ղ MSE ͸ҎԼͷΑ͏ʹ෼ղ͞ΕΔɿ

    MSE [ θ ] = V [ θ ] + Bias [ θ ] 2 . ಛʹɼθ ͕ θ ͷෆภਪఆྔͳΒ͹ɼMSE [ θ ] = V [ θ ] Ͱ͋Δɽ 19 / 49
  18. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ Bias-Variance ෼ղ MSE [ θ ]

    =E [( θ − θ )2 ] =E [( θ − E [ θ ] + E [ θ ] − θ )2 ] =E [( θ − E [ θ ])2 ] + E [( E [ θ ] − θ )2 ] + 2E [( θ − E [ θ ]) ( E [ θ ] − θ )] =E [( θ − E [ θ ])2 ] + ( E [ θ ] − θ )2 + 0 =V [ θ ] + Bias [ θ ]2 . θ ͕ෆภਪఆྔͰ͋Δͱ͖͸ Bias [ θ ] = 0 ͳͷͰɼMSE [ θ ] = V [ θ ] ͕੒ Γཱͭɽ 20 / 49
  19. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ࠷খ෼ࢄෆภਪఆྔ • MSE ͷ Bais-Variance ෼ղ͔Βɼਪఆྔͱͯ͠ෆภਪఆྔͷΈΛߟ͑

    Δ͜ͱʹ͢Ε͹ɼ෼ࢄ͕খ͍͞ਪఆྔ΄Ͳྑ͍ਪఆྔͱݴ͑Δ ࠷খ෼ࢄෆภਪఆྔ θ ͷෆภਪఆྔͷதͰ෼ࢄ͕࠷খͷ΋ͷ͕ଘࡏ͢Ε͹ɼͦΕΛ࠷খ෼ ࢄෆภਪఆྔͱ͍͏ɽ • ࠷খ෼ࢄෆภਪఆྔ͸ৗʹଘࡏ͢Δͱ͸ݶΒͳ͍ 21 / 49
  20. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ Fisher ৘ใྔ • ਪఆྔΛෆภਪఆྔʹݶఆ͠ɼਪఆྔͷਫ਼౓Λ MSE ͰଌΔ͜ͱʹ͢Δ

    ͱɼ࠷খ෼ࢄෆภਪఆྔ͕ݟ͔ͭΕ͹ଞͷਪఆྔΛ࢖͏ཧ༝͸ͳ͍ • ͦͷෆภਪఆྔͷԼݶΛ༩͑Δͷ͕ɼΫϥϝϧɾϥΦͷఆཧ Fisher ৘ใྔ X1, . . . , Xn ∼ fX(x; θ) ͷಉ࣌ີ౓Λ fX(x; θ) ͱ͢Δɽ͜ͷͱ͖ɼ In(θ) = E [{ ∂ ∂θ log f (X; θ) } 2 ] Λ f(x; θ) ʹؔ͢Δ Fisher ৘ใྔͱ͍͏ɽ 22 / 49
  21. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ΫϥϝϧɾϥΦͷఆཧ ΫϥϝϧɾϥΦͷఆཧ ҎԼͷෆ౳͕ࣜ੒Γཱͭɿ V [ θ

    ] ≥ In(θ)−1. ·ͨɼ౳߸੒ཱ͸ҎԼͷ࣌ʹݶΔɿ ∂ ∂θ log f (X; θ) = In(θ) ( θ − θ ) . ΫϥϝϧɾϥΦͷෆ౳ࣜͷ౳߸͕੒ཱ͢Δͱ͖ͷਪఆྔΛ༗ޮਪఆ ྔͱ͍͏ɽ • ෆภਪఆྔͷ෼ࢄͷԼݶΛϑΟογϟʔ৘ใྔͷٯ਺͕༩͑Δ • ͭ·ΓɼϑΟογϟʔ৘ใྔ͸ਪఆྔͷਫ਼౓ͷݶքΛਪఆ͢Δྔͱݴ ͑Δ 23 / 49
  22. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ໬౓ ໬౓ X1, . . .

    , Xn iid ∼ fX(x; θ) ͱ͢Δɽ͜ͷͱ͖ɼj.p.d.f. ͸ fx(x; θ) = ∏ n i=1 f(xi; θ) ͱͳΔ͕ɼ͜ΕΛ θ ͷؔ਺ͱͯ͠ݟͨͱ͖ʹ໬౓ (ؔ ਺) ͱ͍͍ L(θ) = n ∏ i=1 f(xi; θ) ͱॻ͘ɽ 25 / 49
  23. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ໬౓ͷҙຯ ໬౓ͷҙຯ –ೋ߲෼෍Λྫʹ– ςϥγϚ܅͕๭ΩϟόΫϥ΁ 5 ճߦͬͯΈͨͱ͜Ζɼ“౰ͨΓɼ౰ͨ

    ΓɼϋζϨɼ౰ͨΓɼϋζϨ” ͱ͍͏݁Ռʹͳͬͨɽ͜ͷΩϟόΫϥ Ͱ౰ͨΓΛҾ֬͘཰Λ p ∈ [0, 1] ͱ͢Δͱ͖ɼp ͷ஋ͱͯ͠໬΋ͳ஋ ͸Կ͔ʁ ౰ͨΓΛ 1ɼϋζϨΛ 0 ͱߟ͑ΔͱɼΩϟόΫϥͷ݁Ռ͸ X1, . . . , X5 iid ∼ B(1, p) ͷ࣮ݱ஋ͱߟ͑Δ͜ͱ͕ग़དྷΔɽ 26 / 49
  24. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ໬౓ͷҙຯ i.i.d. ͷੑ࣭͔Β P(X1 = 1,

    X2 = 1, X3 = 0, X4 = 1, X5 = 0) =P(X1 = 1)P(X2 = 1)P(X3 = 0)P(X4 = 1)P(X5 = 0) =p3(1 − p)2 Ͱ͋Δɽ͜ͷ֬཰Λ L(p) ͱ͓͍ͯɼ0 ≤ p ≤ 1 ʹ͓͍ͯ L(p) ͕࠷େͱͳ Δ p ΛٻΊΕ͹ɼ༩͑ΒΕͨσʔλ͕ಘΒΕΔ֬཰Λ࠷େʹ͢ΔΑ͏ͳ (ͭ ·Γ࠷΋໬΋ͳ)p ΛٻΊͨ͜ͱʹͳΔɽ ࣮ࡍʹ L(p) ૿ݮΛௐ΂Δͱɼarg max p∈[0,1] L(p) = 3/5 ͱͳΔɽ 27 / 49
  25. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ࠷໬๏ • ະ஌ύϥϝʔλ θ ͸࣮ࡍʹ͸෼͔Βͳ͍஋ •

    θ ∈ Θ ⊂ R ͱԾఆͯ͠ɼඪຊ͔Βਪఆ͢Δ • X1, . . . , Xn ͷ࣮ݱ஋ x1, . . . , xn ʹର͠ɼ࠷΋໬΋ͳ (ͭ·Γɼ໬౓ L(θ) Λ࠷େԽ͢Δ) θ Λ θ = θ(x1, . . . , xn) ͱॻ͖ɼθ ͷ࠷໬ਪఆ஋ (maximum likelihood estimate) ͱݺͿɿ θ = arg max θ∈Θ L(θ) • ֬཰ม਺Ͱஔ͖׵͑ͨ θ = θ(X1, . . . , Xn) Λ࠷໬ਪఆྔͱ͍͏ • ໬౓ؔ਺ L(θ) ͷ࠷େԽʹΑͬͯਪఆྔΛٻΊΔ͜ͷํ๏Λ࠷໬๏ͱ ͍͏ɽ 28 / 49
  26. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ର਺໬౓ • ໬౓ؔ਺͕ p.d.f. ͷੵͷܗʹͳ͍ͬͯΔ͜ͱʹ஫ҙ͢Δͱ θ

    = arg max θ∈Θ L(θ) = arg max θ∈Θ log L(θ) • ͜ͷ͜ͱΛར༻ͯ͠ɼ࣮ࡍʹ࠷໬ਪఆྔΛٻΊΔࡍʹ͸ ∂ ∂θ log L(θ) = 0 Λղ͍ͯ θ ΛٻΊΔ͜ͱ͕ଟ͍ 29 / 49
  27. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ࠷໬๏ͷྫ ࠷໬๏–ਖ਼ن෼෍Λྫʹ– X1, . . .

    , Xn iid ∼ N ( µ, σ2 ) ͷͱ͖ɼθ = [µ, σ2] ͷ MLE ΛٻΊΑɽ L(θ) = n ∏ i=1 f(xi; θ) = n ∏ i=1 1 √ 2πσ2 exp [ − (x − µ)2 2σ2 ] =(2πσ2)−n/2 exp [ − n ∑ i=1 (xi − µ)2 2σ2 ] 30 / 49
  28. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ࠷໬๏ͷྫ Ͱ͋Δ͔Βɼ ∂ ∂µ log L(θ)

    = 0 ⇐⇒ − 1 σ2 n ∑ i=1 (xi − µ) = 0 ⇐⇒ n ∑ i=1 xi − µn = 0. ͕ͨͬͯ͠ɼ ˆ µ = 1 n n ∑ i=1 Xi = X Ͱ͋Δɽ͜ͷ৚݅ͷ΋ͱͰ ˆ σ2 ΛٻΊΔɽ 31 / 49
  29. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ࠷໬๏ͷྫ log L(θ) = n 2

    log σ2 − n 2 log(2π) − n ∑ i=1 (x − x)2 2σ2 Ͱ͋Δ͔Βɼ ∂ ∂σ2 log L(θ) = 0 ⇐⇒ − n 2σ2 + n ∑ i=1 (xi − x)2 2σ4 = 0 ⇐⇒ − nσ2 + n ∑ i=1 (xi − x)2 = 0. ͕ͨͬͯ͠ɼ ˆ σ2 = 1 n n ∑ i=1 (Xi − X). 32 / 49
  30. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ MLE ͷੑ࣭ • θ ͷ MLEθ

    ͸ͲͷΑ͏ͳৼΔ෣͍Λ͢Δͷ͔ʁ MLE ͷੑ࣭ ༗ޮੑ ༗ޮਪఆྔ͕ଘࡏ͢ΔͱԾఆ͢Δɽ໬౓ํఔࣜΛղ͍ͯ MLE ΛٻΊ Δ͜ͱ͕ग़དྷΔͱ͖ɼ༗ޮਪఆྔ͸࠷໬ਪఆྔͰ͋Δɽ Ұகੑ θ P −→ θ, as n → ∞ ઴ۙ༗ޮੑ √ n ( θ − θ ) D −→ N ( 0, I1(θ)−1 ) , as n → ∞ 33 / 49
  31. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ۠ؒਪఆͷߟ͑ํ • ͜͜·Ͱͷਪఆͷٞ࿦͸ɼθ ͷ஋Λ 1 ఺Ͱਪఆ͢Δ

    (఺ਪఆ) ΋ͷͰ ͋ͬͨ • ͔͜͜Β͸ɼθ ͷ஋Λ͋Δൣғ (۠ؒ) Ͱਪఆ͢Δ࿩ (۠ؒਪఆ) ʹҠΔ • ۠ؒਪఆͰ͸ɼਫ਼౓ͱ۠ؒͷେ͖͞ͷؔ܎͕໰୊ͱͳΔ 35 / 49
  32. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ۠ؒਪఆͷఆࣜԽ • ਖ਼ن฼ूஂ N ( µ,

    σ2 ) ʹݶఆͯ͠ɼະ஌ύϥϝʔλ͸ µ ͷΈͰ͋Δͱ ͢Δ • µ ͕۠ؒ Iµ = [µ∗, µ∗] Ͱਪఆ͞ΕΔͱ͢Δ (µ∗, µ∗ ͸౷ܭྔ) • P (µ∗ ≤ µ ≤ µ) = 1 − α ͕੒Γཱͭͱ͖ɼIµ Λ฼ฏۉ µ ʹؔ͢Δ৴ པ܎਺ 1 − α ͷ৴པ۠ؒɼ·ͨ͸ 100(1 − α)% ৴པ۠ؒͱ͍͏ 36 / 49
  33. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਖ਼ن฼ूஂͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄط஌) ਖ਼ن฼ूஂͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄط஌) X1, .

    . . , Xn iid ∼ N ( µ, σ2 ) ͱͯ͠ɼ σ2 = σ2 0 ͸ط஌ͱ͢Δɽ͜ͷͱ͖ɼ ฼ฏۉ µ ͷ৴པ܎਺ 1 − α ͷ৴པ۠ؒ͸ (1) Ͱ༩͑ΒΕΔɽ Iµ = [ X − zα/2 σ0 √ n , X + zα/2 σ0 √ n ] . (1) • (1) ʹ͓͍ͯɼzα/2 ͸ඪ४ਖ਼ن෼෍ͷ্ଆ 100(α/2)% ఺ɼͭ·Γ Φ(zα/2 ) = ∫ zα/2 −∞ 1 √ 2π exp ( − x2 2 ) = 1 − α 2 Λຬͨ͢఺Ͱ͋Δ 37 / 49
  34. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਖ਼ن฼ूஂͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄط஌) √ n (µ −

    µ) /σ0 ∼ N (0, 1) Ͱ͋Δ͜ͱΛ༻͍Δͱɼ P(µ ∈ Iµ) =P ( µ ∈ [ X − zα/2 σ0 √ n , X + zα/2 σ0 √ n ]) =P ( X − zα/2 σ0 √ n ≤ µ ≤ X + zα/2 σ0 √ n ) =P ( −zα/2 ≤ √ n ( X − µ ) σ0 ≤ zα/2 ) =Φ(zα/2 ) − { 1 − Φ(zα/2 ) } =2Φ(zα/2 ) − 1 =2 ( 1 − α 2 ) − 1 =1 − α 38 / 49
  35. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ৴པ۠ؒʹؔ͢Δ஫ҙ • ৴པ܎਺ͷҙຯ͸ɼԿ౓΋܁Γฦ͠ n ݸͷσʔλΛऔΓɼͦͷ౎౓৴ པ܎਺

    100(1 − α)%ͷ µ ͷ৴པ۠ؒ Iµ Λߏ੒ͨ͠৔߹ɼฏۉͯ͠ 100(1 − α) ݸͷ৴པ͕۠ؒ µ ΛؚΜͰ͍Δͱ͍͏͜ͱ • (1) Ͱߏ੒ͨ͠ Iµ ͷ௕͞͸ X + zα/2 σ0 √ n − ( X − zα/2 σ0 √ n ) = 2zα/2 σ0 √ n Ͱ͋Γɼn (σʔλ਺) ͕૿͑Ε͹খ͘͞ͳΔࣄ͕Θ͔Δ 39 / 49
  36. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਖ਼ن฼ूஂͰͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄະ஌) • ࣮ࡍʹ͸ɼ฼෼ࢄ͕෼͔͍ͬͯΔ͜ͱ͸ຆͲແ͍ • ฼෼ࢄ͕ط஌ͱ͍͏ԾఆΛऔΓ෷͏

    ਖ਼ن฼ूஂͰͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄະ஌) X1, . . . , Xn iid ∼ N ( µ, σ2 ) ͱ͠ɼσ2 ΋ະ஌ͱ͢Δɽ͜ͷͱ͖ɼ฼ฏۉ µ ͷ৴པ܎਺ 1 − α ͷ৴པ۠ؒ͸ Iµ = [ X − t ( n − 1; α 2 ) √ S2 u n , X + t ( n − 1; α 2 ) √ S2 u n ] (2) Ͱߏ੒͞ΕΔɽ • (2) ʹ͓͍ͯɼt(n − 1; α/2) ͸ࣗ༝౓ n − 1 ͷ t ෼෍ͷ্ଆ 100(α/2)% ఺Ͱ͋Δ 41 / 49
  37. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ਖ਼ن฼ूஂͰͷ฼ฏۉͷ۠ؒਪఆ (෼ࢄະ஌) • جຊతͳܗ͸ (1) ͱಉ͡

    • ҧ͏ͷ͸ҎԼͷ 2 ఺: 1 σ2 ͕ະ஌ͳͷͰɼਪఆྔͱͯ͠ඪຊෆภ෼ࢄ S2 u Λ࢖͏ 2 ౷ܭྔ T = X − µ √ S2 u /n ͸ࣗ༝౓ n − 1 ͷ t ෼෍ʹै͏ 42 / 49
  38. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ೚ҙͷ෼෍Ͱͷ฼ฏۉͷਪఆ • ฼ฏۉ µɼ฼෼ࢄ σ2 Λ΋ͭ฼ूஂ෼෍

    P(µ, σ2) ͔Βͷແ࡞ҝඪຊ X1, . . . , Xn ͔Β฼ฏۉΛ۠ؒਪఆ͢Δ ฼ฏۉͷਪఆ ҎԼͰ༩͑ΒΕΔ۠ؒ͸ɼ઴ۙతʹ฼ฏۉ µ ͷ৴པ܎਺ 1 − α ͷ৴ པ۠ؒʹͳΔɿ σ2 = σ2 0 ͕ط஌ͷ৔߹ [ X − zα/2 σ0 √ n , X − zα/2 σ0 √ n ] σ2 ͕ະ஌ͷ৔߹ [ X − zα/2 √ S2 0 n , X − zα/2 √ S2 0 n ] 43 / 49
  39. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ೚ҙͷ෼෍Ͱͷ฼ฏۉͷਪఆ • த৺ۃݶఆཧ͔Βɼ X − µ

    √ σ2 0 /n ∼ N (0, 1) , X − µ √ S2 u /n ∼ N (0, 1) ͕੒Γཱͭ͜ͱΛ࢖ͬͯಋ͘ • த৺ۃݶఆཧΛ࢖͏ͷͰɼ΋ͪΖΜେඪຊ (n → ∞) ͷ৔߹Λ૝ఆ 44 / 49
  40. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ฼෼ࢄͷ۠ؒਪఆ ਖ਼ن฼ूஂͰͷ฼෼ࢄͷ۠ؒਪఆ X1, . . .

    , Xn iid ∼ N ( µ, σ2 ) ͱ͢Δɽ͜ͷͱ͖ɼ฼෼ࢄ σ2 ͷ৴པ܎਺ 1 − α ͷ৴པ۠ؒ͸ Iσ2 = [ (n − 1)S2 u χ2(n − 1; α/2) , (n − 1)S2 u χ2(n − 1; 1 − α/2) ] Ͱߏ੒͞ΕΔɽ • χ2(n − 1; α/2) ͸ࣗ༝౓ n − 1 ͷ χ2 ෼෍ͷ্ଆ 100(α/2) ఺ • χ2(n − 1; 1 − α/2) ͸ࣗ༝౓ n − 1 ͷ χ2 ෼෍ͷ্ଆ 100(1 − α/2) ఺ 45 / 49
  41. ౷ܭతਪఆ໰୊ ఺ਪఆ ۠ؒਪఆ ࠷ޙʹ ൺ཰ͷ۠ؒਪఆ ൺ཰ͷ۠ؒਪఆ X1, . . .

    , Xn iid ∼ B(1, p) ͱ͢Δɽ͜ͷͱ͖ɼύϥϝʔλ p ͷ৴པ܎਺ 1 − α ͷ઴ۙతͳ৴པ۠ؒ͸ Ip = [ p − zα/2 √ p (1 − p) n , p + zα/2 √ p (1 − p) n ] , p := X Ͱ͋Δɽ • த৺ۃݶఆཧΛ࢖͑͹ಋ͚Δ 46 / 49