Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

数学カフェ 確率統計入門

kenmatsu4
November 29, 2023
60

数学カフェ 確率統計入門

2017/4/22(土)【第18回数学カフェ】【確率・統計・機械学習回】
https://connpass.com/event/54301/
「速習 確率・統計」

本講演では、主に確率、統計の初心者の方や、プログラマ、エンジニアの方でデータ分析に興味を持っている方が確率統計のエッセンスを数理的に理解できることを目標に、データの集約方法から、大数の法則や中心極限定理など、確率・統計で利用される非常に重要な数学の定理などを紹介します。

kenmatsu4

November 29, 2023
Tweet

Transcript

  1. ࣗݾ঺հ!LFONBUTV ɾ'BDFCPPLϖʔδ ɹIUUQTXXXGBDFCPPLDPNNBUTVLFOCPPL ɾ5XJUUFSΞΧ΢ϯτ ɹ!LFONBUTV ɾ2JJUBͰϒϩάΛॻ͍͍ͯ·͢ʢ౷ܭɺػցֶशɺ1ZUIPO౳ʣ ɹɹɹIUUQRJJUBDPNLFONBUTV ɹɹɹʢDPOUSJCVUJPOΛ௒͑·ͨ͠ʂʣ ɾझຯ ɹɹɹόϯυͰϕʔεΛ஄͍ͨΓ͍ͯ͠·͢ɻ

    ɹɹɹओʹ౦ೆΞδΞ΁όοΫύοΫཱྀߦʹߦͬͨΓ͠·͢ ɹɹʢΧϯϘδΞɺϛϟϯϚʔɺόϯάϥσγϡɺ৽ᙜ΢Πάϧ࣏ࣗ۠FUDʣ ཱྀߦͷࣸਅIUUQNBUTVLFOKJNEPDPN TwitterΞΠίϯ
  2. ౷ܭֶ ΧςΰϦ λΠτϧ Ұൠ ʲ౷ܭֶʳॳΊͯͷʮඪ४ภࠩʯʢ౷ܭֶʹ࠳ં͠ͳ͍ͨΊʹʣ Ұൠ ౷ܭֶجૅͷجૅ Ұൠ ෳࡶոحͳਖ਼ن෼෍ͷ਺ࣜͷҙຯΛಡΈղ͘ Ұൠ

    ʲ౷ܭֶʳਖ਼ن෼෍ͱΧΠೋ৐෼෍ͷؔ܎ΛՄࢹԽͯ͠ΈΔɻ Ұൠ ʲ౷ܭֶʳத৺ۃݶఆཧͷΠϝʔδΛάϥϑͰ௫Ή Ұൠ ʲ౷ܭֶʳ໬౓ͬͯԿʁΛάϥϑΟΧϧʹઆ໌ͯ͠ΈΔɻ Ұൠ ʲ౷ܭֶʳ30$ۂઢͱ͸Կ͔ɺΞχϝʔγϣϯͰཧղ͢Δɻ Ұൠ ʲ౷ܭֶʳ22ϓϩοτͷ࢓૊ΈΛΞχϝʔγϣϯͰཧղ͢Δɻ ճؼ෼ੳ 1ZUIPOΛ࢖ͬͨճؼ෼ੳͷ֓೦ͷղઆͦͷ̍ ճؼ෼ੳ QZUIPOΛ࢖ͬͨճؼ෼ੳͷ֓೦ͷղઆͦͷ̎ ճؼ෼ੳ 1ZUIPOΛ࢖ͬͨճؼ෼ੳͷ֓೦ͷղઆ൪֎ฤ̍ ճؼ෼ੳ ʲ౷ܭֶʳҰൠԽઢܗࠞ߹Ϟσϧ (-.. Λཧղ͢ΔͨΊͷՄࢹԽɻ ճؼ෼ੳ ʲ౷ܭֶʳʲ3ʳ෼Ґ఺ճؼΛ࢖ͬͯΈΔɻ ճؼ෼ੳ ʲ౷ܭֶʳ֎Ε஋͕͋ͬͯ΋͍͍ײ͡Ͱճؼ௚ઢΛҾ͍ͯΈΔ .$.$ ʲ౷ܭֶʳϚϧίϑ࿈࠯ϞϯςΧϧϩ๏ .$.$ ʹΑΔαϯϓϦϯάΛΞχϝʔγϣϯͰղઆͯ͠ΈΔɻ .$.$ ʲ౷ܭֶʳϋϛϧτχΞϯϞϯςΧϧϩ๏ΛΞχϝʔγϣϯͰՄࢹԽͯ͠ཧղ͢Δɻ .$.$ ௒༁1Z.$5VUPSJBMʢϚϧίϑ࿈࠯ϞϯςΧϧϩ๏ϑϨʔϜϫʔΫʣͦͷ̍ .$.$ ௒༁1Z.$5VUPSJBMʢϚϧίϑ࿈࠯ϞϯςΧϧϩ๏ϑϨʔϜϫʔΫʣͦͷ̎ʮ$BTFTUVEZ֬཰తϘϥ ςΟϦςΟϞσϧʯ .$.$ ʲ౷ܭֶʳTUBOͰϩδεςΟοΫճؼͷ࣮ߦΛׂͱৄ͘͠ղઆͯ͠ΈΔ X5JUBOJDEBUBTFU .$.$ ʲ౷ܭֶʳ.$.$αϯϓϦϯάͷ.VMUJQSPDFTTJOHԽ ओ੒෼෼ੳ ओ੒෼෼ੳ1$"Λ༻͍ͯखॻ͖਺ࣈΛ෼ੳ͢Δɻͦͷ̍ ओ੒෼෼ੳ ओ੒෼෼ੳ1$"Λ༻͍ͯखॻ͖਺ࣈΛ෼ੳ͢Δɻͦͷ̎ ࣌ܥྻղੳ ʲ౷ܭֶʳ<࣌ܥྻղੳ>"3."ϞσϧΛͻͨ͢Βϓϩοτͯ͠܏޲Λ͔ͭΉɻ ػցֶश ΧςΰϦ λΠτϧ Ұൠ ֬཰తޯ഑߱Լ๏ͱ͸Կ͔ɺΛ1ZUIPOͰಈ͔ͯ͠ղઆ͢Δ Ұൠ ʲػցֶशʳ-1ϊϧϜͬͯͳΜ͚ͩͬʁ Ұൠ ʲػցֶशʳϞσϧධՁɾࢦඪʹ͍ͭͯͷ·ͱΊͱ࣮ߦ X5JUBOJDσʔληοτ Ұൠ ʲػցֶशʳ00# 0VU0G#BH ͱͦͷൺ཰ खॻ͖਺ࣈ खॻ͖਺ࣈΛQZUIPOͰ΋ͯ͋ͦͿͦͷ̍ खॻ͖਺ࣈ खॻ͖਺ࣈΛQZUIPOͰ΋ͯ͋ͦͿͦͷ̎ʢࣝผ͢Δʣ खॻ͖਺ࣈ ʲػցֶशʳLOFBSFTUOFJHICPSNFUIPE L࠷ۙ๣๏ ΛࣗྗͰQZUIPOͰॻ͍ͯɺखॻ͖਺ࣈ ͷೝࣝΛ͢Δ %FFQ-FBSOJOH ʲػցֶशʳσΟʔϓϥʔχϯάϑϨʔϜϫʔΫ$IBJOFSΛࢼ͠ͳ͕Βղઆͯ͠ΈΔɻ %FFQ-FBSOJOH ʲσΟʔϓϥʔχϯάʳ$IBJOFSͰ"VUPFODPEFSΛࢼͯ݁͠ՌΛՄࢹԽͯ͠ΈΔɻ 4QBSL.-MJC ʲػցֶशʳJ1ZUIPO/PUFCPPLͰ4QBSLΛىಈͤͯ͞.-MJCΛࢼ͢ 4QBSL.-MJC ʲػցֶशʳ4QBSL.-MJCΛ1ZUIPOͰಈ͔ͯ͠Ϩίϝϯσʔγϣϯͯ͠ΈΔ 4QBSL.-MJC ʲػցֶशʳ:BIPP/FXTͷهࣄΛ.-MJCͷτϐοΫϞσϧ -%" ͰΫϥελϦϯά͢Δɻ ҟৗݕ஌ ʲػցֶशʳʮҟৗݕ஌ͱมԽݕ஌ষʯωΠϚϯϐΞιϯͷิ୊ͷࣜͷߦؒΛຒΊͯΈΔ ҟৗݕ஌ ʲػցֶशʳʮҟৗݕ஌ͱมԽݕ஌ʯ$IBQUFSͷਤΛ1ZUIPOͰඳ͍ͯΈΔɻ ҟৗݕ஌ 3ͷີ౓ൺਪఆύοέʔδEFOTSBUJPΛ1ZUIPO͔Βར༻͢Δ εύʔε ʲ1Z4UBOʳ(SBQIJDBM-BTTPΛ4UBOͰ΍ͬͯΈΔ ·ͱΊ ػցֶशϓϩϑΣογϣφϧγϦʔζྠಡձεϥΠυ·ͱΊ ϓϩάϥϛϯά ΧςΰϦ λΠτϧ 5XJUUFS ελόͷ5XJUUFSσʔλΛQZUIPOͰେྔʹऔಘ͠ɺσʔλ෼ੳΛࢼΈΔͦͷ̍ 5XJUUFS ελόͷ5XJUUFSσʔλΛQZUIPOͰେྔʹऔಘ͠ɺσʔλ෼ੳΛࢼΈΔͦͷ̎ 5XJUUFS ελόͷ5XJUUFSσʔλΛQZUIPOͰେྔʹऔಘ͠ɺσʔλ෼ੳΛࢼΈΔͦͷ̏ 5XJUUFS ελό5XJUUFSσʔλҐஔ৘ใͷϏδϡΞϥΠθʔγϣϯͱ෼ੳ 5XJUUFS 5XJUUFS4USFBN"1*σʔλʹରͯ͠ॳาతͳײ৘෼ੳΛࢼΈΔɻ 5XJUUFS ੈքͰ࠷΋Өڹྗͷ͋Δਓͷٕज़ܥπΠολʔϢʔβʔ৘ใΛQZUIPOͰऔಘ͢Δɻ ศརா ࢲత1ZUIPOศརா ਵ࣌ߋ৽ άϥϑΟΫε .BDͰ1ZUIPO͔ΒΞχϝʔγϣϯ(*'Λੜ੒͢Δ؀ڥઃఆ άϥϑΟΫε ʲ1ZUIPOʳNBUQMPUMJCʹΑΔάϥϑඳը࣌ͷ$PMPSNBQͷΧελϚΠζ $ZUIPO +VQZUFS/PUFCPPLͰ$ZUIPOΛ࢖͏<1ZUIPO> 8PSE$MPVE 8PSE$MPVEͰจষͷ୯ޠग़ݱස౓ΛՄࢹԽ͢Δɻ<1ZUIPO> άϥϑ%# 1ZUIPOͰάϥϑσʔλϕʔε/FPKೖ໳GPSϏΪφʔ .BD049޲͚ +VMJB +VQZUFSͰ+VMJBΛಈ͔ͯ͠ճؼ෼ੳΛ΍ͬͯΈΔɻ ਺ֶɺͦͷଞ ΧςΰϦ λΠτϧ ਺ֶ ʲ਺ֶʳʮ಺ੵʯͷҙຯΛάϥϑΟΧϧʹཧղ͢Δͱ৭ʑݟ͑ͯ͘Δͦͷ̍ ਺ֶ ʲ਺ֶʳݻ༗஋ɾݻ༗ϕΫτϧͱ͸Կ͔ΛՄࢹԽͯ͠ΈΔ ਺ֶ ΠΣϯηϯ +FOTFO ͷෆ౳ࣜͷ௚ײతཧղ ਺ֶ ϐβͰཧղ͢Δ෼਺ͷׂΓࢉͷҙຯ ·ͱΊ ʲ2JJUB"1*ʳ<౷ܭֶwػցֶश>ࠓ·Ͱͷ౤ߘهࣄͷ·ͱΊͱ෼ੳ΍ͬͯΈͨɻ 2JJUB౤ߘهࣄҰཡ
  3. ΧςΰϦ λΠτϧ 63- ౷ܭֶ جૅ͔ΒͷϕΠζ౷ܭֶྠಡձࢿྉୈষʮൺ཰ɾ૬ؔɾ৴པੑʯ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ౷ܭֶ ୈ̍̏ճ਺ֶΧϑΣʮૉ਺ʂʂʯೋ࣍ձ-5ࢿྉʮཚ਺ʂʂʯ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLMUSFW ౷ܭֶ

    ʮϕʔλ෼෍ͷಾʹഭΔʯୈճϓϩάϥϚͷͨΊͷ਺ֶษڧձ-5ࢿྉ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLMU ౷ܭֶ ෼ͰΘ͔Δ ൣғͷ ϕΠζ౷ܭֶ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ౷ܭֶ جૅ͔ΒͷϕΠζ౷ܭֶྠಡձࢿྉୈষϝτϩϙϦεɾϔΠεςΟϯάε๏ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ౷ܭֶ ʮશͯͷ֬཰͸ίΠϯ౤͚͛ʹ௨ͣʯ+BQBO3ൃදࢿྉ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLKBQBOS ౷ܭֶ جૅ͔ΒͷϕΠζ౷ܭֶྠಡձࢿྉୈষ֬཰ʹؔ͢ΔϕΠζͷఆཧ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ౷ܭֶ ౷ܭֶͷجૅͷجૅ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLTT ػցֶश /FVSBM/FUXPSLΛՄࢹԽͯ͠ΈΔʢ਺ֶΧϑΣ๨೥ձ-5ࢿྉʣ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLOFVSBMOFUXPSLMU ػցֶश %4-5ࡇΓʮ"6$͕վળͨͬͯ͠Ͳ͏͍͏͜ͱͰ͔͢ʁʯ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLETMUBVD ػցֶश ౷ܭతֶशͷجૅষલ൒ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ػցֶश 3BOEPN'PSFTUʹΑΔ෼ྨ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLSBOEPN GPSFTU ػցֶश ҟৗݕ஌ͱมԽݕ஌ୈষۙ๣๏ʹΑΔҟৗݕ஌ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ػցֶश ʮਂ૚ֶशʯษڧձ-5ࢿྉ$IBJOFS࢖ͬͯΈͨ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLMUDIBJOFS ػցֶश %FFQ-FBSOJOH$IBQ$POWPMVUJPOBM/FVSBM/FU IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLEFFQMFBSOJOHDIBQ DPOWPMVUJPOBMOFVSBMOFU ػցֶश ʮਂ૚ֶशʯୈ̒ষ৞ࠐΈχϡʔϥϧωοτ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLTT ਺ֶ ʮ಺ੵ͕ݟ͑Δͱ౷ܭֶ΋ݟ͑ΔʯୈճϓϩάϥϚͷͨΊͷ਺ֶษڧձൃදࢿྉ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPL ͦͷଞ ന͍ཅؾͳ΍ͭͱ1ZUIPOͰͨΘΉΕΔ IUUQTXXXTMJEFTIBSFOFUNBUTVLFOCPPLQZUIPO 4MJEFTIBSF౤ߘهࣄҰཡ
  4. هड़౷ܭ τʔλϧ ࠷ߴείΞ 990 ࠷௿είΞ 10 ฏۉείΞ 583.7 ඪ४ภࠩ 170.1

    http://www.toeic.or.jp/toeic/about/data/data_avelist/data_ave01_04.html http://www.toeic.or.jp/toeic/about/data/data_avelist/data_dist01_04.html ྫɿ50&*$ެ։ςετୈճͷࢼݧ ˠୈճͷडݧऀશһΛର৅ʹσʔλΛཁ໿͍ͨ͠ 
  5. هड़౷ܭ τʔλϧ ࠷ߴείΞ 990 ࠷௿είΞ 10 ฏۉείΞ 583.7 ඪ४ภࠩ 170.1

    ྫɿ50&*$ެ։ςετୈճͷࢼݧ ˠୈճͷडݧऀશһΛର৅ʹσʔλΛཁ໿͍ͨ͠ http://www.toeic.or.jp/toeic/about/data/data_avelist/data_ave01_04.html http://www.toeic.or.jp/toeic/about/data/data_avelist/data_dist01_04.html खݩͷσʔλΛ ཁ໿͍ͯ͠Δɻ ෼ੳͷର৅ͱ͍ͨ͠ਓ શһͷσʔλ͕ಘΒΕ͍ͯΔ ͷͰɺͦΕΛ·ͱΊΔ
  6. ख࣋ͪͷσʔλΛαϚϦͯ͠೺Ѳ͢ΔͨΊͷख๏ هड़౷ܭ D = { x1, x2, · · ·

    , xn } Oݸͷσʔλ FHOਓ͍Δͱ͋ΔΫϥεͷςετͷ఺ͳͲ جຊ౷ܭྔ ¯ x = 1 n n X i=1 xi ฏۉ 2 = 1 n n X i=1 ( xi ¯ x )2 ෼ࢄ = v u u t 1 n n X i=1 ( xi ¯ x )2 ඪ४ภࠩ ˞ ਪଌΛߦ͏࣌ͷ෼ࢄ͸ O ͰׂΔͱ͍͏࿩ ͕͋Γ·͕ͦ͢Ε͸ޙ΄ͲͷϖʔδͰɻ
  7. ෼ࢄɾඪ४ภࠩ ʮภࠩʯͱ͸ʁ *% ɹ ఺਺ ɹ ภࠩɹɹ   

                       
  8. ෼ࢄɾඪ४ภࠩ ʮภࠩʯͱ͸ʁ *% ɹ ఺਺ ɹ ภࠩɹɹ   

                        ֤σʔλͷฏۉ஋͔Βͷࠩͷ͜ͱ
  9. ෼ࢄɾඪ४ภࠩɿͷલʹฏۉภࠩ ͜ͷɺภࠩͷฏۉ஋ΛऔΓ͍͕ͨɾɾɾ *%ɹ ภࠩɹ ɹ     

             શ෦଍͢ͱ̌ʹͳͬͯ͠·͏ ࠨӈ௼Γ߹͍͕औΕΔͱ͜Ζ͕ ฏۉ஋ͳͷͰ
  10. ෼ࢄɾඪ४ภࠩɿͷલʹฏۉภࠩ *%ɹ ภࠩɹ ɹ ϓϥεԽ     

                    ൓స ͳͷͰɺϚΠφεΛऔͬͯΈΔ
  11. ෼ࢄɾඪ४ภࠩɿͷલʹฏۉภࠩ *%ɹ ภࠩɹ ɹ ϓϥεԽ     

                    ฏۉ  ภࠩͷฏۉ  ฏۉ͔Βͷڑ཭Λ ฏۉͨ͠΋ͷ ͳͷͰɺϚΠφεΛऔͬͯΈΔ
  12. ෼ࢄɾඪ४ภࠩɿͷલʹฏۉภࠩ = 1 n n X i=1 | xi ¯

    x | ฏۉภࠩ ภࠩΛ଍͠߹Θͤͯσʔλ਺OͰׂΔɻ ͭ·ΓฏۉΛͱ͍ͬͯΔɻ ภࠩΛશͯϓϥεʹม͑Δ ͨΊʹઈର஋ΛऔΔɻ *%ɹ ภࠩɹ ɹ ϓϥεԽ                      ฏۉ 
  13. ෼ࢄɾඪ४ภࠩ ภࠩ = 1 n n X i=1 ( xi

    ¯ x )2 ෼ࢄ ೋ৐ͨ͠ภࠩΛ଍͠߹Θͤͯσʔλ਺OͰׂΔɻ ͜ͷ৔߹΋ೋ৐ภࠩͷฏۉΛͱ͍ͬͯΔɻ ͭ·ΓɺΦϨϯδͷ໘ੵͷฏۉʹͳΔɻ ภࠩΛશͯϓϥεʹม͑ΔͨΊʹೋ৐͢Δɻ ʮೋ৐͢Δʯͱ͍͏͜ͱ͸໘ੵΛΠϝʔδͯ͠ྑ͍ɻ
  14. ෼ࢄɾඪ४ภࠩ ඪ४ภࠩ = v u u t 1 N N

    X i=1 ( xi ¯ x )2 ୯ҐΛ௕͞ʹ໭ͨ͠ ௕͞ ௕͞ ໘ੵ Y p ௕͞ ϧʔτ ໘ੵ͕௕͞ʹ΋ͲΔʂ ͷܭࢉΛ͢Δͱ
  15. ภࠩ஋ ภࠩ஋ ఺਺ฏۉ ඪ४ภࠩ º  ฏۉ఺ ඪ४ภࠩ఺  

     º  ฏۉͱͷภࠩΛඪ४ภࠩͰଌΓɺ̍ͭ෼Λͱͯ͠ ฏۉ஋ΛʹͳΔΑ͏ௐ੔ͨ͠΋ͷɻ
  16. ࣄ৅ʹ͍ͭͯ ! 2 ⌦ = {!1, !2, · · ·

    , !m } શࣄ৅ ඪຊۭؒ ࣄ৅ N௨Γͷ݁Ռ͕͋Δ ⌦ = { , } ཪ ද ྫɿίΠϯ౤͛ ද͸ ཪ͸ ࢼߦ͢Δͱ ! 2 { , } ཪ ද ͕ಘΒΕΔɻ ྫ͑͹ɺճ໨ !(1) = ཪ !(2) = !(n) = ද ཪ ͳͲ ճ໨ Oճ໨
  17. ྫɿαΠίϩ౤͛ ⌦ = {1, 2, 3, 4, 5, 6} ྫ͑͹ɺճ໨

    !(1) =  !(2) = !(n) =   ճ໨ Oճ໨ ྫɿ਎௕ʢ೔ຊਓ੒ਓஉੑສਓʣ͔Β ɹɹϥϯμϜʹநग़ ճ໨ ճ໨ Oճ໨ ⌦ = {!1, !2, · · · , !49870000 } ాத͞Μ !(1) = !43890298 = 171cm !(2) = !29184638 = 168cm ߴڮ͞Μ !(n) = !51398579 = 174cm ླ໦͞Μ 㱺 㱺 㱺
  18. ྫɿๅ͘͡ ୈճ਺ֶΧϑΣๅ͘͡ *%       

       ͋ͨΓ ୈճ !(1) = *% !(2) = *% *% ୈճ ୈճ !(n) = *% ୈճ ͋ͨΓɿສԁ ͸ͣΕɿ̌ԁ !(3) = ͋ͨΓ 㱺ԁ 㱺ສԁ 㱺ԁ 㱺ԁ !1 !2 !3 !4 !5 !6 !7 !8 !9 !10 = {!1, !2, !3, · · · , !10 } ! 2 ⌦ = {ID1, ID2, ID3, · · · , ID10}
  19. ֬཰ม਺ͱ͸ ๅ͘͡ͷྫ X = X(!) ࣄ৅Λ͋Δ࣮਺ʹରԠ෇͚ͨ΋ͷɻ ๅ͘͡ͷ৔߹౰બ ֹۚ ඪຊۭؒͷݩɹΛҾ਺ʹͱΓ࣮਺Λฦؔ͢਺ɻ ֬཰ม਺ࣗମʹ͸ෆنଇมಈཁૉ͸ͳ͘ɺͷબ͹Εํ

    ʹมಈཁૉ͕ଘࡏ͢Δɻ ⌦ ! ! X(!1) = 0 X(!2) = 0 X(!3) = 0 X(!4) = 0 X(!5) = 0 X(!6) = 0 X(!7) = 0 X(!8) = 0 X(!9) = 0 X(!10) = 100ສԁ ࣄ৅ʹֹۚΛ ׂΓ౰͍ͯͯΔ͚ͩ
  20. ๅ͘͡ͷྫ {! 2 ⌦ : X(!) 2 A} ୈճ਺ֶΧϑΣๅ͘͡ *%

              ͋ͨΓɿສԁ ͸ͣΕɿ̌ԁ !1 !2 !3 !4 !5 !6 !7 !8 !9 !10 ͋ͨΓ ͋ͨΓ A X(!) = 100  ສԁͷू߹ Ac X(!) = 0  ԁͷू߹ ! 5 or ! 9 ౰બֹ͕ۚສԁ Ͱ͋Δू߹ ౰બֹۚ ৚݅
  21. ֬཰ PX (A) = P(X 2 A) = P({! 2

    ⌦ : X(!) 2 A}) ৚݅ʹ౰ͯ͸·ΔΑ͏ͳ શࣄ৅ͷݩશͯ ⌦ ৚݅ ౰બֹۚສԁͱͳΔΑ͏ͳๅ͘͡ͰɺͦΕ͸ࠓճͷର৅ͷશࣄ৅ ͷதͰ͸ͳͷͰɺͦͷɺɹɹɹɹ͕ग़ݱ͢Δ֬཰ɻ !5, !9 !5, !9 શࣄ৅ PX (A) = #({! 2 ⌦ : X(!) 2 A}) #( ) = #(!5, !9) #( ) = 2 10 = 0.2 શࣄ৅
  22. ֬཰ͷఆٛ ίϧϞΰϩϑͷެཧ  ඇෛੑɿɹͲΜͳࣄ৅ͷू߹"ʹରͯ͠΋ ֬཰ͷ஋ʹϚΠφε͸ͳ͍ͷͰ  શࣄ৅ͷ֬཰ɿ ɹɹɹɹɹ PX(⌦) =

    1 શͯͷ૝ఆ͍ͯ͠Δࣄ৅ͷͲΕ͔͸ ඞͣൃੜ͢Δ  ՃࢉՃ๏ੑɿߴʑՃࢉݸͷू߹ྻ͕ ɹɹɹɹɹɹޓ͍ʹഉ൓ͳΒ͹ A1, A2, · · · PX ([iAi) = X i PX (Ai) A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 ʜ 0  PX(A)  1
  23. ֬཰෼෍ ֬཰͸ى͜Γ΍͢͞ͷࢦඪͰ͋ͬͨɻ·ͨɺ֬཰ม ਺͸ɺඪຊ্ۭؒͷݩΛҾ਺ʹऔΓ࣮਺Λฦؔ͢਺ Ͱ͋ͬͨɻ ྫ͑͹ɺͱͳΔू߹ͱ͍ͬͨΑ͏ʹɺ֬཰ ม਺ͷ஋ʹΑΓάϧʔϐϯάΛ ͨ͠ͱ͖ʹɺͦͷ਺Λ਺͑Δͱ X = X(!)

    ඪຊۭؒ ⌦ ͱͳΔΑ͏ͳू߹ A A !1 !2 !3 !4 !5 !6 !7 !8 !11 !10 !9 !12 !13 !14 !15 !16 B C D X(!) = 0 X(!) = 0 #A = #{! 2 ⌦ : X(!) = 0} = 7 #B = #{! 2 ⌦ : X(!) = 1} = 2 #C = #{! 2 ⌦ : X(!) = 2} = 4 #D = #{! 2 ⌦ : X(!) = 3} = 3
  24. ֬཰෼෍ ඪຊۭؒ ⌦ ͱͳΔΑ͏ͳू߹ A A !1 !2 !3 !4

    !5 !6 !7 !8 !11 !10 !9 !12 !13 !14 !15 !16 B C D X(!) = 0          ֬཰ 9 P(X = 0) = PX(A) = #{! 2 ⌦ : X(!) = 0} #⌦ = 7 16 P(X = 1) = PX (B) = #{! 2 ⌦ : X(!) = 1} #⌦ = 2 16 P(X = 2) = PX(C) = #{! 2 ⌦ : X(!) = 2} #⌦ = 4 16 P(X = 3) = PX(D) = #{! 2 ⌦ : X(!) = 3} #⌦ = 3 16 ֬཰ม਺ͷ஋͝ͱʹάϧʔϐϯάͯ֬͠཰ΛٻΊΔɻ
  25. ֬཰ม਺9͕ͷΑ͏ʹLݸͷҟͳΔ஋Λ ͱΔ৔߹ Λ9ͷ֬཰෼෍ͱݺͿɻ දهΛ؆୯ʹ͢ΔͨΊҎޙɺJΛলུ ֬཰෼෍ ֬཰ม਺͕཭ࢄͷ৔߹ { x1, x2, ·

    · · , xk } P ( X = xi) = f ( xi)          ֬཰ 9          ֬཰ 9 ֬཰ؔ਺ ྦྷੵ෼෍ؔ਺ F ( x ) = P ( X  x ) ֬཰ม਺9͕͋Δ஋YҎԼͰ͋Δ֬཰ Λྦྷੵ෼෍ؔ਺ͱ͍͏ɻ
  26. ֬཰෼෍ ֬཰ม਺͕࿈ଓͷ৔߹ ֬཰ม਺9͕௕͞ɺॏ͞ͳͲ࿈ଓ͢Δม਺ͷ৔߹ɻ࿈ଓͷ ৔߹͸ P ( x < X 

    x + x ) x + x x ͷΑ͏ʹখ͍۠ؒ͞Λߟ͑ɺͦͷؒʹೖΔ֬཰Λߟ͑Δɻ ۠ؒͷ෯Ͱ͜ͷ֬཰Λׂͬͯɺͱͨ͠ۃݶΛ x x ! 0 f ( x ) = lim x !0 P ( x < X  x + x ) x Λ֬཰ີ౓ؔ਺ͱݺͿɻ
  27. ֬཰෼෍ ֬཰ม਺͕࿈ଓͷ৔߹ 9͕BͱCͷؒʹೖΔ֬཰͸Λੵ෼ͯ͠ x + x x f ( a

    < x  b ) = Z a b f ( x ) dx Ͱ༩͑ΒΕΔɻྦྷੵ෼෍ؔ਺͸ɺ f ( x ) F ( x ) = P ( X  x ) = Z x 1 f ( u ) du ྦྷੵ෼෍ؔ਺ ֬཰ີ౓ؔ਺
  28. ϕϧψʔΠ෼෍ ද͸ ཪ͸ ࢼߦΛ̍౓ߦ͍ɺ੒ޭ͔ࣦഊͳͲ̎஋ ྫɿίΠϯ౤͛ ֬཰ؔ਺ P ( X =

    x ) = px(1 p )1 x ( x = 0 , 1) ύϥϝʔλʔ Qɿ ද ͕ग़Δ֬཰ ཭ࢄ
  29. ϕϧψʔΠ෼෍ # ϕϧψʔΠ෼෍͔ΒͷαϯϓϦϯάΛ࣮ߦ # ύϥϝʔλʔ p = 0.7 trial_size =

    10000 set.seed(71) # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ data <- rbern(trial_size, p) # ϕϧψʔΠ෼෍ͷ֬཰෼෍ dens <- data.frame(y=c((1-p),p)*trial_size, x=c(0, 1)) # άϥϑඳը ggplot() + layer(data=data.frame(x=data), mapping=aes(x=x), geom="bar", stat="bin", bandwidth=0.1 ) + layer(data=dens, mapping=aes(x=x, y=y), geom="bar", stat="identity", width=0.05, fill="#777799", alpha=0.7) 3ίʔυ ࢵɿཧ࿦తͳ֬཰ ࠇɿཚ਺͔Βੜ੒ͨ͠ώετάϥϜ
  30. ೋ߲෼෍ # ύϥϝʔλʔ p = 0.7 trial_size = 10000 sample_size

    = 30 set.seed(71) # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ gen_binom_var <- function() { return(sum(rbern(sample_size, p))) } result <- rdply(trial_size, gen_binom_var()) # ೋ߲෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dbinom(seq(sample_size), sample_size, 0.7))*trial_size # άϥϑඳը ggplot() + layer(data=resuylt, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=1, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(sample_size)+.5, y=y), geom="line", stat="identity", position="identity",colour="red" ) + ggtitle("Bernoulli to Binomial.") ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ 3ίʔυ
  31. ϙϫιϯ෼෍ ηοτճ਺ O  ˠ 㱣 ɺ̍ճ͋ͨΓ੒ޭ཰Q  ˠ 

    OQΛҰఆͱͨ࣌͠ͷ෼෍ ྫɿ๮ͷইͷνΣοΫΛߟ͑ΔɻDN෯Ͱইͷ༗ແΛ Λௐ΂ΔɻϕϧψʔΠࢼߦͷ܁Γฦ͠ ˠ ೋ߲෼෍ ˠແݶʹ෼ׂͯ͠ϙΞιϯ෼෍ɻ DN DN DN DN DN DN DN DN DN DN DN શ෦Ͱই͕̓ͭ DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN 㱣  ʹ෼ׂ ཭ࢄ
  32. ֬཰ؔ਺ ύϥϝʔλʔ ͜ͷྫͷ৔߹ɺ๮Ұຊ͋ͨΓͷইͷฏۉతͳ਺ Еɿฏۉੜىճ਺ P ( X = x )

    = e x x ! ( x = 1 , 2 , · · · , 1) ЕOQͷؔ܎͕อͨΕ͍ͯΔ  ๮̍ຊ͋ͨΓͷইͷ਺ ͷ෼෍ˠϙΞιϯ෼෍ ্ݶ͕ͳ͘ͳͬͨʂ ϙΞιϯ෼෍ ཭ࢄ
  33. ϙΞιϯ෼෍ trial_size = 5000; width <- 1; # ΋ͱ΋ͱͷ໰୊ઃఆ p

    = 0.7; n = 10; np <- p*n # n!∞ɺp!0ɺnp=Ұఆ n = 100000; p <- np/n # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ gen_binom_var <- function() { return(sum(rbern(n, p))) } result <- rdply(trial_size, gen_binom_var()) # ϙΞιϯ෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dpois(seq(20), np))*trial_size # άϥϑඳը ggplot() + layer(data=result, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(20)+.5, y=y), geom="line", stat="identity", position="identity", colour="red" ) + ggtitle("Bernoulli to Poisson.") ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ 3ίʔυ
  34. ਖ਼ن෼෍ ೋ߲෼෍ͷOΛେ͖͘͢Δͱਖ਼ن෼෍ͰۙࣅͰ͖Δɻ ֬཰ີ౓ؔ਺ ύϥϝʔλʔ Мɿඪ४ภࠩ Жɿฏۉ஋ f(x) = 1 p

    2⇡ 2 exp ⇢ 1 2 (x µ) 2 2 ( 1 < x < 1) ྫɿࢮ͵·ͰϑϦʔεϩʔ౤͛ͯܭԿճೖ͔ͬͨ ࿈ଓ
  35. ਖ਼ن෼෍ ϙΞιϯ෼෍ͱͷҧ͍ DN DN DN DN DN DN DN DN

    DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN DN ʜ DN DN DN DN DN DN DN DN DN DN ˠ㱣DN DN DN DN DN DN DN DN DN DN Ԇʑͱ৳͹͢ ࿈ଓ
  36. ਖ਼ن෼෍ # ύϥϝʔλʔ n <- 10000; p <- 0.7; trial_size

    = 10000 width=10 # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ gen_binom_var <- function() { return(sum(rbern(n, p))) } result <- rdply(trial_size, gen_binom_var()) # ਖ਼ن෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dnorm(seq(6800,7200), mean=n*p, sd=sqrt(n*p*(1-p)))*trial_size*width) # άϥϑඳը ggplot() + layer(data=result, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(6800,7200), y=y), geom="line", stat="identity", position="identity", colour="red") + ggtitle("Bernoulli to Normal.") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒
  37. ඪ४ਖ਼ن෼෍ # ύϥϝʔλʔ n <- 10000; p <- 0.7 trial_size

    = 30000 width=0.18 # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ gen_binom_var <- function() { return(sum(rbern(n, p))) } result <- rdply(trial_size, gen_binom_var()) m <- mean(result$V1); sd <- sd(result$V1); result <- (result - m)/sd # ඪ४ਖ਼ن෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dnorm(seq(-4,4,0.05), mean=0, sd=1)*trial_size*width) # άϥϑඳը ggplot() + layer(data=result, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(-4,4,0.05), y=y), geom="line", stat="identity", position=“identity", colour="red" ) + ggtitle("Bernoulli to Standard Normal.") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒
  38. ฏۉΛʹͣΒ͢ Oճ࣮ࢪ ίΠϯ౤͛ දͷ֬཰Q Oˠ㱣 ΧΠೋ৐෼෍ ฏۉΛʹͣΒ͢ ඪ४ภࠩΛʹ ॖΊΔ ฏۉΛʹͣΒ͢

    Lͷͱ͖ ೋ৐ͨ͠ͱ͜Ζ ʹੵΜͰ͍͘ Lͷͱ͖ Lͭ αϯϓϦϯά͢Δ Lͭͷ௕͞Λ ଍ͨ͠΋ͷΛ ϓϩοτ͢Δ ࿈ଓ
  39. ΧΠೋ৐෼෍ # ύϥϝʔλʔ p <- 0.7; n <- 1000; trial_size

    <- 100000; width <- 0.3; df <- 3 # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒(3·Θ͠) gen_binom_var <- function() { return(sum(rbern(n, p))) } gen_chisq_var <- function() { result <- rdply(trial_size, gen_binom_var()) return(((result$V1 - mean(result$V1))/sd(result$V1))**2) } # ࣗ༝౓dfͷ෼͚ͩੜ੒͢Δ result <- rlply(df, gen_chisq_var(),.progress = "text") res <- data.frame(x=result[[1]] + result[[2]] + result[[3]]) # ΧΠೋ৐෼෍ͷີ౓ؔ਺(ࣗ༝౓=3) xx <- seq(0,20,0.1) dens <- data.frame(y=dchisq(x=xx, df=df)*trial_size*width) # άϥϑඳը ggplot() + layer(data=data, mapping=aes(x=x), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=xx, y=y), geom="line", stat="identity", position="identity", colour="blue" ) + ggtitle("Bernoulli to Chisquare") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒
  40. ࢦ਺෼෍ ϙΞιϯ෼෍͕୯Ґ௕ʢ΋͘͠͸୯Ґ࣌ؒʣʹฏۉ Կճੜى͢Δ͔ɺΛද͢෼෍Ͱ͕͋ͬͨɺಉ͡ࣄ৅ Λҧ͏֯౓Ͱଊ͑௚ͨ͠ͷ͕ࢦ਺෼෍ɻ DN DN DN DN DN DN

    DN DN DN DN DN શ෦Ͱই͕̓ͭ ϙΞιϯ෼෍తߟ͑ํ ࢦ਺෼෍తߟ͑ํ ࣍ൃੜ͢Δ·ͰʹɺͲͷ͘Β͍ͷڑ཭ ࣌ؒ ͔ ࿈ଓ ࠓ೔͸εΩοϓ
  41. trial_size = 7000; width <- .01; # ΋ͱ΋ͱͷ໰୊ઃఆ p =

    0.7; n = 10; np <- p*n; # n!∞ɺp!0ɺnp=Ұఆ n = 10000; p <- np/n # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ gen_exp_var <- function() { cnt <- 0 while (TRUE) { cnt <- cnt + 1 if (rbern(1, p)==1){ return(cnt) # 1͕ग़ͨΒͦΕ͕Կճ໨͔Λฦ͢ } } } data <- data.frame(x=rdply(trial_size, gen_exp_var())/n) names(data) <- c("n", "x") # ࢦ਺෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dexp(seq(0, 1.5, 0.1), np)*trial_size*width) ggplot() + layer(data=data, mapping=aes(x=x), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(0, 1.5, 0.1), y=y), geom="line", stat="identity", position="identity", colour="red" ) + ggtitle("Bernoulli to Exponential.") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ ࢦ਺෼෍
  42. trial_size = 7000; width <- .035; # ΋ͱ΋ͱͷ໰୊ઃఆ p =

    0.7; n = 10; np <- p*n; # n!∞ɺp!0ɺnp=Ұఆ n = 10000; p <- np/n; alpha <- 5 # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ get_interval <- function(){ cnt <- 0 while (TRUE) { cnt <- cnt + 1 if (rbern(1, p)==1){ return(cnt) } } } gen_exp_var <- function() { data <- data.frame(x=rdply(trial_size, get_interval())/n) names(data) <- c("n", "x") return(data) } result <- rlply(alpha, gen_exp_var()) data <- data.frame(x=result[[1]]$x + result[[2]]$x + result[[3]]$x + result[[4]]$x + result[[5]]$x) # ΨϯϚ෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dgamma(seq(0, 3,.01), shape=alpha, rate=np)*trial_size*width) ggplot() + layer(data=data, mapping=aes(x=x), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(0,3,.01), y=y), geom="line", stat="identity", position="identity", colour="red" ) + ggtitle("Bernoulli to Gamma") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ ΨϯϚ෼෍
  43. ٯΨϯϚ෼෍ ֬཰ີ౓ؔ਺ ύϥϝʔλʔ f(x, ↵, ) = ↵ (↵) x

    (↵+1) exp ✓ x ◆ (0  x < 1) ୯Ґ௕ʢ࣌ؒʣ͋ͨΓЌճൃੜ͢Δࢦ਺෼෍ͷЋݸͷ࿨ͷ ֬཰෼෍Λߟ͑ͨ࣌ɺΨϯϚ෼෍ͱͳΔ Xi ⇠ Exp( ) Z = ↵ X i=1 Xi ⇠ (↵, ) 1/Z ⇠ IG(↵, ) ͜ͷ࣌ɺ;ͷٯ਺͕ै͏෼෍ΛٯΨϯϚ෼෍ͱݴ͏ɻ ࿈ଓ ࠓ೔͸εΩοϓ
  44. trial_size = 7000; width <- .; # ΋ͱ΋ͱͷ໰୊ઃఆ p =

    0.7; n = 10; np <- p*n; # n!∞ɺp!0ɺnp=Ұఆ n = 10000; p <- np/n; alpha <- 5 # ϕϧψʔΠ෼෍ʹै͏ཚ਺ੜ੒ get_interval <- function(){ cnt <- 0 while (TRUE) { cnt <- cnt + 1 if (rbern(1, p)==1){ return(cnt) } } } gen_exp_var <- function() { data <- data.frame(x=rdply(trial_size, get_interval())/n) names(data) <- c("n", "x") return(data) } result <- rlply(alpha, gen_exp_var()) data <- data.frame(x=1/(result[[1]]$x + result[[2]]$x + result[[3]]$x + result[[4]]$x + result[[5]]$x)) # ٯΨϯϚ෼෍ͷີ౓ؔ਺ dens <- data.frame(y=dinvgamma(seq(0, 23,.01), shape=5, rate=1/np)*trial_size*width) ggplot() + layer(data=data, mapping=aes(x=x), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=seq(0,3,.01), y=y), geom="line", stat="identity", position="identity", colour="red" ) + ggtitle("Bernoulli to Inversegamma") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ ٯΨϯϚ෼෍
  45. ඪ४Ұ༷෼෍ ίΠϯ౤͛ දͷ֬཰Q Rճ࣮ࢪ ࢼߦ݁ՌΛ֤ܻʹׂΓ౰ͯ ද ཪ ද ཪ ද

    ཪ ճ໨ ճ໨ Rճ໨ ˞΋ͬͱޮ཰ͷྑ͍΍Γํ΋͋Δͱࢥ͍·͕͢෼͔Γ΍͢͞ͷͨΊʜ Z = x1(1 / 2)1 + x2(1 / 2)2 + · · · + xq(1 / 2)q ࿈ଓ
  46. width <- 0.02 p <- 0.5; sample_size <- 1000 trial_size

    <- 100000 gen_unif_rand <- function() { # sample_sizeܻͷ2ਐগ਺ΛϕϧψʔΠ෼෍ʹ # ै͏ཚ਺͔Βੜ੒ return (sum(rbern(sample_size, p) * (rep(1/2, sample_size) ** seq(sample_size)))) } gen_rand <- function(){ return( rdply(trial_size, gen_unif_rand()) ) } system.time(res <- gen_rand()) ggplot() + layer(data=res, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + ggtitle("Bernoulli to Standard Uniform") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ ඪ४Ұ༷෼෍
  47. ֬཰ີ౓ؔ਺ ύϥϝʔλʔ BɿԼݶ Cɿ্ݶ f(x, a, b) = ⇢ (b

    a) 1 (a  x  b) 0 (otherwise) B͔ΒCͷؒͰ͸౳֬཰Ͱൃੜ͢ΔΑ͏ͳݱ৅Λ ද͢෼෍ Ұ༷෼෍ ࿈ଓ ࠓ೔͸εΩοϓ
  48. a <- 5 b <- 8; width <- 0.05 p

    <- 0.5 sample_size <- 1000 trial_size <- 500000 gen_unif_rand <- function() { # sample_sizeܻͷ2ਐগ਺ΛϕϧψʔΠ෼෍ʹ # ै͏ཚ਺͔Βੜ੒ return (sum(rbern(sample_size, p) * (rep(1/2, sample_size) ** seq(sample_size)))) } gen_rand <- function(){ return( rdply(trial_size, gen_unif_rand()) ) } system.time(res <- gen_rand()) res$V1 <- res$V1 * (b-a) + a ggplot() + layer(data=res, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + ggtitle("Bernoulli to Uniform") + xlim(4,9) 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ Ұ༷෼෍
  49. ϕʔλ෼෍ ֬཰ີ౓ؔ਺ ύϥϝʔλʔ Ћɿฒ΂ସ͑ͨ͋ͱͷαϯϓϦϯά͢Δϙδγϣϯ Ќɿಉ͘͡ϙδγϣϯ͕ͩɺޙΖ͔Β਺͑ͨͱ͖ͷ΋ͷ f ( x, ↵, )

    = 1 B ( ↵, )x ↵ 1(1 x ) 1 (0 < x < 1) ಠཱʹඪ४Ұ༷෼෍ʹै͏ Ћ Ќ ݸͷ֬཰ม਺ Λେ͖͞ͷॱʹฒ΂ସ͑ͨͱ͖ɺখ͍͞ํ͔Β Ћ൪Ίʢେ͖͍ํ͔Β͸Ќ൪໨ʣͷ֬཰ม਺9ͷ෼෍͕ ϕʔλ෼෍# Ћ Ќ ͱͳΔɻ ˠ# ɾ ͸ϕʔλؔ਺ Xi ⇠ U(0, 1) iid (i = 1, 2, · · · , ↵ + 1) ʜ ʜ Ћݸ Ќݸ ࿈ଓ ࠓ೔͸εΩοϓ
  50. width <- 0.03; p <- 0.5 digits_length <- 30; set_size

    <- 3 trial_size <- 30000 gen_unif_rand <- function() { # digits_lengthܻͷ2ਐগ਺ΛϕϧψʔΠ෼෍ # ʹै͏ཚ਺͔Βੜ੒ return (sum(rbern(digits_length, p) * (rep(1/2, digits_length) ** seq(digits_length)))) } gen_rand <- function(){ return( rdply(set_size, gen_unif_rand())$V1 ) } unif_dataset <- rlply(trial_size, gen_rand, .progress='text') p <- ceiling(set_size * 0.5); q <- set_size - p + 1 get_nth_data <- function(a){ return(a[order(a)][p]) } disp_data <- data.frame(lapply(unif_dataset, get_nth_data)) names(disp_data) <- seq(length(disp_data)); disp_data <- data.frame(t(disp_data)) names(disp_data) <- "V1" x_range <- seq(0, 1, 0.001) dens <- data.frame(y=dbeta(x_range, p, q)*trial_size*width) ggplot() + layer(data=disp_data, mapping=aes(x=V1), geom="bar", stat = "bin", binwidth=width, fill="#6666ee", color="gray" ) + layer(data=dens, mapping=aes(x=x_range, y=y), geom="line", stat="identity", position="identity", colour="red" ) + ggtitle("Bernoulli to Beta") 3ίʔυ ੺ͷۂઢɿཧ࿦తͳ֬཰ ώετάϥϜɿཚ਺͔Βੜ੒ ϕʔλ෼෍
  51. E[X] = X( )P( ) + X( )P( ) =

    0 ⇥ 0.8 + 1, 000, 000 ⇥ 0.2 = 200, 000 ظ଴஋ ͸ͣΕԁ Q ͋ͨΓສԁ   ֬཰ม਺ͷ஋ͱͦͷ֬཰Λֻ͚͋Θ͑ͤͯͨͨ͠΋ͷɻ ฏۉతʹಘΒΕΔ஋ͱղऍͰ͖Δɻ ͸ͣΕ ͋ͨΓ ͋ͨΓ E[ X ] = X x xp ( x ) ͭ·Γ ͷΑ͏ʹఆٛ͞ΕΔɻͰදݱ ͞ΕΔ͜ͱ΋ଟ͍ɻ ֬཰ม਺ ͷ஋ ֬཰ µ ͸ͣΕ
  52. ظ଴஋ ೋ߲෼෍ͷྫ  O Yͷೋ߲෼෍ ೋ߲܎਺ ✓ n x ◆

    = n ! ( n x )! x ! E[ X ] = n X x =0 xP ( x ) = n X x =0 x ✓ n x ◆ px(1 p )n x = n X x =0 x n ! ( n x )! x !px(1 p )n x = n X x =0 n ( n 1)! ( n x )!( x 1)!px(1 p )n x = np n X x =0 ✓ n 1 m 1 ◆ p ( x 1)(1 p )( n 1) ( x 1) = np
  53. ظ଴஋ Var[ X ] = E[( X E [ X

    ])2] = X x ( x E[ x ])2 P ( x ) = 2 ɹ͔Βͷ৐ภࠩʹରͯ͠ɺ֬཰ͷ஋ΛॏΈͱͯ͠ Ճॏฏۉͨ͠΋ͷɻࢄΒ͹Γͷई౓ɻ µ
  54. Var[ x ] = E[( X E[ X ])2] =

    Z 1 1 ( x E [ x ])2 f ( x ) dx = 2 ظ଴஋ ࿈ଓͷ֬཰ม਺ͷ৔߹ ظ଴஋ ෼ࢄ E[ X ] = Z 1 1 xf ( x ) dx = µ
  55. ظ଴஋ ֬཰ม਺Λؔ਺Ͱม׵͔ͯ͠Βظ଴஋ΛͱΔ͜ͱ΋ྑ͘ ߦΘΕΔɻ E[ g ( X )] = Z

    1 1 g ( x ) f ( x ) dx g(X) = (X E[X])2 ɹɹɹɹɹɹɹɹɹɹͱ͓͘ͱɺ෼ࢄ͕දݱͰ͖Δɻ ظ଴஋ΦϖϨʔλʔ E[ · ] = Z 1 1 · f ( x ) dx
  56. ɹɹɹɹɹͱͨ࣌͠ͷظ଴஋ɺ ظ଴஋ ੵ཰ g ( x ) = x k

    E[ g ( X )] = E[ X k] = Z 1 1 x k f ( x ) dx ͸ɺݪ఺·ΘΓͷL࣍ͷੵ཰ͱݺ͹ΕΔɻ ·ͨͱ͋ΒΘ͢ɻ ͳͷͰɺݪ఺·ΘΓͷ࣍ͷੵ཰ͱ͸ฏۉͷ͜ͱͱͳΔɻ µ0 k
  57. ظ଴஋ ޙͰ࢖͏ܭࢉ E[ cX ] = c E[ X ]

    * E[ cX ] = Z 1 1 cxf ( x ) dx = c Z 1 1 xf ( x ) dx = c E[ X ]
  58. ظ଴஋ Var[ cX ] = c 2Var[ X ] *

    Var[ cX ] = Z 1 1 ( cx E[ cx ])2 f ( x ) dx = Z 1 1 ( cx cµ )2 f ( x ) dx = Z 1 1 c 2( x µ )2 f ( x ) dx = c 2 Z 1 1 ( x µ )2 f ( x ) dx = c 2Var[ X ] ޙͰ࢖͏ܭࢉ
  59. ଟ࣍ݩͷ֬཰ม਺ ̍ͭͷ֬཰ม਺͸ɺ̍ͭͷσʔλʹ૬౰͢Δɻ ݱ࣮ͷσʔλ෼ੳͰ͸ଟ਺ͷσʔλ͔ΒਪଌΛߦ͏ͷͰ ଟ࣍ݩͷ֬཰ม਺ͷཧղ͕ॏཁͱͳΔɻ ·ͣ͸̎࣍ݩͷ৔߹͔Βɻ ͜͜ʹೖΔ֬཰ Λߟ͑ͱ͢Δͱ P ( x

    < X 5 x + x, y < Y 5 y + y ) x, y ! 0 f ( x, y ) = lim x, y !0 P ( x < X 5 x + x, y < Y 5 y + y ) ͜ͷɹɹɹɹΛಉ࣌֬཰ີ౓ؔ਺ͱ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹݺͿ f ( x, y )
  60. ଟ࣍ݩͷ֬཰ม਺ g ( x ) = Z 1 1 f

    ( x, y ) dy h ( y ) = Z 1 1 f ( x, y ) dx g ( x ) h(y) पลԽ ม਺ ม਺ ม਺ ม਺ YͱZͷݸʑͷ֬཰෼෍ΛٻΊΔ͜ͱΛपลԽͱ͍͏ ෼෍ΛٻΊ͍ͨม਺Ҏ֎ͷ ม਺ʹ͍ͭͯੵ෼ͯ͠ٻΊΔɻ ͬͪ͜ʹͭͿ͢ ͬͪ͜ʹ ͭͿ͢
  61. ଟ࣍ݩͷ֬཰ม਺ EX,Y [ g ( X, Y )] = Z

    1 1 Z 1 1 g ( x, y ) f ( x, y ) dxdy ̎ͭͷ֬཰ม਺ͷؔ਺ͷظ଴஋ ྫ g ( x, y ) = x 0.8 y 0.8 ( x, y ) ⇠ N ((4 , 4) , S ) S =  1 0.5 0.4 1 EX,Y [ g(X, Y )] = 8.02 㱺
  62. ଟ࣍ݩͷ֬཰ม਺ g(X, Y ) = (X µX)(Y µY ) ڞ෼ࢄ

    ͱͯ͠ظ଴஋ΛͱΔͱ ڞ෼ࢄ Cov[ X, Y ] = E [( X µX)( Y µY )] ͕ಘΒΕΔɻ
  63. g(X, Y ) = (X µX)(Y µY ) ϚΠφε ϚΠφε

    ϓϥε ϓϥε µX ϚΠφε ϚΠφε ϓϥε ϓϥε µX ϚΠφε ϚΠφε ϓϥε ϓϥε ϚΠφε ϚΠφε ϓϥε ϓϥε µX µX µY µY µY µY ڞ෼ࢄͷ௚ײతཧղ S1 = S2 = S3 = S4 =  1 0.8 0.8 1  1 0.8 0.8 1  1 0 0 1  1 0.999 0.999 1 Cov[ X, Y ] = E [( X µX)( Y µY )] ( x, y ) ⇠ N ((4 , 4) , S )
  64. ଟ࣍ݩͷ֬཰ม਺ ಠཱͳ֬཰ม਺ ಉ࣌֬཰ɹɹɹɹΛ f ( x, y ) f (

    x, y ) = g ( x ) h ( y ) ͷΑ͏ʹ̎ͭͷपล֬཰ͷੵͰදͤΔ࣌ɺ ɹɹYͱZ͸ಠཱͳ֬཰ม਺Ͱ͋Δ ͱ͍͏ɻ
  65. ଟ࣍ݩͷ֬཰ม਺ ಠཱͳ֬཰ม਺ͷڞ෼ࢄ Cov[X, Y ] = E [(X µX)(Y µY

    )] = Z 1 1 Z 1 1 (x µX )(y µy)f(x, y)dxdy = Z 1 1 (x µX)g(x)dx Z 1 1 (y µy)h(y)dy f ( x, y ) = g ( x ) h ( y )  ฏۉपΓͷ࣍ͷੵ཰  ฏۉपΓͷ࣍ͷੵ཰ = 0
  66. ଟ࣍ݩͷ֬཰ม਺ ʮͭʯ͔Βʮଟ਺ʯ΁ͷ֦ு ( x1, x2, · · · , xn)

    ͷOݸͷ֬཰ม਺͕͋Δ࣌ɺ ɹͷपล֬཰͸ɺҎ֎ͷ֬཰ม਺શͯͰੵ෼ͯ͠ x1 f ( x1) = Z · · · Z f ( x1, · · · , xn) dx2 · · · dxn x1 ಉ࣌֬཰ີ౓ ·ͨɺ f ( x1, · · · , xn) = f ( x1) · · · f ( xn) ͕੒Γཱͭ࣌ɺɹɹɹɹɹ͸ޓ͍ʹಠཱͰ͋Δɺͱ͍͏ɻ x1 · · · xn
  67. ఆཧɿɹɹɹɹɹ͸ޓ͍ʹಠཱͳ֬཰ม਺ͱ͢Δɻɹɹɹɹ ɹɹɹɹɹɹɹɹ͕ͦΕͧΕɹɹɹɹɹͷΈͷؔ਺ͷ࣌ɺ ଟ࣍ݩͷ֬཰ม਺ x1 · · · xn g1( x1)

    , · · · , gn( xn) x1 · · · xn E[ n Y i=1 gi( xi)] = n Y i=1 E[ gi( xi)] ͕੒Γཱͭɻ ֻ͚ࢉͷظ଴஋͸ ظ଴஋ͷֻ͚ࢉʹग़དྷΔ ূ໌ɿ E[ g1( x1)] E[ gn( xn)] E[ n Y i=1 gi( xi)] = Z 1 1 · · · Z 1 1 g1( x1) · · · gn( xn) f ( x1, · · · , xn) dx1 · · · dxn = Z 1 1 g1( x1) f ( x1) dx1 · · · Z 1 1 gn( xn) f ( xn) dxn = n Y i=1 E[ gi( xi)] f ( x1) · · · f ( xn) ಠཱͳͷͰ
  68. ଟ࣍ݩͷ֬཰ม਺ ূ໌ɿ ฏۉ E[ c1x1 + · · · +

    cnxn] = Z 1 1 · · · Z 1 1 ( c1x1 + · · · + cnxn) f ( x1 · · · , xn) dx1 · · · dxn = c1 Z 1 1 · · · Z 1 1 x1f ( x1 · · · , xn) dx1 · · · dxn · · · cn Z 1 1 · · · Z 1 1 xnf ( x1 · · · , xn) dx1 · · · dxn = c1 Z 1 1 x1dx1 · · · cn Z 1 1 xndxn = c1µ1 + · · · + cnµn f ( x1) · · · f ( xn) f ( x1) · · · f ( xn) µ1 µn = c1 Z 1 1 x1dx1 · · · cn Z 1 1 xndxn = c1µ1 + · · · + cnµn
  69. ଟ࣍ݩͷ֬཰ม਺ ূ໌ɿ ෼ࢄ Var[ c1x1 + · · · +

    cnxn] = E[{( c1x1 + · · · + cnxn) E[ c1x1 + · · · + cnxn]}2] = E[{ c1( x1 µ1) + · · · + c1( x1 µ1)}2] = E[ n X i=1 c 2 i ( xi µi)2 + X i6=j cicj( xi µj)( xi µj)] = n X i=1 c 2 i E[( xi µi)2] + X i6=j cicjE[( xi µj)( xi µj)] = c 2 1 2 1 + · · · + c 2 n 2 n c1µ1 + · · · + cnµn = E[ xi µi]E[ xj µj] = 0 ಠཱͳͷͰ = 2 i
  70. ɹɹɹɹ͸ɺޓ͍ʹಠཱ͔ͭɺಉҰͷ෼෍͔Βͷ֬཰ม਺ ͱ͢Δɻ ͜ͷޓ͍ʹಠཱ͔ͭಉҰͷ෼෍Ͱ͋Δ͜ͱΛ JJE*OEFQFOEFOUBOE*EFOUJDBMMZ%JTUSJCVUFEͱ͍͏ɻ ඪຊநग़ αϯϓϦϯά αϯϓϦϯάͨ֬͠཰ม਺ͷ෼෍ ඪຊ நग़ϓϩηε ฼ूஂ

    ਪଌϓϩηε x1 · · · xn ͜ͷͱ͖ɺOݸͷ֬཰ม਺ͷ഑ྻͷ͜ͱΛ ֬཰ඪຊͱݺͿɻ x1 · · · xn xi ͸฼ूஂ͔Βແ࡞ҝநग़͞Εͨ΋ͷͰ͋Γɺ฼ूஂͷฏ ۉΛ฼ฏۉɺ฼ूஂͷ෼ࢄɹΛ฼෼ࢄͱ͍͏ɻ µ 2 (µ, 2)
  71. ඪຊநग़ αϯϓϦϯά ඪຊ࿨ͷฏۉɺ෼ࢄ ಉ༷ʹɹɹɹɹɹΛJJEͰ͋Δ֬཰ม਺ͱ͠ɺͦͷ࿨ x1 · · · xn T

    = x1 + · · · + xn Λඪຊ࿨ͱఆٛ͢Δɻ ฏۉ E[ T ] = E[ x1 + · · · + xn] = E[ x1] + · · · + E[ xn] = nµ ෼ࢄ Var[ T ] = Var[ x1 + · · · + xn] = Var[ x1] + · · · + Var[ xn] = n 2 2 1 = · · · = 2 n c1 = · · · = cn = 1 Var[ c1x1 + · · · + cnxn] = c 2 1 2 1 + · · · + c 2 n 2 n ͔ͭ ͷͱ͖ͷ Λར༻
  72. ෼ࢄ͸฼෼ࢄɹΛOͰׂͬͨ΋ͷʹͳΔɻͭ·Γɺ ෼ࢄ͸αϯϓϧαΠζΛ૿΍ͤ͹૿΍͢΄Ͳখ͘͞ͳΔʂ ඪຊநग़ αϯϓϦϯά ͜͜Ͱඪຊฏۉ ¯ x = 1 n

    n X i=1 xi = 1 n T ͷظ଴஋ʢฏۉʣ͸ E[¯ x ] = 1 n E[ T ] = n · 1 n µ = µ ͷΑ͏ʹ฼ฏۉɹͱҰக͠ɺ Var[¯ x ] = Var[ 1 n T ] = 1 n 2 Var[ T ] = 2 n ௒ॏཁʂ ௒ॏཁʂ µ 2
  73. େ਺ͷ๏ଇ νΣϏγΣϑͷෆ౳ࣜ YΛ༗ݶͷฏۉͱ෼ࢄΛ࣋ͬͨ֬཰ม਺ͱ͢Δɻ ͜ͷͱ͖ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ͕੒Γཱͭɻ ʢYͷ෼෍͕ͲͷΑ͏ͳ΋ͷͰ͋ͬͯ΋༗ݶͷɹɺɹΛ࣋ͯ͹੒Γཱͭʣ µ 2 P (|

    x µ | > ) 5 1 2 µ 2 ЕМ͕YЖͷ௕͞ΑΓ ୹͘ͳΔ֬཰͸ҎԼ 1/ 2 = 1 ) P (| x µ | > ) 5 1 ΞλϦϚΤ = 2 ) P (| x µ | > ) 5 1 / 4 = 3 ) P (| x µ | > ) 5 1 / 9 ʜ
  74. େ਺ͷ๏ଇ νΣϏγΣϑͷෆ౳ࣜɿূ໌ 2 = Z 1 1 ( x µ

    )2 f ( x ) dx = Z I1 ( x µ )2 f ( x ) dx + Z I2 ( x µ )2 f ( x ) dx + Z I3 ( x µ )2 f ( x ) dx 㱢ͳͷͰ͜ΕΛফͯ͠ෆ౳ࣜʹ͢Δɻ 2 = Z I1 ( x µ )2 f ( x ) dx + Z I3 ( x µ )2 f ( x ) dx = Z I1 2 2 f ( x ) dx + Z I3 2 2 f ( x ) dx = 2 2[ P ( x 2 I1) + P ( x 2 I3)] ͱ͢Δͱɺ I1 = ( 1, µ ), I2 = [µ , µ + ], I3 = (µ + , 1) = P (| x µ | > ) P (| x µ | > ) 5 1 2 )
  75. ͱ͢Δɻ೚ҙͷʹରͯ͠ ɹɹɹɹɹΛJJEͰ͋Δ֬཰ม਺ͱ͠ɺ༗ݶͷฏۉɹɺ ෼ࢄɹͷ෼෍ʹै͏ͱ͢ΔɻOݸͷσʔλͷඪຊฏۉΛ େ਺ͷ๏ଇ ඪຊฏۉʹର͢Δେ਺ͷ๏ଇʢऑ๏ଇʣ x1 · · · xn

    µ 2 " > 0 ͕੒Γཱͭɻ͜ΕΛඪຊฏۉ͸฼ฏۉʹ֬཰ऩଋ͢Δɺ ͱ͍͍ lim n!1 P {|¯ xn µ | = " } = 0 ¯ xn = 1 n n X i=1 xi ¯ xn µ ¯ xn ! µ in P ͱ͔͘ɻ
  76. େ਺ͷ๏ଇ ඪຊฏۉʹର͢Δେ਺ͷ๏ଇʢऑ๏ଇʣɿূ໌ ೚ҙͷʹରͯ͠ " > 0 Џ͕খ͘͞ͱ΋OΛ૿΍ͤ͹ ΦϨϯδͰද͞ΕΔ໘ੵɺ ͭ·Γ֬཰͸খ͘͞Ͱ͖Δɻ P

    (|¯ xn µ | > " ) = P (|¯ xn µ | > " p n p n ) 5 2 " 2 n = 2 ¯ x = = 1 2 OΛ૿΍͍͚ͯ͠͹ ͜Ε͸̌ʹۙͮ͘ɻ νΣϏγΣϑͷෆ౳ࣜΛద༻
  77. ਖ਼ن෼෍ f(x) = 1 p 2⇡ 2 exp ✓ (x

    µ) 2 2 2 ◆ f(x) = 1 p 2⇡ exp ✓ x 2 2 ◆ ਖ਼ن෼෍ͷີ౓ؔ਺ ඪ४ਖ਼ن෼෍ͷີ౓ؔ਺ 1 < x < 1 1 < x < 1 ౷ܭֶͷ͋ΒΏΔͱ͜ΖͰجຊతͳ໾ׂΛԋ͡Δ෼෍ ͜ͷࣜͷ੒ΓཱͪΛߟ͑ͯΈ·͢ɻ
  78. ਖ਼ن෼෍  ̓ʣม਺ม׵ z = x µ dz dx =

    1 Λߦ͏ͱɺ ͱͳΔ͜ͱ͔Βɺ ໘ੵΛΩʔϓ͢ΔͨΊΛ͔͚Δਖ਼ن෼෍ͷີ౓ؔ਺ ͕ಘΒΕΔɻ f(x) = Z 1 1 1 p 2⇡ 2 exp ✓ (x µ) 2 2 2 ◆ dx 1/ Ж
  79.  ඪຊɹɹɹɹɹɹɹɹΛฏۉɹɺ෼ࢄɹΛ΋ͭ ೚ҙͷ֬཰෼෍͔Βநग़͞Εͨ΋ͷͱ͢Δɻ͜ͷͱ͖ɺ த৺ۃݶఆཧ D = ( x1, · ·

    · , xn) µ 2 ¯ x µ / p n , n ! 1 ʹର͢Δۃݶ෼෍ͱͯͭ͠·Γ N(0, 1) ඪ४ਖ਼ن෼෍ʹै͏֬཰ม਺Ͱ͋Δ͜ͱ͕ࣔ͞ΕΔɻ αϯϓϧ਺   ճ܁Γฦ͢ = 0.1, µ = 1 = 10, 2 = 1 2 = 100 ¯ x = p n = r 1 2n = r 1 0.01 ⇥ 10000 = r 1 100 = 1 10 Ξχϝʔγϣϯ63-IUUQTHJUIVCDPNNBUTVLFO2JJUB@$POUFOUTCMPCNBTUFS.BUI@DBGF@TUBUTBOJNFYQ@IJTUHJG
  80. ੵ཰฼ؔ਺Λɹɹɹɹɹɹɹͱදݱ͢Δɻ த৺ۃݶఆཧ ಓ۩ͷ४උɿੵ཰฼ؔ਺ g ( x ) = ext ͱஔ͍ͨͱ͖ͷظ଴஋

    E[ ext] = Z 1 1 ext f ( x ) dx ΛUͷؔ਺ͱͯ͠Έͨ࣌ɺ͜ΕΛ֬཰ม਺Yͷੵ཰฼ؔ਺ .PNFOU(FOFSBUJOH'VODUJPO ͱ͍͏ɻ M x (t) = E[ext] ੵ཰฼ؔ਺ͷॏཁͳੑ࣭ ֬཰ม਺ͷੵ཰฼ؔ਺ͱ֬཰ม਺ͷੵ཰฼ؔ ਺͕ͷۙ๣ͰҰக͢Δͱ͖ɺͦͷ̎ͭͷ֬ ཰ม਺͸ಉ֬͡཰෼෍ʹै͏ɻ ূ໌͸ུ M x (t) My(t) x t = 0 y ˞ੵ཰฼ؔ਺͕ଘࡏ͢ΔͨΊʹ͸͢΂ͯͷ࣍਺Ͱੵ཰͕ଘࡏ͢Δඞཁ͕͋Δɻ
  81. த৺ۃݶఆཧ ·ͨɺɹΛςΠϥʔల։͢Δͱɺ g ( x ) = ext ext =

    1 + xt + t 2 2!x 2 + · · · + tk k !xk + · · · Mx ( t ) = E[ ext] = E[1 + xt + t 2 2!x 2 + · · · + tk k !xk + · · · ] = 1 + t E[ x ] + t 2 2! E[ x 2] + · · · + tk k ! E[ xk] + · · · = 1 + xµ 0 1 + t 2 2!µ 0 2 + · · · + tk k !µ 0 k + · · · ͱͳΔͷͰɺੵ཰฼ؔ਺΋ ݪ఺·ΘΓͷL࣍ͷੵ཰ ͱɺల։Ͱ͖Δɻ
  82. த৺ۃݶఆཧ ੵ෼ه߸ԼͰͷඍ෼ՄೳੑΛԾఆͯ͠ɹɹɹΛLճඍ෼͢ Δͱ M x (t) d dtk Mx (

    t ) = E[ xk ext] t = 0 d dtk Mx (0) = E[ xk] = µ 0 k ͱ͢Δͱɺ ͱͳΓɺݪ఺·ΘΓͷL࣍ͷੵ཰͕ಘΒΕΔ
  83. ͭ·Γɺɹɹɹɹɹͱ͢Δͱɺ த৺ۃݶఆཧ ਖ਼ن෼෍ͷੵ཰฼ؔ਺ x ⇠ N ( µ, ) ͱ͢Δͱɺ

    Mx(t) = E [ext ] = Z 1 1 ext 1 p 2⇡ 2 exp ✓ 1 2 (x µ) 2 2 ◆ dx z = x µ x = µ + z dx = dz Λར༻ͯ͠
  84. ͜͜Ͱɹɹɹɹɹͱ͓͍ͯɹɹɹɹΑΓ த৺ۃݶఆཧ M x( t ) = Z 1 1

    e( µ + z ) t 1 p 2 ⇡ 2 exp ✓ 1 2 z2 ◆ dz = eµt Z 1 1 1 p 2 ⇡ exp ✓ tz 1 2 z2 ◆ dz = eµt Z 1 1 1 p 2 ⇡ exp ✓ 1 2 [ z2 2 tz 2t2 + 2t2 ] ◆ dz = eµt Z 1 1 1 p 2 ⇡ e 2t2 2 exp ✓ 1 2 ( z t ) 2 ◆ dz = eµte 2t2 2 Z 1 1 1 p 2 ⇡ exp ✓ 1 2 ( z t ) 2 ◆ dz  z t = w dz = dw M x( t ) = eµte 2t2 2 Z 1 1 1 p 2 ⇡ exp ✓ w2 2 ◆ dw = eµt + 2t2 2 ͜Ε͕ਖ਼ن෼෍ͷ ੵ཰฼ؔ਺
  85. த৺ۃݶఆཧ ੵ཰฼ؔ਺͔Β෼෍ͷฏۉɺ෼ࢄΛٻΊΔ Ұ֊ඍ෼ ೋ֊ඍ෼ $IBJO3VMF (f · g)0 = f0

    · g + f · g0 ੵͷඍ෼ ( f g )0( x ) = f 0( g ( x )) g 0( x ) M0 x (t) = (µ + 2t)eµt + 2t2 2 M00 x (t) = (µ + 2t)2 ⇣ eµt + 2t2 2 ⌘ + 2 ⇣ eµt + 2t2 2 ⌘ = ⇣ eµt + 2t2 2 ⌘ {(µ + 2t)2 + 2} ·ͣɺੵ཰฼ؔ਺ͷҰ֊ɺೋ֊ඍ෼ΛٻΊΔɻ
  86. த৺ۃݶఆཧ Var[ x ] = E[ x 2] (E[ x

    ])2 = ( µ 2 + 2) ( µ )2 = 2 Var[ x ] = E[( x E[ x ])2] = E[ x 2 2E[ x ] x + E[ x ]2) = E[ x 2] 2E[ x ]2 + E[ x ]2 = E[ x 2] E[ x ]2 Α͘࢖͏෼ࢄͷެࣜ ͜͜Ͱɹɹͱ͓͘ͱɺݪ఺·ΘΓͷ̍࣍ͷੵ཰ͱ࣍ͷ ੵ཰͕ಘΒΕΔͷͰɺ t = 0 E[ x ] = M 0 x (0) = ( µ + 2 · 0) eµ ·0+ 2·02 2 = µ E[ x 2] = M 00 x (0) = ⇣ eµ ·0+ 2·02 2 ⌘ {( µ + 2 · 0)2 + 2} = µ 2 + 2
  87. ·ͨ͸ɹɹɹɹɹɹɹʹର͢Δۃݶ෼෍͸ த৺ۃݶఆཧ த৺ۃݶఆཧ ඪຊɹɹɹɹɹɹɹɹΛฏۉɹɺ෼ࢄɹΛ΋ͭ೚ҙͷ֬཰ ෼෍͔Βͷେ͖͞Oͷඪຊͱ͢Δɻඪຊ࿨ ͱ͓͘ͱɺ D = ( x1,

    · · · , xn) µ 2 ¯ x µ / p n , n ! 1 ඪ४ਖ਼ن෼෍ɹɹɹɹͰ͋Δɻ N(0, 1) T = x1 + · · · + xn T nµ p n ࠓ೔͸ɹɹɹɹɹɹ͕ฏۉ̌ɺ෼ࢄɹͷ ਖ਼ن෼෍ʹै͏͜ͱΛূ໌͠·͢ɻ 2 T 0 = T nµ p n = ¯ x µ 1 / p n
  88. த৺ۃݶఆཧ ূ໌ M xi (t) = 1 + µ0 1

    t + µ0 2 t2 2! + µ0 3 t3 3! + · · · ݪ఺·ΘΓͷੵ཰฼ؔ਺ ݪ఺·ΘΓͷ ࣍ͷੵ཰ ݪ఺·ΘΓͷ ࣍ͷੵ཰ ݪ఺·ΘΓͷ ࣍ͷੵ཰ ฏۉ·ΘΓͷੵ཰฼ؔ਺ɺ M xi µ (t) = 1 + µ1t + µ2 t2 2! + µ3 t3 3! + · · · = 1 + 0 + 2 t2 2! + µ3 t3 3! + · · · ͷ͔̎ͭΒɺ
  89. த৺ۃݶఆཧ ΛͰׂͬͨɹɹɹͷੵ཰฼ؔ਺͸ɹɹɹ xi µ p n xi µ p n

    M xi µ p n (t) = E[exi µ p n t] = 1 + 2 t2 2!n + µ3 t3 3!n3/2 + · · · + µk tk k!nk/2 + · · · = 1 + 2t2 2n + n 2n = 1 2n n n ! 0 n ! 0 ͱஔ͘ͱ ͷͱ͖ = 1 + 2t2 + n 2n
  90. த৺ۃݶఆཧ T 0 = x1 µ p n + x2

    nµ p n + · · · + xn µ p n ͷੵ཰฼ؔ਺Λߟ͑Δɻ ࣍ʹ = n X i=1 xi µ p n MT 0 (t) = MP n i =1 ⇣ xi µ p n ⌘(t) = E[e P n i =1 ⇣ xi µ p n ⌘ t ] = n Y i=0 E[e ⇣ xi µ p n ⌘ t ] = ✓ 1 + 1 n 2t2 + n 2 ◆n ಠཱͳͷͰ FͷఆٛΑΓ er ⌘ lim n!1 ⇣ 1 + r n ⌘n r r = lim n!1 ⇣ 1 + r n ⌘n
  91. த৺ۃݶఆཧ n ! 1 ͱ͢Ε͹ lim n!1 MT 0 =

    lim n!1 ✓ 1 + 1 n 2t2 + n 2 ◆n = e 2t2 2 S lim n!1 n = 0 ͷ ੵ཰฼ؔ਺ͱಉ͡ʂ Αͬͯ N(0, 2) T0 = T nµ p n ͸ฏۉ̌ɺ෼ࢄɹͷਖ਼ن෼෍ʹ 2 ै͏͜ͱ͕Θ͔Δɻ
  92. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ύϥϝʔλʔͷਪఆํ๏ʹ͸ɺ఺ਪఆɺ۠ؒਪఆͷ̎छ ྨ͕͋Δɻ ఺ਪఆ ύϥϝʔλʔВΛ̍ͭͷ஋ɺͭ·Γ̍఺ ɹͰ ਪఆ͢Δਪఆํ๏ɻ ۠ؒਪఆ ύϥϝʔλʔВΛ۠ؒͰਪఆɺͭ·Γ 

    Ͱਪఆ͢Δํ๏ ˞ύϥϝʔλʔ͕֬཰తมಈΛ͢ΔΘ͚ ɹͰ͸ͳ͍͜ͱʹ஫ҙʢޙड़ʣ ✓0 = ˆ ✓(X1, · · · , Xn) ˆ ✓ lower (X 1 , · · · , Xn) 5 ✓ 0 5 ˆ ✓ upper (X 1 , · · · , Xn)
  93. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ෆภੑ ਪఆྔͷظ଴஋͕ਅͷύϥϝʔλʔͱҰக͢Δɺ ͭ·Γਪఆྔͷظ଴஋ͱਅͷύϥϝʔλʔͱͷࠩ ͕̌Ͱ͋Δ͜ͱΛෆภੑͱ͍͏ Ұகੑ ඪຊ਺OΛେ͖͍ͯ͘͘͠ͱɺਪఆྔ͕ਅͷύϥϝ ʔλʔʹ͖ۙͮɺOˠ㱣ͷ࣌ʹҰக͢Δੑ࣭ΛҰக ੑͱ͍͏ɻ ༗ޮੑ

    ਪఆྔɹɹɹͷ෼ࢄ͕ɺͦͷཧ࿦తԼݶʹҰக͢ Δ৔߹༗ޮਪఆྔͱݺͿɻͭ·Γɺਪఆྔɹɹɹ ͷ෼ࢄ͕ΑΓখ͍͞΋ͷͷํ͕ΑΓ༗ޮɻ ޮ཰ͱ΋ݺͿɻ ఺ਪఆʹ͸ز͔ͭੑ࣭͕͋Δɻ ˆ ✓(X) ˆ ✓(X)
  94. ύϥϝʔλʔͷਪఆͱ࠷໬๏ όΠΞεόϦΞϯε෼ղ E[(ˆ ✓(X) ✓)2] = E[{(E[ˆ ✓(X)] ✓) +

    (ˆ ✓(X) E[ˆ ✓(X)])}2] = E[(E[ˆ ✓(X)] ✓)2 + 2(E[ˆ ✓(X)] ✓)(ˆ ✓(X) E[ˆ ✓(X)]) + (ˆ ✓(X) E[ˆ ✓(X)])2] = (E[ˆ ✓(X)] ✓)2 + Var[ˆ ✓(X)] 㱺ظ଴஋ΛͱΔͱ̌ œ όΠΞε ෆภਪఆྔ όϦΞϯε ෆภਪఆྔ͸όΠΞε͕̌ʹͳΔΑ͏ͳਪఆྔͷ͜ͱ Λࢦ͢ɻͦͷͨΊɺෆภਪఆྔͷฏۉೋ৐ޡࠩ͸ E[ˆ ✓(X)] ✓ ฏۉೋ৐ޡࠩ͸ʮόΠΞεʯͱʮόϦΞϯεʯʹ෼ղͰ͖Δɻ E[(ˆ ✓(X) ✓)2] = Var[ˆ ✓(X)] ͱόϦΞϯεͷΈͱͳΔɻฏۉೋ৐ޡࠩΛ࠷খʹ͢Δෆภਪఆྔ ͸෼ࢄΛ࠷খʹ͢Δ΋ͷͱͳΔɻ
  95. ύϥϝʔλʔͷਪఆͱ࠷໬๏ E[¯ x ] = 1 n E[ T ]

    = n · 1 n µ = µ ʮඪຊநग़ʯʹͯطʹݟͨΑ͏ʹ͸ظ଴஋ΛͱΔͱ ¯ x ͷΑ͏ʹɺύϥϝʔλʔͱ౳͘͠ͳΔͨΊɺฏۉʹؔ͢Δ ෆภਪఆྔͰ͋Δɻ ࣍ϖʔδͰࣔ͢Α͏ʹɺ෼ࢄͷෆภਪఆྔ͸OͰׂΔͷͰ͸ͳ͘ OͰׂΔ s 2 = 1 n 1 n X i=1 ( xi ¯ x )2 ͱͳΔɻ ຊεϥΠυͷ࠷ॳͷ෦෼Ͱɺਪଌͷ৔߹͸OͰ͸ͳ͘OͰׂΔ ͱॻ͍ͨཧ༝͸͜ͷෆภੑΛ࣋ͨͤΔͨΊͰ͋ͬͨɻ
  96. ύϥϝʔλʔͷਪఆͱ࠷໬๏ Ұகਪఆྔ lim n!1 P {|¯ xn µ | =

    " } = 0 ¯ xn ! µ in P ඪຊͷݸ਺OݸΛ༻͍ͨਪఆྔ͕ͷ࣌ʹ ͷΑ͏ʹਅͷύϥϝʔλʔВʹ֬཰ऩଋ͢Δͱ͖ ਪఆྔɹɹɹ͸ҰகੑΛ࣋ͭͱ͍͏ɻ Ұகੑ͸ظ଴஋Ͱ͸ͳ͘ɺਪఆྔͦͷ΋ͷ͕ਅͷύϥϝʔλʔͷ஋ ʹۙͮ͘ͱ͍͏ੑ࣭Λදͨ͠΋ͷͰ͋Δɻ ˆ ✓n(X) n ! 1 ˆ ✓n(X) ! ✓ in P ˆ ✓n(X) ʮେ਺ͷ๏ଇʯͰࣔͨ͠ ͭ·Γ ͸ɺɹ͕ฏۉɹʹର͢ΔҰகਪఆྔͰ͋Δ͜ͱΛද͍ͯͨ͠ɻ ¯ xn µ
  97. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ༗ޮਪఆྔ ࠓճ͸֓ཁʹݶΔ όϦΞϯεɹɹɹɹɹ͸ΫϥϝϧϥΦͷෆ౳ࣜʹΑΓɺҰఆͷ ੍ݶ৚݅˞ ͷ΋ͱͰ೚ҙͷෆภਪఆྔɹɹɹʹର͠ɺ Var[ˆ ✓(X)] ύϥϝʔλʔВΛ࣋ͭ ֬཰ີ౓ؔ਺

    ͱɺԼݶΛࣔ͢͜ͱ͕Ͱ͖Δɻ όϦΞϯε͢ͳΘͪਪఆྔͷ෼ࢄ͕͜ͷԼݶʹҰக͍ͯ͠Δͱ͖ɺ ͦͷਪఆྔΛ༗ޮਪఆྔͱ͍͍ɺ࠷΋෼ࢄ͕খ͍͞ਪఆྔͰ͋Δ͜ ͱ͕ࣔ͞ΕΔɻ ˆ ✓(X) Var[ˆ ✓ ( X )] = E "✓ @ @✓ log f ( X ; ✓ ) ◆2 # 1 = In( ✓ ) 1 ϑΟογϟʔ৘ใྔ ˞ ϑΟογϟʔ৘ใྔ͕ਖ਼Ͱ͋Δ͜ͱͱɺඍ෼ͱੵ෼ͷަ׵͕อো͞ΕΔͱ͍͏৚݅ͷ΋ͱɻ
  98. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ࠷໬๏ʹΑΔύϥϝʔλʔͷਪఆ ඪຊɹɹɹɹɹɹɹɹɹ͕طʹಘΒΕ͍ͯΔͱͯ͠ɺɹ͸ີ౓ؔ਺ ʹै͍ͬͯΔͱ͢Δɻ͜ͷඪຊͷಉ࣌֬཰ີ౓ؔ਺͸ D = ( x1, · ·

    · , xn) xi f ( xi) n Y i=1 f ( xi) n Y i=1 f ( xi | ✓ ) Ͱ͋ΔɻύϥϝʔλʔВΛ໌ࣔ͢Δͱ ͱͳΔɻ͜ͷ࣌ɺؔ਺ͷܗ͸શ͘ಉ͡Ͱɺม਺Λ Вͱ͠ɺɹΛݻఆ஋ͱͯ͠Έͨͱ͖ɺ͜ΕΛ໬౓ؔ਺ͱ͍͍ɺ ԼهͷΑ͏ʹද͢ɻ xi ` ( ✓ | x1, x2, · · · , xn) = n Y i=1 f ( xi | ✓ )
  99. ͍·ɺฏۉɺඪ४ภࠩͷਖ਼ن෼෍ʹै͏ཚ਺ݸ ɹɹɹ͕ಘΒΕɺͦͷ஋͕ ͩͬͨͱ͠Α͏ɻ ύϥϝʔλʔͷਪఆͱ࠷໬๏ <     

       > x1, x2, · · · , x10 σʔλͷ༷ࢠ ໬౓ؔ਺ͷΠϝʔδ ಉ࣌֬཰ີ౓ؔ਺͸ԼهͷΑ͏ʹͳΔɻ f(x1, x2, · · · , x10 | µ, 2 ) = 10 Y i=1 1 p 2⇡ 2 exp ✓ 1 2 (xi µ) 2 2 ◆
  100. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ࠷໬ਪఆ ࠷໬ਪఆͱ͸ɺ໬౓ؔ਺ͷ࠷େ஋ΛͱΔύϥϝʔλʔΛ୳͠ग़͢ ํ๏Ͱ͋ΓɺͦͷύϥϝʔλʔΛ࠷໬ਪఆྔͱ͍͍ ✓ ⇤ = arg max ✓

    `(✓ | x1, x2, · · · , xn) ͱද͢ɻ ܭࢉΛߦ͏্Ͱ͸ର਺Λͱͬͨ log `(✓ | x1, · · · , xn) ⌘ L(✓ | x1, · · · , xn) Λ࢖͏ํ͕ɺੵΛ࿨ʹ͢Δ͜ͱ͕Ͱ͖ͯศརͳ͜ͱ͕ଟ͍ɻ MPH͸୯ௐ૿Ճؔ਺ͳͷͰେখؔ܎͕มΘΒͣɺ-Λ࠷େʹ͢ΔВ ͕ಉ࣌ʹɹΛ࠷େʹ͢ΔВͱͳΔɻ `
  101. ύϥϝʔλʔͷਪఆͱ࠷໬๏ ࠷໬ਪఆྔΛղੳతʹٻΊΔɿਖ਼ن෼෍ͷྫ ର਺Λͱͬͯ ɹɹʹؔͯ͠࠷େ஋ΛٻΊΔͨΊɺภඍ෼͢Δͱ࠷໬ਪఆྔ͕ ٻΊΒΕΔɻ µ, 2 L(µ, 2| x1,

    x2, · · · , x10) = n 2 (2⇡) n 2 log 2 1 2 2 n X i=1 (xi µ) 2 @L @µ = 1 2 2 n X i=1 ( xi µ )2 ) n X i=1 xi = nµ ) µ ⇤ = 1 n n X i=1 xi `(µ, 2| x1, x2, · · · , xn) = n Y i=1 1 p 2⇡ 2 exp ✓ 1 2 (xi µ) 2 2 ◆
  102. ύϥϝʔλʔͷਪఆͱ࠷໬๏ @L @ 2 = n 2 1 2 +

    1 2( 2)2 n X i=1 ( xi µ )2 = 0 ) 1 2( 2)2 n X i=1 ( xi µ )2 = n 2 2 ) 2⇤ = 1 n n X i=1 ( xi µ )2 ࠷໬ਪఆͰಘΒΕΔ͸ෆภਪఆྔʹͳΒͳ͍͜ͱʹ஫ҙɻ ʢ෼ࢄΛաখਪఆͯ͠͠·͏ɻʣ 2⇤
  103. पล෼෍ΛͱΔͱɺ ɹɹɹɹɹɹɺɹɹɹɹɹ͸ɺɺɹɹʹର͠ ಉ࣌֬཰ີ౓ؔ਺͸ ۠ؒਪఆ U෼෍ DPOU ɿ௒ུূ u ⇠ N(0,

    1) v ⇠ 2(m) v > 0 1 < u < +1 f ( u, v ) = 1 p 2 ⇡ exp ✓ u2 2 ◆ (1 / 2) n/2 ( n/ 2) vn/2 1e v/2 ͱͳΔɻ͜͜Ͱม਺ม׵ ΧΠೋ৐෼෍ͷີ౓ؔ਺ ඪ४ਖ਼ن෼෍ͷີ౓ؔ਺ t = u p v/m x = v ɺɹɹɹɹΛ͓͜ͳ͍ࣜมܗͷͷͪUʹؔ͢Δ f(t) = m+1 2 p m⇡ m 2 ✓ t2 m + 1 ◆ m+1 2 ɹ͕ಘΒΕΔɻ ˞͖ͪΜͱͨ͠ূ໌͸ʮ਺ֶγϦʔζ਺ཧ౷ܭֶ Ҵ֞એੜ ʯɹQςΟʔ෼෍ࢀর ΨϯϚؔ਺ (z) = Z 1 0 tz 1e t dt
  104. ඪຊɹɹɹɹɹɹɹɹɹΛɹɹɹɹɹɹɹͱ͢Δͱɺ ඪຊฏۉɹ͸ɹɹɹɹɹɹɹɹͱͳΔɻ ۠ؒਪఆ ͜ͷU෼෍ΛԿʹ࢖͏͔ͱ͍͏ͱɺฏۉɺ෼ࢄ͕ະ஌ͷਖ਼ن෼෍ ͔Βͷ֬཰ඪຊʹରͯ͠ɺ฼ฏۉɹͷ۠ؒਪఆʹ࢖͑Δɻ µ D = ( x1,

    · · · , xn) xi ⇠ N ( µ, 2) ¯ x ⇠ N ( µ, 2 /n ) ¯ x ˞ূ໌͸ʮ਺ֶγϦʔζ਺ཧ౷ܭֶ Ҵ֞એੜ ʯɹQඪຊฏۉͱඪຊ෼ࢄͷ෼෍ࢀর 1 2 n X i=1 ( xi ¯ x )2 ⇠ 2 n 1 ·ͨɺඪຊฏۉͱͷภࠩͷೋ৐࿨Λ෼ࢄͰׂͬͨ΋ͷ͸ɺ ࣗ༝౓OͷΧΠೋ৐෼෍ʹै͏ɻ
  105. ෆภ෼ࢄΛɹɹɹɹɹɹɹɹɹɹɹɹͱ͓͘ɻ ɺ ۠ؒਪఆ u = ¯ x µ / p

    n ⇠ N (0 , 1) v = 1 2 n X i=1 ( xi ¯ x )2 ⇠ 2 n 1 ͱ͢Δͱɺ t = u p v/ ( n 1) = ¯ x µ / p n · " 1 2 1 ( n 1) n X i=1 ( xi ¯ x )2 # 1/2 = ¯ x µ 1 / p n · 1 p s 2 = ¯ x µ s/ p n ⇠ tn 1 s 2 = 1 n 1 n X i=1 ( xi ¯ x )2 ෆภ෼ࢄ s2 ˢ෼ࢄМ͕ফ͑ͨʂ
  106. ɹɹɹΛ৴པ܎਺ͱΑͼɺͷ͕۠ؒઃఆͰ͖Δɻ U෼෍ͷ྆֎ଆͷ֬཰Λ଍͠߹Θͤͨ΋ͷΛɹͱͨ͠ͱ͖ɺ ۠ؒਪఆ P ✓ tn 1;↵/2 5 ¯ x

    µ s/ p n 5 tn 1;↵/2 ◆ = 1 ↵ tn 1;↵/2 tn 1;↵/2 ໘ੵ͸ ↵/2 ໘ੵ͸ ↵/2 ໘ੵ͸ 1 ↵ 1 ↵ 1 ↵ P ✓ ¯ x tn 1;↵/2 s p n 5 µ 5 ¯ x + tn 1;↵/2 s p n ◆ = 1 ↵ [ tn 1;↵/2 , tn 1;↵/2 ] U෼෍ʹै͏ ࣜมܗΛ͓͜ͳ͏ͱɺ ͜Ε͸ɺ฼ूஂͷฏۉ ͕͜ͷ۠ؒʹೖΔ֬཰͸ ɹɹɹͰ͋Δ͜ͱΛࣔ͠ ͍ͯΔɻ µ 1 ↵
  107. ɹɹɹΛ৴པ܎਺ͱΑͼɺͷ͕۠ؒઃఆͰ͖Δɻ U෼෍ͷ྆֎ଆͷ֬཰Λ଍͠߹Θͤͨ΋ͷΛɹͱͨ͠ͱ͖ɺ ۠ؒਪఆ P ✓ tn 1;↵/2 5 ¯ x

    µ s/ p n 5 tn 1;↵/2 ◆ = 1 ↵ tn 1;↵/2 tn 1;↵/2 ໘ੵ͸ ↵/2 ໘ੵ͸ ↵/2 ໘ੵ͸ 1 ↵ 1 ↵ 1 ↵ P ✓ ¯ x tn 1;↵/2 s p n 5 µ 5 ¯ x + tn 1;↵/2 s p n ◆ = 1 ↵ [ tn 1;↵/2 , tn 1;↵/2 ] U෼෍ʹै͏ ࣜมܗΛ͓͜ͳ͏ͱɺ ͜Ε͸ɺ฼ूஂͷฏۉ ͕͜ͷ۠ؒʹೖΔ֬཰͸ ɹɹɹͰ͋Δ͜ͱΛࣔ͠ ͍ͯΔɻ µ 1 ↵ ͨͩ͠ɺ฼ฏۉЖ͕֬཰తมಈΛͯ͠ɺ͜ͷ ۠ؒʹೖΔ֬཰Ͱ͸ͳ͘ɺ܁Γฦ͠ඪຊΛ αϯϓϦϯά͠ɺಉ༷ͷ۠ؒΛઃఆ͢Δͱɺ ͜ͷઃఆ͕ͨ۠ؒ͠฼ฏۉЖΛଊ͑Δ֬཰͕ ЋͰ͋Δɺͱ͍͏͜ͱʹ஫ҙ
  108. ౷ܭతݕఆ ਅͷঢ়ଶ έʔε̍ɿؼແԾઆ͕ਖ਼͍͠ έʔε̎ɿରཱԾઆ͕ਖ਼͍͠ ݕ ఆ ݁ Ռ ؼແԾઆ —ؼແԾઆͷ෼෍ʹै͍ɺ

    ࠾୒ҬʹೖΔ ରཱԾઆͷ෼෍ʹै͍ɺ࠾ ୒ҬʹೖΔ ରཱԾઆ ؼແԾઆͷ෼෍ʹै͍ɺ غ٫ҬʹೖΔ ରཱԾઆͷ෼෍ʹै͍ɺغ ٫ҬʹೖΔ ͯ͞ɺ͜͏΍ͬͯઃఆͨ͠غ٫Ҭʹରͯ͠ɺਅͷԾઆʢؼແԾઆɺରཱ Ծઆʣͱɺݕఆ݁ՌʢؼແԾઆΛड͚ೖΕΔɺରཱԾઆΛड͚ೖΕΔʣ ͷºͷͭͷύλʔϯ͕͋Γ͏Δɻදʹද͢ͱԼهͷ௨Γɻ
  109. *% UPUBM@CJMM UJQ HFOEFS TNPLFS EBZ UJNF TJ[F  

     'FNBMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS     'FNBMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS     .BMF /P 4VO %JOOFS  … … … … … … … … ૬ؔ܎਺ ར༻σʔλɿҿ৯ళͷސ٬ผࢧ෷ֹ͍ۚσʔλ ग़యɿIUUQTHJUIVCDPNNXBTLPNTFBCPSOEBUBCMPCNBTUFSUJQTDTW
  110. ࣜͰද͢ͱɾɾɾ r = 1 n Pn i=1 ( xi ¯

    x )( yi ¯ y ) q 1 n Pn i=1 ( xi ¯ x )2 q 1 n Pn i=1 ( yi ¯ y )2 ૬ؔ܎਺ͱ͸
  111. ࣜͰද͢ͱɾɾɾ ͖ͬ͞ͷඪ४ภࠩͱҰॹʂ r = 1 n Pn i=1 ( xi

    ¯ x )( yi ¯ y ) q 1 n Pn i=1 ( xi ¯ x )2 q 1 n Pn i=1 ( yi ¯ y )2 ૬ؔ܎਺ͱ͸
  112. ࣜͰද͢ͱɾɾɾ ͖ͬ͞ͷඪ४ภࠩͱҰॹʂ r = 1 n Pn i=1 ( xi

    ¯ x )( yi ¯ y ) q 1 n Pn i=1 ( xi ¯ x )2 q 1 n Pn i=1 ( yi ¯ y )2 ৐͍ͯ͠ΔͷͰඞͣϓϥε ૬ؔ܎਺ͱ͸
  113. ࣜͰද͢ͱɾɾɾ r = 1 n Pn i=1 ( xi ¯

    x )( yi ¯ y ) q 1 n Pn i=1 ( xi ¯ x )2 q 1 n Pn i=1 ( yi ¯ y )2 ͜ΕΛڞ෼ࢄͱ͍͏ ૬ؔ܎਺ͱ͸
  114. ڞ෼ࢄ 1 n n X i=1 ( xi ¯ x

    )( yi ¯ y ) ԣ࣠ͷฏۉ͔Βͷڑ཭ ภࠩ  ฏۉΑΓখ͍͞ͱ͜Ζ͸ ϚΠφεʹͳΔɻ ૬ؔ܎਺ͱ͸
  115. ڞ෼ࢄ 1 n n X i=1 ( xi ¯ x

    )( yi ¯ y ) ॎ࣠ͷฏۉ͔Βͷڑ཭ ภࠩ  ฏۉΑΓখ͍͞ͱ͜Ζ͸ ϚΠφεʹͳΔɻ ૬ؔ܎਺ͱ͸
  116. ฏۉ஋ ૬ؔ܎਺ 1 n n X i=1 ( xi ¯

    x )( yi ¯ y ) ૬ؔ܎਺ͱ͸ ڞ෼ࢄ