{"id":284480,"date":"2017-04-05T15:25:02","date_gmt":"2017-04-05T11:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=284480"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=284480","title":{"rendered":"\u0411\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u0440\u0443\u043a\u0438\u0435 \u0431\u0430\u043d\u0434\u0438\u0442\u044b \u043f\u0440\u043e\u0442\u0438\u0432 A\/B \u0442\u0435\u0441\u0442\u043e\u0432"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/735\/550\/847\/7355508476c14cbe987c5a6350d1ab8d.jpg\" align=\"right\" width=\"320\"\/>  <\/p>\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0423\u0441\u044b \u0438 \u043a\u043e\u0433\u0442\u0438\u00bb. \u0423 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u044d\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443, \u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043c\u0438\u0440\u0435 \u043c\u0443\u0440\u043b\u044b\u0447\u0435\u0442 \u043e\u0442 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u043e\u0434\u0438\u043d \u043a\u043e\u0442\u0435\u043d\u043e\u043a. \u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0435\u0440\u0434\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u0442\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043e\u043a\u0430\u0437\u043e\u0432 \u0432 \u043a\u043b\u0438\u043a\u043e-\u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u041f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u0431\u044e\u0434\u0436\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0431\u043e\u0440\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043e\u043a\u0438. \u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430. \u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u0444\u043e\u0440\u043c\u044b \u043a\u043d\u043e\u043f\u043a\u0438, \u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435\u0445 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u043e\u0432, \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u041c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 A\/B\/n-\u0442\u0435\u0441\u0442, \u043d\u043e \u043c\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b: \u0438 \u0442\u0430\u043a \u043d\u0430 \u044d\u0442\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0443\u0449\u0435\u043d\u043e \u0434\u0435\u043d\u0435\u0433 \u043d\u0435\u043c\u0435\u0440\u0435\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0442\u044f\u0442 \u0438 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0435. \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u0441\u0442\u044b, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0439\u043a\u0443 \u043c\u043d\u043e\u0433\u043e\u0440\u0443\u043a\u0438\u0445 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0445 \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 (bayesian multi-armed bandits). \u0412\u043f\u0435\u0440\u0435\u0434.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"abn-test\">A\/B\/n-\u0442\u0435\u0441\u0442<\/h1>\n<p>  <\/p>\n<p>\u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043b\u0438\u043a \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/839\/452\/3d1\/8394523d1f4bab66a8544cd365388d87.svg\" alt=\"$k$\" data-tex=\"inline\"\/><\/math>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0fc\/031\/d00\/0fc031d0014dcf57b36106bd16b8e71b.svg\" alt=\"$0$\" data-tex=\"inline\"\/><\/math> \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/072\/ceb\/bbc\/072cebbbc068c9c66ce5e423466d257c.svg\" alt=\"$1$\" data-tex=\"inline\"\/><\/math> \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a21\/ed4\/61f\/a21ed461f66aaee7817cacfb1a898860.svg\" alt=\"$\\theta$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/352\/d19\/ecb\/352d19ecb8459f5a80c17d658eec3e51.svg\" alt=\"$1 - \\theta$\" data-tex=\"inline\"\/><\/math> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0422\u0430\u043a\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0411\u0435\u0440\u043d\u0443\u043b\u043b\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a21\/ed4\/61f\/a21ed461f66aaee7817cacfb1a898860.svg\" alt=\"$\\theta$\" data-tex=\"inline\"\/><\/math>:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/362\/698\/793\/3626987933eee2a5ac933a3677b61247.svg\" alt=\"$\\large \\begin{array}{rcl} k &amp;\\sim&amp; \\text{Bernoulli}\\left(\\theta\\right) \\\\ p\\left(k = 1\\right) &amp;=&amp; \\theta^k \\left(1 - \\theta\\right)^{1 - k} \\end{array} $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0411\u0435\u0440\u043d\u0443\u043b\u043b\u0438 \u0440\u0430\u0432\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2ed\/b93\/27c\/2edb9327cd7eaf86864c06adb4423582.svg\" alt=\"$\\mu = \\theta$\" data-tex=\"inline\"\/><\/math>, \u0430 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0440\u0430\u0432\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/03d\/4a7\/4c5\/03d4a74c52f17f33877978a8b942cc09.svg\" alt=\"$\\sigma^2 = \\theta\\left(1 - \\theta\\right)$\" data-tex=\"inline\"\/><\/math>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e A\/B\/n-\u0442\u0435\u0441\u0442\u0430, n \u0437\u0434\u0435\u0441\u044c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0435 \u0434\u0432\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b, \u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u044f\u0442\u044c \u0433\u0438\u043f\u043e\u0442\u0435\u0437. \u041d\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u043e\u0432\u043e\u0433\u043e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u043e\u0431\u0449\u0438\u043c \u043d\u0430 \u0432\u0441\u0435 \u043f\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0412 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/67a\/f9c\/ccd\/67af9cccd65ecc3516b0337942de4267.svg\" alt=\"$H_0: \\theta_c = \\theta_t$\" data-tex=\"inline\"\/><\/math> \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0432 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/733\/df0\/7e7\/733df07e7faf8fb5072e84c4b82213f1.svg\" alt=\"$\\theta_c$\" data-tex=\"inline\"\/><\/math> \u0438\u043b\u0438 \u043f\u043e \u043d\u043e\u0432\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3f\/cb7\/d34\/f3fcb7d3449503894ab2f25ecf2e325d.svg\" alt=\"$\\theta_t$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd3\/56d\/9b6\/dd356d9b68ef85f74b002d07a90c26ad.svg\" alt=\"$H_1: \\theta_c &lt; \\theta_t$\" data-tex=\"inline\"\/><\/math> \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/733\/df0\/7e7\/733df07e7faf8fb5072e84c4b82213f1.svg\" alt=\"$\\theta_c$\" data-tex=\"inline\"\/><\/math> \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u043f\u043e \u043d\u043e\u0432\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3f\/cb7\/d34\/f3fcb7d3449503894ab2f25ecf2e325d.svg\" alt=\"$\\theta_t$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/733\/df0\/7e7\/733df07e7faf8fb5072e84c4b82213f1.svg\" alt=\"$\\theta_c$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3f\/cb7\/d34\/f3fcb7d3449503894ab2f25ecf2e325d.svg\" alt=\"$\\theta_t$\" data-tex=\"inline\"\/><\/math> \u043c\u044b \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u043a\u043e\u0432 \u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 (control) \u0438 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439\/\u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 (treatment) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u043d\u0430\u0442\u044c \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/733\/df0\/7e7\/733df07e7faf8fb5072e84c4b82213f1.svg\" alt=\"$\\theta_c$\" data-tex=\"inline\"\/><\/math> \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 (\u043d\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439), \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0430. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0417\u0430\u043a\u043e\u043d_\u0431\u043e\u043b\u044c\u0448\u0438\u0445_\u0447\u0438\u0441\u0435\u043b\">\u0437\u0430\u043a\u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u043a\u043e\u0435 \u0431\u044b \u043d\u0438 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u0435\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u0443\u0441\u0440\u0435\u0434\u043d\u0438\u043c, \u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u0438\u0437\u043a\u0430 \u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f (\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u043e\u043a\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b58\/414\/e96\/b58414e960548906adae5a204bed502e.svg\" alt=\"$c$\" data-tex=\"inline\"\/><\/math> \u0434\u043b\u044f \u044f\u0441\u043d\u043e\u0441\u0442\u0438):<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cbc\/fb9\/21a\/cbcfb921af2dbaa0d2cb175e13462fb6.svg\" alt=\"$\\large \\begin{array}{rcl} \\overline{\\theta}_n &amp;=&amp; \\frac{1}{n}\\sum_{i=1}^n k_i \\\\ \\forall \\epsilon \\in \\mathbb{R}: \\lim_{n \\rightarrow \\infty} &amp;=&amp; P\\left(\\left|\\overline{\\theta}_n - \\mu\\right| &lt; \\epsilon\\right) = 1 \\end{array} $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044d\u0442\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f_\u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u0430\u044f_\u0442\u0435\u043e\u0440\u0435\u043c\u0430\">\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043e\u0440\u0435\u043c\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u044f\u0434 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/153\/b38\/80a\/153b3880a5934456fb3d3f122c50790b.svg\" alt=\"$k_1, k_2, \\ldots$\" data-tex=\"inline\"\/><\/math>, \u0441 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6af\/297\/d97\/6af297d97b73ffa5591a8c2c5a6b6d86.svg\" alt=\"$\\mu$\" data-tex=\"inline\"\/><\/math> \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/be0\/006\/9bd\/be00069bd90f3669a29f6a12ff0df445.svg\" alt=\"$\\sigma^2$\" data-tex=\"inline\"\/><\/math>. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8eb\/c1b\/feb\/8ebc1bfeb3c49de609eab8cdbe50495d.svg\" alt=\"$S_n = \\sum_{i}^n k_i$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e\u0433\u0434\u0430<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0fd\/b22\/efd\/0fdb22efd77bfe5179527726e32ecb22.svg\" alt=\"$\\large \\frac{S_n - \\mu n}{\\sigma\\sqrt{n}} \\rightarrow \\mathcal{N}\\left(0, 1\\right)\\text{ \u043f\u0440\u0438 }n \\rightarrow \\infty $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0438\u043b\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0431\u043e\u0440\u043a\u0430\u0445 \u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441 \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6af\/297\/d97\/6af297d97b73ffa5591a8c2c5a6b6d86.svg\" alt=\"$\\mu$\" data-tex=\"inline\"\/><\/math> \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3bd\/023\/efa\/3bd023efa02c83aeef2787748d280315.svg\" alt=\"$\\frac{\\sigma^2}{n}$\" data-tex=\"inline\"\/><\/math>:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aa2\/442\/82d\/aa244282d2f334252617c7c60fea6461.svg\" alt=\"$\\large \\overline{\\theta} \\sim \\mathcal{N}\\left(\\mu, \\frac{\\sigma^2}{n}\\right) $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0431\u0435\u0440\u0438 \u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439 \u0434\u0432\u0430 \u0442\u0435\u0441\u0442\u0430: \u0440\u0430\u0437\u0434\u0435\u043b\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438, \u0436\u0434\u0438 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439, \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0439 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443. \u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/T-\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439_\u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430\">t-\u0442\u0435\u0441\u0442<\/a> \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u043e\u0440\u043e\u043a (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438\u043c\u0435\u044e\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435). \u0410 \u0442\u0430\u043a\u0436\u0435, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math>, \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u0441\u0432\u043e\u044e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u041d\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439) \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438? \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0443\u043b\u0435\u0432\u0430\u044f, \u0442\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0440\u0430\u0432\u043d\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e, \u0438 \u043f\u0435\u0440\u0432\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d11\/3cd\/995\/d113cd995349f618fccb6a5220a7b441.svg\" alt=\"$70\\%$\" data-tex=\"inline\"\/><\/math> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043b\u044e\u0442\u043e \u043d\u0435\u043d\u0430\u0432\u0438\u0434\u0435\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0446\u0432\u0435\u0442, \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c \u0435\u0449\u0435. \u0418 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u043e\u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u0440\u0430\u0437 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0442\u0434\u0435\u043b\u043e\u043c \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430 \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u043c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u043e\u0434\u0430. \u0412 \u043e\u0431\u0449\u0435\u043c, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0443\u0442\u044c \u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0432\u043e \u0432\u0441\u0435\u043c \u0442\u0435\u0441\u0442\u0435. \u0418\u0442\u0430\u043a, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u0443 \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0446\u0432\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. <\/p>\n<p>  <\/p>\n<table>\n<tr>\n<td colspan=\"2\" rowspan=\"2\"><\/td>\n<td colspan=\"2\">\u0412\u0435\u0440\u043d\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430<\/td>\n<\/tr>\n<tr>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math><\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aca\/400\/f2d\/aca400f2da98b443c10687ad0da2c95b.svg\" alt=\"$H_1$\" data-tex=\"inline\"\/><\/math><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\u041e\u0442\u0432\u0435\u0442 \u0442\u0435\u0441\u0442\u0430<\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math><\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u043f\u0440\u0438\u043d\u044f\u0442\u0430<\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0430 <br \/>  (\u043e\u0448\u0438\u0431\u043a\u0430 II \u0440\u043e\u0434\u0430)<\/td>\n<\/tr>\n<tr>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aca\/400\/f2d\/aca400f2da98b443c10687ad0da2c95b.svg\" alt=\"$H_1$\" data-tex=\"inline\"\/><\/math><\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u043e\u0442\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u0430 <br \/>  (\u043e\u0448\u0438\u0431\u043a\u0430 I \u0440\u043e\u0434\u0430)<\/td>\n<td><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u043e\u0442\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u0430<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<p>\u0412\u0432\u0435\u0434\u0435\u043c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u0439. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/91a\/c56\/7ad\/91ac567ad689d6301c495f100539e6e3.svg\" alt=\"$\\alpha = P\\left(H_1 \\mid H_0\\right)$\" data-tex=\"inline\"\/><\/math>, \u0442.\u0435. \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0435\u0440\u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430. \u042d\u0442\u0430 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c\u044e (statistical significance). \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u043e\u0434\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f17\/5e6\/e0d\/f175e6e0d494d54897e809e40f0c2227.svg\" alt=\"$\\beta = P\\left(H_0 \\mid H_1\\right)$\" data-tex=\"inline\"\/><\/math>. \u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/549\/b8e\/ab7\/549b8eab724b1b8d035510be3cc5e854.svg\" alt=\"$1 - \\beta$\" data-tex=\"inline\"\/><\/math> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c\u044e (statistical power). <\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0430\u0432\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cb6\/62e\/c5f\/cb662ec5ff644d9b7ab6c794424f515d.svg\" alt=\"$\\mu_c$\" data-tex=\"inline\"\/><\/math>, \u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d00\/b53\/706\/d00b5370605f673e4daaea79e8b28ac3.svg\" alt=\"$\\mu_t$\" data-tex=\"inline\"\/><\/math>. \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u044b\u0448\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f (\u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0435\u043b\u0435\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f). \u0422\u043e\u0433\u0434\u0430 \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0430\u0432\u0435\u0435 \u043f\u043e\u0440\u043e\u0433\u0430, \u043d\u043e \u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b, \u0442\u043e \u043c\u044b \u0435\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043f\u0438\u0448\u0435\u043c \u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u043e\u0434\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0430\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u043d\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c, \u0440\u0430\u0432\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f39\/05b\/5cf\/f3905b5cfab08d98b2d380d5ea75c66c.svg\" alt=\"$\\beta$\" data-tex=\"inline\"\/><\/math>. \u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/549\/b8e\/ab7\/549b8eab724b1b8d035510be3cc5e854.svg\" alt=\"$1 - \\beta$\" data-tex=\"inline\"\/><\/math>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435, \u043c\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0435\u043c \u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435. \u041f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 mu_c = 0.1 mu_t = 0.6  # \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 s_c = 0.25 s_t = 0.3  # \u043f\u043e\u0440\u043e\u0433: \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0432\u044b\u0448\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430, # \u043c\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u043c \u0435\u0435 \u043a \u0441\u0438\u043d\u0435\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e c = 1.3*(mu_c + mu_t)\/2<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">support = np.linspace(     stats.norm.ppf(0.0001, loc=mu_c, scale=s_c),      stats.norm.ppf(1 - 0.0005, loc=mu_t, scale=s_t), 1000) y1 = stats.norm.pdf(support, loc=mu_c, scale=s_c) y2 = stats.norm.pdf(support, loc=mu_t, scale=s_t)  fig, ax = plt.subplots() ax.plot(support, y1, color='r', label='y1: control') ax.plot(support, y2, color='b', label='y2: treatment') ax.set_ylim(0, 1.1*np.max([             stats.norm.pdf(mu_c, loc=mu_c, scale=s_c),             stats.norm.pdf(mu_t, loc=mu_t, scale=s_t)         ])) ax.axvline(c, color='g', label='c: critical value') ax.axvline(mu_c, color='r', alpha=0.3, linestyle='--', label='mu_c') ax.axvline(mu_t, color='b', alpha=0.3, linestyle='--', label='mu_t') ax.fill_between(support[support &lt;= c],                  y2[support &lt;= c],                  color='b', alpha=0.2, label='b: power') ax.fill_between(support[support &gt;= c],                  y1[support &gt;= c],                  color='r', alpha=0.2, label='a: significance')  ax.legend(loc='upper right', prop={'size': 20}) ax.set_title('A\/B test setup for sample size estimation', fontsize=20) ax.set_xlabel('Values') ax.set_ylabel('Propabilities')  plt.show()<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/475\/9e5\/ebc\/4759e5ebcfc54b11a852704017d2d8ac.png\"\/>  <\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u043e\u0433 \u0431\u0443\u043a\u0432\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b58\/414\/e96\/b58414e960548906adae5a204bed502e.svg\" alt=\"$c$\" data-tex=\"inline\"\/><\/math>. \u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/daa\/66b\/f18\/daa66bf18188f351f60b14ea9c4eaeab.svg\" alt=\"$\\large c = \\mu + t\\frac{\\sigma}{\\sqrt{n}} $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/711\/69c\/9bc\/71169c9bc77ff4aa13dbc8c2c0fbf91d.svg\" alt=\"$t = P\\left(X \\leq t\\right), X \\sim \\mathcal{N}\\left(0, 1\\right)$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0424\u0443\u043d\u043a\u0446\u0438\u044f_\u043e\u0448\u0438\u0431\u043e\u043a\">\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f39\/05b\/5cf\/f3905b5cfab08d98b2d380d5ea75c66c.svg\" alt=\"$\\beta$\" data-tex=\"inline\"\/><\/math> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/546\/143\/474\/5461434746cd62f0cd35b1ef424d0fd8.svg\" alt=\"$\\large\\left\\{ {c = \\theta_c + t_{\\alpha}\\sqrt{\\frac{\\theta_c\\left(1 - \\theta_c\\right)}{n}}\\atop c = \\theta_t + t_{\\beta}\\sqrt{\\frac{\\theta_t\\left(1 - \\theta_t\\right)}{n}}} \\right. $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0438\u0432 \u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math>, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0446\u0435\u043d\u043a\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u043d\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ecc\/f7d\/b11\/eccf7db11534967cb49b300d8a9429dc.svg\" alt=\"$\\large \\begin{array}{rcl} \\theta_c + t_{\\alpha}\\sqrt{\\frac{\\theta_c\\left(1 - \\theta_c\\right)}{n}} &amp;=&amp; \\theta_t + t_{\\beta}\\sqrt{\\frac{\\theta_t\\left(1 - \\theta_t\\right)}{n}} \\\\ \\theta_c \\sqrt{n} + t_{\\alpha}\\sqrt{\\theta_c\\left(1 - \\theta_c\\right)} &amp;=&amp; \\theta_t \\sqrt{n} + t_{\\beta}\\sqrt{\\theta_t\\left(1 - \\theta_t\\right)} \\\\ n &amp;=&amp; \\left(\\frac{t_{\\beta}\\sqrt{\\theta_t\\left(1 - \\theta_t\\right)} - t_{\\alpha}\\sqrt{\\theta_c\\left(1 - \\theta_c\\right)}}{\\theta_c - \\theta_t}\\right)^2 \\end{array} $\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/19b\/617\/3d1\/19b6173d110982844e0d04e58d31d2ec.svg\" alt=\"$0.001$\" data-tex=\"inline\"\/><\/math>, \u0430 \u043d\u043e\u0432\u043e\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b7c\/87f\/215\/b7c87f215d1608a29018a16ee76631cc.svg\" alt=\"$0.0011$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/45c\/0b7\/c08\/45c0b7c089a418707da519ef736dc890.svg\" alt=\"$\\alpha = \\beta = 0.01$\" data-tex=\"inline\"\/><\/math> \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c <strong>2 269 319<\/strong> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e. \u0410 \u043d\u043e\u0432\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0435\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8d0\/ef4\/3d9\/8d0ef43d9509feda1f768de8f2fd86a1.svg\" alt=\"$0.00104$\" data-tex=\"inline\"\/><\/math>. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def get_size(theta_c, theta_t, alpha, beta):     # \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f     t_alpha = stats.norm.ppf(1 - alpha, loc=0, scale=1)     t_beta = stats.norm.ppf(beta, loc=0, scale=1)     # \u0440\u0435\u0448\u0430\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e n     n = t_alpha*np.sqrt(theta_t*(1 - theta_t))     n -= t_beta*np.sqrt(theta_c*(1 - theta_c))     n \/= theta_c - theta_t     return int(np.ceil(n*n))  n_max = get_size(0.001, 0.0011, 0.01, 0.01) print n_max # \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u0440\u043e\u0433, \u0432\u044b\u0448\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f H_0 print 0.001 + stats.norm.ppf(1 - 0.01, loc=0, scale=1)*np.sqrt(0.001*(1 - 0.001)\/n_max)  &gt;&gt;&gt;2269319 &gt;&gt;&gt;0.00104881009215<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0439\u0442\u0438 \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u0443 \u043d\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3f\/cb7\/d34\/f3fcb7d3449503894ab2f25ecf2e325d.svg\" alt=\"$\\theta_t$\" data-tex=\"inline\"\/><\/math> \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0431\u0438\u0437\u043d\u0435\u0441 \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0435\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/733\/df0\/7e7\/733df07e7faf8fb5072e84c4b82213f1.svg\" alt=\"$\\theta_c$\" data-tex=\"inline\"\/><\/math> \u043d\u0430 \u043d\u043e\u0432\u0443\u044e; \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u0440\u043e\u0433\u043e, \u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u0435\u0434\u044c \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0442\u0435\u0441\u0442, \u0430 \u044d\u0442\u043e \u043f\u043e\u0442\u0435\u0440\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u0438 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0438\u0441\u043a, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0442\u0441\u044f);<\/li>\n<li>\u043a\u0430\u043a\u043e\u0439 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math> \u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f39\/05b\/5cf\/f3905b5cfab08d98b2d380d5ea75c66c.svg\" alt=\"$\\beta$\" data-tex=\"inline\"\/><\/math> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c (\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0442\u0443\u0442 \u0435\u0449\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b58\/414\/e96\/b58414e960548906adae5a204bed502e.svg\" alt=\"$c$\" data-tex=\"inline\"\/><\/math>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math> \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438, \u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u043b\u0438\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3f\/cb7\/d34\/f3fcb7d3449503894ab2f25ecf2e325d.svg\" alt=\"$\\theta_t$\" data-tex=\"inline\"\/><\/math> \u0432\u044b\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b58\/414\/e96\/b58414e960548906adae5a204bed502e.svg\" alt=\"$c$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e \u043c\u044b \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math> \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aca\/400\/f2d\/aca400f2da98b443c10687ad0da2c95b.svg\" alt=\"$H_1$\" data-tex=\"inline\"\/><\/math> \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043c\u044b \u0435\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u043c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c2d\/7bb\/c01\/c2d7bbc0197b2085c2d03311ec70b319.svg\" alt=\"$\\alpha \\cdot 100\\%$\" data-tex=\"inline\"\/><\/math> \u0448\u0430\u043d\u0441\u043e\u0432 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u043e\u0434\u0430, \u0442.\u0435. \u043c\u044b \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e. \u0418 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/546\/007\/77d\/54600777df2cf36145c770ad232c380a.svg\" alt=\"$\\left(1 - \\beta\\right)\\cdot 100\\%$\" data-tex=\"inline\"\/><\/math> \u0448\u0430\u043d\u0441\u043e\u0432, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u043e\u0432\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043b\u0443\u0447\u0448\u0435, \u0442\u043e \u043c\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u0447\u0442\u043e \u0435\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0438. \u041d\u043e \u0441\u0430\u043c\u043e\u0435 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0433\u043d\u0430\u043b\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438, \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b52\/00d\/413\/b5200d413bc14a2e11511a09b1916dc3.svg\" alt=\"$\\theta_t &lt; c$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u044b \u043d\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0445\u0443\u0436\u0435: \u043c\u044b \u043a\u0430\u043a \u0431\u044b\u043b\u0438 \u0432 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c. \u0422\u0430\u043a\u0438\u0435 \u0434\u0435\u043b\u0430.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u044b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0430\u0431\u0437\u0430\u0446\u0435, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0441. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043f\u0430\u0440\u0443 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0440\u0443\u0431\u043b\u0435\u0439 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u0432\u044b \u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u00ab\u043d\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043b\u0443\u0447\u0448\u0435\u00bb. \u041a\u0441\u0442\u0430\u0442\u0438 \u043d\u0430\u0441\u0447\u0435\u0442, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439: \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c, \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438 \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u041d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0440\u0430\u0437\u043c\u0430\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f, \u0442.\u0435. \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0446\u0435\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043e\u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u044d\u0442\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0435. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435\u0447\u0435\u0441\u0442\u043d\u043e\u0435: \u043f\u0440\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0430\u0445\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043e\u043d\u043e \u0435\u0449\u0435 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0441\u043e\u0442\u0443, \u0442.\u043a. \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439. <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0438\u0441\u0443\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0433\u0438\u0444\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/www.imagemagick.org\/script\/convert.php\">Imagemagick Convert Tool<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"python\">np.random.seed(1342)  p_c = 0.3  p_t = 0.4 alpha = 0.05 beta = 0.2  n_max = get_size(p_c, p_t, alpha, beta) c = p_c + stats.norm.ppf(1 - alpha, loc=0, scale=1)*np.sqrt(p_c*(1 - p_c)\/n_max) print n_max, c  def plot_sample_size_frames(do_dorm, width, height):     left_x = c - width     right_x = c + width      n_list = range(5, n_max, 1) + [n_max]     for f in glob.glob(&quot;.\/..\/images\/sample_size_gif\/*_%s.*&quot; %                         ('normed' if do_dorm else 'real')):         os.remove(f)     for n in tqdm_notebook(n_list):         s_c = np.sqrt(p_c*(1 - p_c)\/n)         s_t = np.sqrt(p_t*(1 - p_t)\/n)          c_c = p_c + stats.norm.ppf(1 - alpha, loc=0, scale=1)*s_c         c_t = p_t + stats.norm.ppf(beta, loc=0, scale=1)*s_t          support = np.linspace(left_x, right_x, 1000)         y_c = stats.norm.pdf(support, loc=p_c, scale=s_c)         y_t = stats.norm.pdf(support, loc=p_t, scale=s_t)         if do_dorm:             y_c \/= max(y_c.max(), y_t.max())             y_t \/= max(y_c.max(), y_t.max())          fig, ax = plt.subplots()         ax.plot(support, y_c, color='r', label='y control')         ax.plot(support, y_t, color='b', label='y treatment')          ax.set_ylim(0, height)         ax.set_xlim(left_x, right_x)          ax.axvline(c, color='g', label='c')         ax.axvline(c_c, color='m', label='c_c')         ax.axvline(c_t, color='c', label='c_p')         ax.axvline(p_c, color='r', alpha=0.3, linestyle='--', label='p_c')         ax.axvline(p_t, color='b', alpha=0.3, linestyle='--', label='p_t')          ax.fill_between(support[support &lt;= c_t],                          y_t[support &lt;= c_t],                          color='b', alpha=0.2, label='b: power')         ax.fill_between(support[support &gt;= c_c],                          y_c[support &gt;= c_c],                          color='r', alpha=0.2, label='a: significance')          ax.legend(loc='upper right', prop={'size': 20})          ax.set_title('Sample size: %i' % n, fontsize=20)          fig.savefig('.\/..\/images\/sample_size_gif\/%i_%s.png' %                      (n, 'normed' if do_dorm else 'real'), dpi=80)          plt.close(fig)  plot_sample_size_frames(do_dorm=True, width=0.5, height=1.1) plot_sample_size_frames(do_dorm = False, width=1, height=2.5)  !convert -delay 5 $(for i in $(seq 5 1 142); do echo .\/..\/images\/sample_size_gif\/${i}_normed.png; done) -loop 0 .\/..\/images\/sample_size_gif\/sample_size_normed.gif for f in glob.glob(&quot;.\/..\/images\/sample_size_gif\/*_normed.png&quot;):     os.remove(f)  !convert -delay 5 $(for i in $(seq 5 1 142); do echo .\/..\/images\/sample_size_gif\/${i}_real.png; done) -loop 0 .\/..\/images\/sample_size_gif\/sample_size_real.gif for f in glob.glob(&quot;.\/..\/images\/sample_size_gif\/*_real.png&quot;):     os.remove(f)<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0427\u0438\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7a7\/f72\/a9a\/7a7f72a9aed346f0b055f234a3f87445.gif\"\/>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b11\/594\/eb2\/b11594eb2fc744b7a19f3907f1e8ce27.gif\"\/>  <\/p>\n<p>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043f\u0440\u043e A\/B\/n-\u0442\u0435\u0441\u0442\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e n. \u041c\u044b \u0436\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b. \u0412\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 n \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u0432\u0441\u0435\u0433\u043e 5. \u041d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u044b\u043c \u0441\u0447\u0435\u0442\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0442\u0440\u0430\u0444\u0438\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430 5 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0432\u044b\u0448\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b58\/414\/e96\/b58414e960548906adae5a204bed502e.svg\" alt=\"$c$\" data-tex=\"inline\"\/><\/math>. \u041d\u043e \u043c\u044b \u0442\u043e \u0441 \u0432\u0430\u043c\u0438 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/38e\/996\/233\/38e996233b69b327dfc2a851bcb67088.svg\" alt=\"$n\\frac{k - 1}{k} = n \\frac{4}{5}$\" data-tex=\"inline\"\/><\/math> (\u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/839\/452\/3d1\/8394523d1f4bab66a8544cd365388d87.svg\" alt=\"$k$\" data-tex=\"inline\"\/><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439) \u043d\u0430 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043f\u043b\u043e\u0445\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u043f\u043b\u043e\u0445\u0438\u0435. \u0410 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u043b\u043e\u0445\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e, \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043d\u0430\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u0447\u0435\u043c \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0443 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0441 \u0434\u043e\u0431\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f A\/B\/n-\u0442\u0435\u0441\u0442\u043e\u0432, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u043a \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0438\u043f\u043e\u0442\u0435\u0437. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/114\/307\/e4b\/114307e4bd883bf0bdde46d49a931b0d.svg\" alt=\"$\\alpha = 0.05$\" data-tex=\"inline\"\/><\/math>, \u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u043f\u044f\u0442\u044c, \u0442\u043e\u0433\u0434\u0430:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/370\/b7f\/f4d\/370b7ff4d7fa4e753dcf267cda065865.svg\" alt=\"$\\large\\begin{array}{rcl} P\\left(\\text{\u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439}\\right) &amp;=&amp; 1 - P\\left(\\text{\u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b}\\right) \\\\ &amp;=&amp; 1 - \\left(1 - 0.05\\right)^5 \\\\ &amp;=&amp; 1 - 0.95^5 \\\\ &amp;\\approx&amp; 0.2262 \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b, \u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2b0\/111\/f23\/2b0111f2389eaf8c3372b06df8fc81c1.svg\" alt=\"$22.62\\%$\" data-tex=\"inline\"\/><\/math> \u0448\u0430\u043d\u0441\u043e\u0432, \u0447\u0442\u043e \u043c\u044b \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430? \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math> \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u044b \u0441\u0432\u043e\u0438 p-values <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/820\/8f4\/636\/8208f46368a6c37bc01d6a81fa84d671.svg\" alt=\"$p_i$\" data-tex=\"inline\"\/><\/math> (\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/58b\/469\/032\/58b469032be3b2be41034475944fd45a.svg\" alt=\"$H_0$\" data-tex=\"inline\"\/><\/math>, \u0430 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math>). \u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/17e\/d16\/be1\/17ed16be17023e4cd19584781c333593.svg\" alt=\"$n$\" data-tex=\"inline\"\/><\/math> \u0440\u0430\u0437:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a1b\/aba\/ac5\/a1babaac5063e7d9c21fe3950446d214.svg\" alt=\"$\\large\\begin{align} P \\left({ \\bigcup_{i=1}^{n}\\left( p_i&lt;\\frac{\\alpha}{n}\\right) }\\right) &amp;\\le \\sum_{i=1}^{n}P\\left(p_i&lt;\\frac{\\alpha}{n}\\right)\\\\ &amp;\\le \\sum_{i=1}^{n}\\frac{\\alpha}{n}\\\\ &amp;= n \\frac{\\alpha}{n}\\\\ &amp;= \\alpha \\end{align}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u043d\u0430\u0447\u0438\u043c, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/114\/307\/e4b\/114307e4bd883bf0bdde46d49a931b0d.svg\" alt=\"$\\alpha = 0.05$\" data-tex=\"inline\"\/><\/math>. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b87\/c86\/ac8\/b87c86ac8d2bc22856ba9277a7b63a8f.svg\" alt=\"$\\large\\begin{array}{rcl} P\\left(\\text{\u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439}\\right) &amp;=&amp; 1 - P\\left(\\text{\u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b}\\right) \\\\ &amp;=&amp; 1 - \\left(1 - 0.01\\right)^5 \\\\ &amp;=&amp; 1 - 0.99^5 \\\\ &amp;\\approx&amp; 0.0491 \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0442\u0440\u044e\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f_\u043d\u0430_\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435_\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\">\u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0425\u043e\u043b\u043c\u0430-\u0411\u043e\u043d\u0444\u0435\u0440\u043e\u043d\u043d\u0438<\/a>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0433\u043d\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e <strong>2 269 319<\/strong> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u043e \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043d\u0443\u0436\u043d\u043e <strong>2 853 873<\/strong> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e. \u0410 \u044d\u0442\u043e, \u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u043e\u0447\u043a\u0443, \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/df3\/e09\/8fe\/df3e098fe53ce8a817e5d8402d3548be.svg\" alt=\"$26\\%$\" data-tex=\"inline\"\/><\/math> \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043d\u0438\u0436\u043a\u0443 \u043f\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435. \u0422\u0430\u043a\u0438\u0435 \u0434\u0435\u043b\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u0437\u043e\u043c\u0431\u0438-\u043b\u043e\u0441\u043e\u0441\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/128\/602\/bae\/128602bae2c2407f9313b309a969e651.jpg\"  width=\"480\"\/><\/div>\n<p>  <\/p>\n<p>\u0412 2012 \u0433\u043e\u0434\u0443 <a href=\"http:\/\/prefrontal.org\/files\/posters\/Bennett-Salmon-2009.pdf\">\u0440\u044f\u0434 \u0430\u0432\u0442\u043e\u0440\u043e\u0432<\/a> \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0428\u043d\u043e\u0431\u0435\u043b\u0435\u0432\u0441\u043a\u0443\u044e \u043f\u0440\u0435\u043c\u0438\u044e \u043f\u043e \u043d\u0435\u0439\u0440\u043e\u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u043c\u043e\u0437\u0433\u043e\u0432\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u0432 \u043c\u0451\u0440\u0442\u0432\u043e\u043c \u043b\u043e\u0441\u043e\u0441\u0435. \u041a\u0430\u043a \u0442\u0430\u043a? \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u041c\u0420\u0422. \u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0448\u0430\u0440, \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u043b\u043e\u043c \u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u041d\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u0438 \u043d\u0435 \u0432\u0435\u0441\u0435\u043b\u043e. \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0446\u0435\u043b\u0443\u044e \u0442\u0443\u0448\u043a\u0443 \u0430\u0442\u043b\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u043e\u0441\u043e\u0441\u044f. \u0420\u044b\u0431\u043a\u0443 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u041c\u0420\u0422 \u0438 \u0441\u0442\u0430\u043b\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043b\u044e\u0434\u044c\u043c\u0438 \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. <\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/62c\/ee3\/938\/62cee393885840bda857142c4a1c67b4.jpg\"  width=\"480\"\/><\/div>\n<p>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0442\u043e \u0431\u044b\u043b\u0430 \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043c\u043e\u0437\u0433\u0443 \u0434\u043e\u0445\u043b\u043e\u0433\u043e \u043b\u043e\u0441\u043e\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0435\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0441 \u043b\u044e\u0434\u044c\u043c\u0438. \u0410\u043f\u043f\u0430\u0440\u0430\u0442 \u041c\u0420\u0422 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0442\u0430\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043e\u043a\u0441\u0435\u043b\u0438 \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0431 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0437\u0433\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043e\u043a\u0441\u0435\u043b\u044f (\u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u0438\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435). \u0418 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u0411\u043e\u043d\u0444\u0435\u0440\u043e\u043d\u043d\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u043b\u043e\u0441\u043e\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0438\u043c\u0443\u043b\u0430\u043c\u0438 \u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u0435\u0439 \u043c\u043e\u0437\u0433\u0430, \u0442.\u0435. \u043c\u0435\u0440\u0442\u0432\u044b\u0439 \u043b\u043e\u0441\u043e\u0441\u044c \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0441\u0442\u0438\u043c\u0443\u043b\u044b. \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443, \u0442\u043e \u043c\u0435\u0440\u0442\u0432\u044b\u0439 \u043b\u043e\u0441\u043e\u0441\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0440\u0442\u0432\u044b\u043c. <\/p>\n<p>  <\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0434\u0443\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u0428\u043d\u043e\u0431\u0435\u043b\u0435\u0432\u0441\u043a\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043a\u043e\u043b\u044b, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u043d\u0435\u0441\u043b\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 \u043d\u0430\u0443\u043a\u0443. \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u043d\u0435\u0439\u0440\u043e\u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043e 2010 \u0433\u043e\u0434\u0430 \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043a\u043e\u043b\u043e 40 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0433\u0438\u043f\u043e\u0442\u0435\u0437. \u041f\u043e\u0441\u043b\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u043b\u043e\u0441\u043e\u0441\u044c, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u043d\u0435\u0439\u0440\u043e\u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0443, \u0443\u043f\u0430\u043b\u043e \u0434\u043e 10 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h1 id=\"bayesovskie-mnogorukie-bandity\">\u0411\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u0440\u0443\u043a\u0438\u0435 \u0431\u0430\u043d\u0434\u0438\u0442\u044b<\/h1>\n<p>  <\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0431\u0430\u043d\u0434\u0438\u0442\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445. A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u043a\u0430 \u043d\u0430\u0437\u0430\u0434, \u0438 \u0437\u0430 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0430, \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0445\u043e\u0437\u044f\u0439\u0441\u0442\u0432\u043e, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0430 \u0438 \u0442. \u0434. \u0423 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430 (\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0439 \u0431\u043e\u043b\u0435\u0437\u043d\u0438: \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0449\u0435 \u043d\u0430\u0439\u0442\u0438 \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u044f\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0435\u0442\u043a\u0443, \u043d\u0435 \u0437\u043d\u0430\u044f, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e\u043c \u0438\u043b\u0438 \u043f\u043b\u0430\u0446\u0435\u0431\u043e);<\/li>\n<li>\u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u0434\u043e\u0440\u043e\u0433\u043e (\u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u0444\u0430\u043a\u0442 \u0438\u0437 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u044b: \u0435\u0441\u043b\u0438 \u0444\u0430\u0440\u043c-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0441\u043f\u0443\u0441\u0442\u044f 10 \u043b\u0435\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e\u0439 \u0444\u0430\u0440\u043c-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0435\u0446, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u044e\u0434\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0439 \u0434\u043e\u0432\u0435\u0440\u0438\u043b\u0438\u0441\u044c).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0431\u044e\u0434\u0436\u0435\u0442. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u043e\u0448\u0438\u0431\u043a\u0438: \u0441\u043a\u0430\u0436\u0435\u043c, \u043c\u0435\u0434\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f39\/05b\/5cf\/f3905b5cfab08d98b2d380d5ea75c66c.svg\" alt=\"$\\beta$\" data-tex=\"inline\"\/><\/math>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0435 \u0442\u0430\u043a \u0432\u043e\u043b\u043d\u0443\u0435\u0442 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0432\u043e\u043b\u043d\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0446\u0435\u043f\u0442\u0430 \u0431\u0443\u0440\u0433\u0435\u0440\u043e\u0432 \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0445\u0443\u0436\u0435 \u0441\u0442\u0430\u0440\u043e\u0433\u043e; \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0448\u0438\u0431\u043b\u0438\u0441\u044c \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0442.\u0435. \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0446\u0435\u043f\u0442 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043c\u044b \u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u044f\u043b\u0438, \u0442\u043e \u044d\u0442\u043e \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0435\u043c, \u0442.\u043a. \u0434\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u0433\u043e \u0434\u043d\u044f \u043c\u044b \u0432\u0435\u0434\u044c \u043a\u0430\u043a-\u0442\u043e \u0436\u0438\u043b\u0438 \u0441 \u044d\u0442\u0438\u043c \u0438 \u043d\u0435 \u0440\u0430\u0437\u043e\u0440\u0438\u043b\u0438\u0441\u044c. \u0412\u043e\u043f\u0440\u043e\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u044e\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d \u0443 \u043d\u0430\u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u0435\u043d, \u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u043c \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043e\u0431\u0430 \u043f\u043e\u0440\u043e\u0433\u0430 \u043a \u043d\u0443\u043b\u044e \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0432 \u043c\u0438\u0440\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u0441\u0451 \u043d\u0435 \u0442\u0430\u043a \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u043a\u0430\u043a \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445. \u0426\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u043b\u0438\u0437\u043a\u0430 \u043a \u043d\u0443\u043b\u044e, \u0446\u0435\u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0442\u043e\u0436\u0435 \u0431\u043b\u0438\u0437\u043a\u0430 \u043a \u043d\u0443\u043b\u044e. \u0414\u0430, \u044d\u0442\u043e \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c A\/B-\u0442\u0435\u0441\u0442\u044b. \u041d\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043b\u0443\u0447\u0448\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0438 \u0434\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442, \u043a\u0430\u043a\u0430\u044f \u0438\u0437 \u043d\u0438\u0445, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435, \u0430 \u0435\u0449\u0451 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043b\u0443\u0447\u0448\u0435, \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u043d\u0430 \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/407\/4f6\/c96\/4074f6c9670b406ca13b1f720415c7d1.jpg\" \/><\/div>\n<p>  <\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0436\u0438\u0442\u044c \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438: \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e (exploration vs exploitaion trade-off). \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 (\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043a\u043d\u043e\u043f\u043a\u0438) \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 A\/B-\u0442\u0435\u0441\u0442\u0430 \u043c\u044b \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u0440\u0430\u0432\u043d\u044b\u0435 \u0434\u043e\u043b\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e). \u041d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0438 \u0437\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e, \u0438\u043b\u0438 \u0441\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u043c\u043e\u0434\u0430 \u043d\u0430 \u0446\u0432\u0435\u0442\u0430 \u043a\u043d\u043e\u043f\u043e\u043a, \u043c\u044b \u0431\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0435 \u0431\u0430\u043d\u0434\u0438\u0442\u044b. \u0412\u043e\u0442 \u043e\u043d\u0438.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5cf\/d77\/762\/5cfd77762bc3436a84074095b73abae0.jpg\" \/><\/div>\n<p>  <\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0437\u0438\u043d\u043e, \u0438 \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0440\u044f\u0434 \u0438\u0433\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 \u00ab\u043e\u0434\u043d\u043e\u0440\u0443\u043a\u0438\u0439 \u0431\u0430\u043d\u0434\u0438\u0442\u00bb. \u0423 \u0432\u0430\u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u043d\u0435\u0433 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0439\u0442\u0438 \u043b\u0443\u0447\u0448\u0438\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043d\u0435\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432. \u0422\u0430\u043a\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043e \u043c\u043d\u043e\u0433\u043e\u0440\u0443\u043a\u043e\u043c \u0431\u0430\u043d\u0434\u0438\u0442\u0435. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e12\/dff\/45a\/e12dff45a7ed01bc64ba2aeb4d34a2bc.svg\" alt=\"$\\epsilon$\" data-tex=\"inline\"\/><\/math>-\u0436\u0430\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e12\/dff\/45a\/e12dff45a7ed01bc64ba2aeb4d34a2bc.svg\" alt=\"$\\epsilon$\" data-tex=\"inline\"\/><\/math> \u0434\u0435\u0440\u0433\u0430\u0435\u0442\u0435 \u0437\u0430 \u0442\u0443 \u0440\u0443\u0447\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0430 \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u0438 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c7a\/09d\/4bd\/c7a09d4bdbada5d76e8a7afae6e2b4e1.svg\" alt=\"$1 - \\epsilon$\" data-tex=\"inline\"\/><\/math> \u0432\u044b \u0434\u0435\u0440\u0433\u0430\u0435\u0442\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0440\u0443\u043a\u0443 (\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u0440\u044b\u0447\u0430\u0433 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430). \u0415\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u043e\u0442\u0435\u0440\u044c \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439. \u041d\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Thompson_sampling\">\u0441\u0435\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0422\u043e\u043c\u043f\u0441\u043e\u043d\u0430<\/a> \u0438 \u0442\u0435\u043e\u0440\u0435\u043c\u0435 \u0411\u0430\u0439\u0435\u0441\u0430. \u0421\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u043e\u0432\u044b\u0439 (1933 \u0433\u043e\u0434), \u043d\u043e \u043e\u043d \u0441\u0442\u0430\u043b \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u043f\u043e\u0445\u0443 \u043e\u043d\u043b\u0430\u0439\u043d-\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. Yahoo \u0431\u044b\u043b\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 2010-\u044b\u0445 \u0433\u043e\u0434\u043e\u0432. \u041f\u043e\u0437\u0436\u0435 Microsoft \u0441\u0442\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 CTR-\u0431\u0430\u043d\u043d\u0435\u0440\u043e\u0432 \u0432 \u0432\u044b\u0434\u0430\u0447\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 Bing. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u0430\u0441\u0441\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0438\u043c\u0438. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435\u043c, \u0437\u0430 \u043e\u0434\u043d\u0438\u043c \u043b\u0438\u0448\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c: \u0432 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u0431\u0430\u043d\u0434\u0438\u0442\u0430\u043c\u0438 \u0430\u0433\u0435\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0430 \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u0430\u0433\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0440\u0435\u0434\u0443.<\/p>\n<p>  <\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0431\u0430\u043d\u0434\u0438\u0442\u0441\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041f\u0443\u0441\u0442\u044c \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b6\/547\/e8d\/9b6547e8d3f9c2d6f92fbc781ac55660.svg\" alt=\"$t$\" data-tex=\"inline\"\/><\/math> \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0433\u0440\u0430\u0434 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/895\/c76\/36a\/895c7636ac0f65f445b0a74a91c59329.svg\" alt=\"$\\vec{y}_t = \\left(y_1, y_2, \\ldots, y_t\\right)$\" data-tex=\"inline\"\/><\/math>. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b6\/547\/e8d\/9b6547e8d3f9c2d6f92fbc781ac55660.svg\" alt=\"$t$\" data-tex=\"inline\"\/><\/math> \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6e8\/2bf\/ada\/6e82bfada1628f966e656803f44dc211.svg\" alt=\"$a_t$\" data-tex=\"inline\"\/><\/math> (\u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u0430\u043d\u0434\u0438\u0442\u0430, \u0446\u0432\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438). \u0422\u0430\u043a\u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/87f\/0ea\/369\/87f0ea3697ba1c1981db5c1eec3d0831.svg\" alt=\"$y_t$\" data-tex=\"inline\"\/><\/math> \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0430\u0434 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u0430\u043d\u0434\u0438\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c05\/419\/27e\/c0541927eb58ccdbcf675ade5c0f5b0d.svg\" alt=\"$f_{a_t}\\left(y \\mid \\vec{\\theta}\\right)$\" data-tex=\"inline\"\/><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6cd\/b1e\/9d4\/6cdb1e9d4cb25f5d9a5f005ed74e1837.svg\" alt=\"$\\vec{\\theta}$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u0437\u0430\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0433\u0440\u0430\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/18c\/791\/0c7\/18c7910c70c40c9fa8fc73a2dc0cd291.svg\" alt=\"$y_t \\in \\left\\{0, 1\\right\\}$\" data-tex=\"inline\"\/><\/math>, \u0430 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0411\u0435\u0440\u043d\u0443\u043b\u043b\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438. <\/p>\n<p>  <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u043d\u0430\u0433\u0440\u0430\u0434\u043e\u0439 \u0431\u0430\u043d\u0434\u0438\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/366\/a4b\/5c5\/366a4b5c5bdf260210b49a89f904efb9.svg\" alt=\"$a$\" data-tex=\"inline\"\/><\/math> \u0431\u0443\u0434\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/13f\/8fc\/0f5\/13f8fc0f584396878e9a8c4b52a6593f.svg\" alt=\"$\\mu_a\\left(\\vec{\\theta}\\right) = \\mathbb{E}\\left[y_t \\mid \\vec{\\theta}, a_t = a\\right]$\" data-tex=\"inline\"\/><\/math>. \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b, \u0442\u043e \u043c\u044b \u043b\u0435\u0433\u043a\u043e \u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u043d\u0430\u0433\u0440\u0430\u0434\u044b \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0438 \u0431\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0430\u0434\u043e\u0439. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043d\u0430\u043c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043b\u0438\u043a\u0430\u043c\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aac\/6fa\/ab1\/aac6faab1dc0e098f624bfc67d2ff567.svg\" alt=\"$f_a\\left(y \\mid \\theta_a\\right) = \\theta_a^y \\left(1 - \\theta_a\\right)^{1 - y}$\" data-tex=\"inline\"\/><\/math>, \u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f \u043d\u0430\u0433\u0440\u0430\u0434\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/00b\/16d\/008\/00b16d00869b4a545391df2dce136027.svg\" alt=\"$\\mu_a = \\theta_a$\" data-tex=\"inline\"\/><\/math>. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0432\u0435\u0441\u0442\u0438 \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0411\u0435\u0440\u043d\u0443\u043b\u043b\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u043d\u0430\u0433\u0440\u0430\u0434\u0443, \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0443 \u00ab\u0432\u0435\u0440\u0443\u00bb \u0432 \u0431\u0430\u043d\u0434\u0438\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/366\/a4b\/5c5\/366a4b5c5bdf260210b49a89f904efb9.svg\" alt=\"$a$\" data-tex=\"inline\"\/><\/math>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u043e\u0440\u0435\u043c\u0443 \u0411\u0430\u0439\u0435\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0411\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\">\u0431\u0435\u0442\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/a> \u043f\u043e \u0442\u0440\u0435\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0431\u0435\u0442\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u0421\u043e\u043f\u0440\u044f\u0436\u0451\u043d\u043d\u043e\u0435_\u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e\u0435_\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\">\u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u044b\u043c<\/a> \u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0411\u0435\u0440\u043d\u0443\u043b\u043b\u0438, \u0442.\u0435. \u0430\u043f\u043e\u0441\u0442\u0435\u0440\u0438\u043e\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/li>\n<\/ul>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/517\/25b\/a3d\/51725ba3d8b7538c1375da12220d275d.svg\" alt=\"$\\large\\begin{array}{lcr} p\\left(\\theta \\mid y\\right) &amp;\\propto&amp; p\\left(\\theta\\right) \\cdot p\\left(y \\mid \\theta\\right) \\\\ &amp;\\propto&amp; \\frac{1}{\\text{B}\\left(\\alpha, \\beta\\right)} \\theta^{\\alpha - 1} \\left(1 - \\theta\\right)^{\\beta - 1} \\cdot \\theta^y \\left(1 - \\theta\\right)^{1 - y} \\\\ &amp;\\propto&amp; \\theta^{\\alpha - 1 + y} \\left(1 - \\theta\\right)^{\\beta - 1 + 1 - y} \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ad4\/2ff\/d98\/ad42ffd98cda18c0301211e3f9174e1b.svg\" alt=\"$\\large\\begin{array}{lcr} \\text{Beta}\\left(\\alpha + y, \\beta + 1 - y\\right) &amp;=&amp; \\text{Beta}\\left(\\theta \\mid \\alpha, \\beta\\right) \\cdot \\text{Bernoulli}\\left(y \\mid \\theta \\right) \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0ee\/ed9\/72c\/0eeed972c3cb7f49e4648770e671a6d4.svg\" alt=\"$\\alpha = \\beta = 1$\" data-tex=\"inline\"\/><\/math> \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442.\u0435. \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0439 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f); \u0447\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u043d\u0434\u0438\u0442\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043a\u043e\u0448\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 (\u0432\u043b\u0435\u0432\u043e \u2014 \u043d\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043d\u0434\u0438\u0442, \u0432\u043f\u0440\u0430\u0432\u043e \u2014 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0439);<\/li>\n<li>\u043c\u043e\u0434\u0435\u043b\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u0430, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8bb\/e73\/0e9\/8bbe730e90adaf07435b47deee6a1b38.svg\" alt=\"$\\alpha$\" data-tex=\"inline\"\/><\/math> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f39\/05b\/5cf\/f3905b5cfab08d98b2d380d5ea75c66c.svg\" alt=\"$\\beta$\" data-tex=\"inline\"\/><\/math> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439; \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4a4\/194\/3ef\/4a41943effcfd954b128d2cdf73393f9.svg\" alt=\"$\\frac{\\alpha}{\\alpha + \\beta}$\" data-tex=\"inline\"\/><\/math>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b51\/e55\/481\/b51e55481be69dccf0acaf7d2d2b6677.svg\" alt=\"$\\large\\begin{array}{lcr} f\\left(\\theta, \\alpha, \\beta\\right) &amp;=&amp; \\frac{1}{\\text{B}\\left(\\alpha, \\beta\\right)} \\theta^{\\alpha - 1} \\cdot \\left(1 - \\theta\\right)^{\\beta - 1} \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<pre><code class=\"python\">support = np.linspace(0, 1, 1000) fig, ax = plt.subplots() for a, b in [(1, 1), (5, 5), (5, 10), (5, 25), (1, 7), (7, 1)]:     ax.plot(support, stats.beta.pdf(support, a, b),              label='a=%i, b=%i' % (a, b)) ax.legend(loc='upper right', prop={'size': 20}) ax.set_title('Beta PDFs', fontsize=20)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7a6\/b8a\/b59\/7a6b8ab59f7d451dbe52735825c8ba6a.png\"\/>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u0435\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u044b\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0431 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043e\u0440\u0435\u043c\u0443 \u0411\u0430\u0439\u0435\u0441\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u0444\u043e\u0440\u043c\u0430 \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0442\u0435\u043c \u0436\u0435 \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c. \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c:<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5b5\/6ee\/f6c\/5b56eef6c5eb0a7890e1aa02bda7fff4.svg\" alt=\"$\\large\\begin{array}{lcr} \\theta_i &amp;\\sim&amp; \\text{Beta}\\left(\\alpha_i, \\beta_i\\right) \\\\ y_i &amp;\\sim&amp; \\text{Bernoulli}\\left(\\theta_i\\right) \\end{array}$\" data-tex=\"display\"\/><\/math><\/p>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e, \u0432\u043f\u043e\u043b\u043d\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0443: \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442) \u0441\u0435\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0443 \u0431\u0430\u043d\u0434\u0438\u0442\u0430 (\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438) \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e, \u0430 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0448\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c \u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0440\u0443\u043a\u0438. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438, \u0438 \u043c\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043d\u0430\u0448\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438, \u0430 \u0445\u0440\u0430\u043d\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0440\u0443\u043a\u0438, \u0442\u043e \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0435\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 \u0432\u0432\u0435\u0434\u0435\u043c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0435\u043c \u0438\u0445 \u043a \u0435\u0434\u0438\u043d\u0438\u0446\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7b2\/6be\/0e7\/7b26be0e7482aa1a02742a9f592296f7.svg\" alt=\"$\\forall i, \\alpha_i = \\beta_i = 1$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3e\/ac4\/ce8\/f3eac4ce88da49479706d5ac70a1efba.svg\" alt=\"$t = 1, 2, \\ldots$\" data-tex=\"inline\"\/><\/math><br \/> \n<ul>\n<li>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u0430\u043d\u0434\u0438\u0442\u0430 \u0441\u0435\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/425\/936\/12b\/42593612b4f6171db903168419e9b3f5.svg\" alt=\"$\\theta_i \\sim \\text{Beta}\\left(\\alpha_i, \\beta_i\\right)$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0430\u043d\u0434\u0438\u0442\u0430 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0430\u0434\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/32b\/b39\/fb1\/32bb39fb1745d198b87baff7000ff286.svg\" alt=\"$k = \\arg\\max_{i} \\theta_i$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/839\/452\/3d1\/8394523d1f4bab66a8544cd365388d87.svg\" alt=\"$k$\" data-tex=\"inline\"\/><\/math>-\u043e\u0433\u043e \u0431\u0430\u043d\u0434\u0438\u0442\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0433\u0440\u0430\u0434\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4e8\/f00\/4d5\/4e8f004d513c4e1b910df9ff5ecce9cf.svg\" alt=\"$y \\in \\left\\{0, 1\\right\\}$\" data-tex=\"inline\"\/><\/math> (\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0441\u0435\u043c\u043f\u043b\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0433\u0440\u0430\u0434\u0443);<\/li>\n<li>\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f (\u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f batch mode, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043d\u0435 \u043e\u0434\u0438\u043d, \u0430 \u0441\u0435\u0440\u0438\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432): <\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8fe\/f80\/dc8\/8fef80dc8d04afe1b55944ad2f330202.svg\" alt=\"$\\alpha_i := \\alpha_i + y$\" data-tex=\"inline\"\/><\/math>  <\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ed4\/1d0\/559\/ed41d05598b6e3c84ccffba1106c7b19.svg\" alt=\"$\\beta_i := \\beta_i + 1 - y$\" data-tex=\"inline\"\/><\/math>  <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0435\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0422\u043e\u043c\u043f\u0441\u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043c\u043f\u0438\u0440\u0438\u043a\u043e\u0439, \u043d\u043e \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0434\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u0435\u043e\u0440\u0435\u043c\u044b \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f Beta-Bernoulli \u0441\u043b\u0443\u0447\u0430\u044f, \u0442.\u0435. \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/98f\/9d3\/546\/98f9d35466eddf699f1cce69f4de7cf2.svg\" alt=\"$t \\rightarrow \\infty$\" data-tex=\"inline\"\/><\/math> \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u0430\u043d\u0434\u0438\u0442\u044b \u0441 \u0441\u0435\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0422\u043e\u043c\u043f\u0441\u043e\u043d\u0430 \u0441\u043e\u0439\u0434\u0443\u0442\u0441\u044f \u043a \u0432\u0435\u0440\u043d\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e, \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435. \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u0435\u043e\u0440\u0438\u0438, \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u0430 \u043d\u0430 \u043b\u0443\u0447\u0448\u0435\u043c \u0431\u0430\u043d\u0434\u0438\u0442\u0435 \u0437\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/845\/41f\/966\/84541f96630c2bcb35f0bb0911a3fe8d.svg\" alt=\"$\\theta^*$\" data-tex=\"inline\"\/><\/math>, \u0442\u043e \u0434\u043e\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u044d\u0442\u0443 \u043e\u043f\u0446\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/845\/41f\/966\/84541f96630c2bcb35f0bb0911a3fe8d.svg\" alt=\"$\\theta^*$\" data-tex=\"inline\"\/><\/math>; \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c, \u0438 \u0434\u043e\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e, \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438;<\/li>\n<\/ul>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9b7\/854\/690\/9b78546906cd449fa4a060228d74a8a2.png\" \/><\/div>\n<p>  <\/p>\n<ul>\n<li>\u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u0435\u0442\u0430-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f), \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0441\u0451 \u0442\u0435 \u0436\u0435 \u0442\u0435\u0441\u0442\u044b, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438;<\/li>\n<li>\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432, \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u043a\u043e\u0432 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c, \u043c\u044b, \u043a\u0430\u043a \u0431\u0438\u0437\u043d\u0435\u0441, \u0445\u043e\u0442\u0438\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c CTR, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0430\u043d\u0434\u0438\u0442\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c.<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"eksperiment\">\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442<\/h1>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451 \u0442\u0435 \u0436\u0435 \u043f\u044f\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043a\u043d\u043e\u043f\u043a\u0438, \u043d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0443\u0440\u043b\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043f\u043b\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u0443\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e A\/B\/n-\u0442\u0435\u0441\u0442\u0430, \u043d\u0443 \u0438 \u043b\u0430\u0434\u0443\u0448\u043a\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 n_variations = 5  # \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f n_switches = 5  # \u043a\u0430\u0436\u0434\u044b\u0435 n_period_len \u043f\u043e\u043a\u0430\u0437\u043e\u0432 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f n_period_len = 2000  # \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 # \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0440\u0435\u043d\u0434 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0440\u0430\u0432\u043d\u0430 n_period_len p_true_periods = np.array([         [1, 2, 3, 4, 5],         [2, 3, 4, 5, 1],         [3, 4, 5, 2, 1],         [4, 5, 3, 2, 1],         [5, 4, 3, 2, 1]], dtype=np.float32).T**3 p_true_periods \/= p_true_periods.sum(axis=0)  # \u043e\u0442\u0440\u0438\u0441\u0443\u0435\u043c \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 ax = sns.heatmap(p_true_periods) ax.set(xlabel='Periods', ylabel='Variations', title='Probabilities of variations') plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/161\/7b3\/233\/1617b32337b5446caa5bc6ed0bd250e2.png\"\/>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044e: \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u0448\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043a \u043a\u043e\u043d\u0446\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0442\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438\u0437 <code>n_period_len<\/code> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e. <\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u044b \u0447\u0435\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044f (\u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u0430\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0441 \u044f\u0432\u043d\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u043c \u043f\u0438\u043a\u043e\u043c). \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0443\u043a\u0438 (\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438). \u0427\u0435\u043c \u0448\u0438\u0440\u0435 \u0433\u0440\u0430\u0444\u0438\u043a, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u043f\u0440\u044f\u043c\u0430\u044f \u043b\u0438\u043d\u0438\u044f\/\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u0430\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c); \u0447\u0435\u043c \u0443\u0436\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041d\u043e \u0432\u043e\u0442 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043d\u0435 \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e (\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b), \u0430 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434, \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044f. \u041a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u043c \u043d\u043e\u0432\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c \u0432\u0441\u0435 \u0442\u0440\u0443\u0434\u043d\u0435\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043b\u0438\u0434\u0435\u0440\u044b: \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u0432\u0448\u0438\u0445 \u043b\u0438\u0434\u0435\u0440\u043e\u0432 (\u0448\u0438\u0440\u0438\u043d\u0430 \u043f\u0438\u043a\u0430) \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0430\u0441\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u0443\u0441\u043f\u0435\u0432\u0430\u0435\u0442 \u0441\u043e\u0439\u0442\u0438\u0441\u044c \u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0433\u043e\u0432. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f (\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c\u0443, \u0442.\u0435. \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043c\u044b \u0442\u0435\u0440\u044f\u0435\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043e\u0446\u0435\u043d\u043a\u0430\u0445 \u2014 \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e). \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044e \u0431\u0435\u0437 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">x_support = np.linspace(0, 1, 1000)  alpha = dict([(i, [1]) for i in range(n_variations)]) beta = dict([(i, [1]) for i in range(n_variations)])  cmap = plt.get_cmap('jet') colors = [cmap(i) for i in np.linspace(0, 1, n_variations)]  actionspp = []  for ix_period in range(p_true_periods.shape[1]):     p_true = p_true_periods[:, ix_period]     is_converged = False     actions = []     for ix_step in range(n_period_len):         theta = dict([(i, np.random.beta(alpha[i][-1], beta[i][-1]))                        for i in range(n_variations)])         k, theta_k = sorted(theta.items(), key=lambda t: t[1], reverse=True)[0]         actions.append(k)          x_k = np.random.binomial(1, p_true[k], size=1)[0]          alpha[k].append(alpha[k][-1] + x_k)         beta[k].append(beta[k][-1] + 1 - x_k)      expected_reward = dict([(i, alpha[i][-1]\/float(alpha[i][-1] + beta[i][-1]))                              for i in range(n_variations)])     estimated_winner = sorted(expected_reward.items(),                                key=lambda t: t[1],                                reverse=True)[0][0]      print 'Winner is %i' % i     actions_loc = pd.Series(actions).value_counts()     print actions_loc     actionspp.append(actions_loc.to_dict())      for i in range(n_variations):         plt.axvline(x=p_true[i], color=colors[i], linestyle='--',                      alpha=0.3, label='true value of %i' % i)          plt.plot(x_support, stats.beta.pdf(x_support, alpha[i][-1], beta[i][-1]),                   label='distribution of %i' % i, color=colors[i])     plt.legend(prop={'size': 20})     plt.title('Period %i; winner: true is %i, estimated is %i' %                (ix_period,                 p_true.argmax(),                estimated_winner),               fontsize=20)     plt.show()  actionspp = dict(enumerate(actionspp))<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434 \u043f\u0435\u0440\u0432\u044b\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">Winner is 4 4    1953 3      19 2      12 1       8 0       8 dtype: int64<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4b5\/9ee\/aff\/4b59eeaffa484ff38f045ff62f99ebca.png\"\/>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434 \u0432\u0442\u043e\u0440\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">Winner is 4 3    1397 4     593 1       6 2       3 0       1 dtype: int64<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e70\/881\/7ad\/e708817ad3d3457eb76c3fb932f0501e.png\"\/>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434 \u0442\u0440\u0435\u0442\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">Winner is 4 2    1064 3     675 4     255 1       3 0       3 dtype: int64<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/16a\/9de\/61c\/16a9de61cd9b4ef9b766c22612728951.png\"\/>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">Winner is 4 1    983 2    695 4    144 3    134 0     44 dtype: int64<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8e5\/c00\/5d9\/8e5c005d98364f1e8fb5a6d5d77d5bab.png\"\/>  <\/p>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434 \u043f\u044f\u0442\u044b\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">Winner is 4 1    1109 0     888 4       2 2       1 dtype: int64<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/23b\/e06\/58f\/23be0658f0e74f3bb9b90c91a2d687e4.png\"\/>  <\/p>\n<p>\u041e\u0442\u0440\u0438\u0441\u0443\u0435\u043c \u0434\u043e\u043b\u044e \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df = [] for pid in actionspp.keys():     for vid in actionspp[pid].keys():         df.append({                 'Period': pid,                 'Variation': vid,                 'Probapility': actionspp[pid][vid]\/1000.0             }) df = pd.DataFrame(df) ax = sns.barplot(x=&quot;Period&quot;, y=&quot;Probapility&quot;, hue=&quot;Variation&quot;, data=df) ax.set(title=&quot;Ratio of traffic used for variations per period&quot;) plt.show()<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/927\/e7c\/fd7\/927e7cfd7caf4cc696af42c075ec0dc9.png\"\/>  <\/p>\n<p>\u041d\u0443 \u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u043d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u0442\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">n_period_len = 3000  alpha = dict([(i, [1]) for i in range(n_variations)]) beta = dict([(i, [1]) for i in range(n_variations)]) decay = 0.99  plot_step = 25  for f in glob.glob(&quot;.\/..\/images\/mab_gif\/*.png&quot;):     os.remove(f)  img_ix = 0 height = 10 # 15 for ix_period in range(p_true_periods.shape[1]):     p_true = p_true_periods[:, ix_period]     is_converged = False     actions = []     for ix_step in tqdm_notebook(range(n_period_len)):         if ix_step % plot_step == 0:             expected_reward = dict([(i, alpha[i][-1]\/float(alpha[i][-1] + beta[i][-1]))                                      for i in range(n_variations)])             estimated_winner = sorted(expected_reward.items(),                                        key=lambda t: t[1],                                        reverse=True)[0][0]              fig, ax = plt.subplots()             ax.set_ylim(0, height)             ax.set_xlim(0, 1)             for i in range(n_variations):                 ax.axvline(x=p_true[i], color=colors[i], linestyle='--',                             alpha=0.3, label='true value of %i' % i)                  ax.plot(x_support, stats.beta.pdf(x_support, alpha[i][-1], beta[i][-1]),                          label='distribution of %i' % i, color=colors[i])             ax.legend(prop={'size': 20})             ax.set_title('Period %i, step %i; winner: true is %i, estimated is %i' %                           (ix_period,                            ix_step,                           p_true.argmax(),                           estimated_winner),                          fontsize=20)              fig.savefig('.\/..\/images\/mab_gif\/%i.png' % img_ix, dpi=80)             img_ix += 1              plt.close(fig)              theta = dict([(i, np.random.beta(alpha[i][-1], beta[i][-1]))                            for i in range(n_variations)])             k, theta_k = sorted(theta.items(), key=lambda t: t[1], reverse=True)[0]             actions.append(k)              x_k = np.random.binomial(1, p_true[k], size=1)[0]              alpha[k].append(alpha[k][-1] + x_k)             beta[k].append(beta[k][-1] + 1 - x_k)              if decay &gt; 0:                 for i in range(n_variations):                     if i == k:                         continue                     alpha[i].append(max(1, alpha[i][-1]*decay))                     beta[i].append(max(1, beta[i][-1]*decay))  print img_ix  for f in glob.glob(&quot;.\/..\/images\/mab_gif\/mab.gif&quot;):     os.remove(f) !convert -delay 5 $(for i in $(seq 1 1 600); do echo .\/..\/images\/mab_gif\/$i.png; done) -loop 0 .\/..\/images\/mab_gif\/mab.gif for f in glob.glob(&quot;.\/..\/images\/mab_gif\/*.png&quot;):     os.remove(f)<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f (\u0442\u044f\u0436\u0435\u043b\u0430\u044f \u0433\u0438\u0444\u043a\u0430, 40\u043c\u0431)<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7b0\/40f\/a8c\/7b040fa8ccda428e9a16bbea460f47e2.gif\"\/><\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f (\u0442\u044f\u0436\u0435\u043b\u0430\u044f \u0433\u0438\u0444\u043a\u0430, 40\u043c\u0431)<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/09c\/667\/c0c\/09c667c0cf6c4beea71d8049a9fa2c4b.gif\"\/><\/div>\n<\/div>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0431\u0430\u043d\u0434\u0438\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430;<\/li>\n<li>\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043f\u0440\u0438\u043e\u0440\u043d\u044b\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0435 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0ee\/ed9\/72c\/0eeed972c3cb7f49e4648770e671a6d4.svg\" alt=\"$\\alpha = \\beta = 1$\" data-tex=\"inline\"\/><\/math> \u043d\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0435\u0434\u0438\u043d\u0438\u0446\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/520\/4ec\/71d\/5204ec71d0dc5653c0afaa5eefe62acf.svg\" alt=\"$\\alpha = 10, \\beta = 5$\" data-tex=\"inline\"\/><\/math>;<\/li>\n<li>\u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0437\u043d\u0435\u0441\u0435\u043d\u044b \u043f\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432\u044b\u0448\u0435\u043b \u0438\u0437 \u0441\u0442\u0440\u043e\u044f, \u0442\u043e \u0431\u0430\u043d\u0434\u0438\u0442\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442 \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u043b\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u0443\u044e \u0440\u0443\u043a\u0443.<\/li>\n<\/ul>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/27b\/c9f\/8c7\/27bc9f8c7308481580a6960105721c06.jpg\"  width=\"480\"\/><\/div>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 \u0432 \u0440\u0430\u0437\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0443\u0440\u043b\u044b\u043a\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u0442\u0438\u043a\u043e\u0432, \u0440\u0430\u0437\u0432\u0435 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e? \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u0442\u043e\u044f\u0442.<\/p>\n<p>  <\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u041d\u0430\u0441\u0442\u0435 <a href=\"https:\/\/habrahabr.ru\/users\/bauchgefuehl\/\" class=\"user_link\">bauchgefuehl<\/a>, \u0410\u0440\u0441\u0435\u043d\u0438\u044e <a href=\"https:\/\/habrahabr.ru\/users\/arseny_info\/\" class=\"user_link\">arseny_info<\/a> \u0438 \u042e\u0440\u0435 <a href=\"https:\/\/habrahabr.ru\/users\/yorko\/\" class=\"user_link\">yorko<\/a> \u0437\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u043e\u0432\u0435\u0442\u044b.<\/em><\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/325416\/\"> https:\/\/habrahabr.ru\/post\/325416\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/735\/550\/847\/7355508476c14cbe987c5a6350d1ab8d.jpg\" align=\"right\" width=\"320\"\/>  <\/p>\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0423\u0441\u044b \u0438 \u043a\u043e\u0433\u0442\u0438\u00bb. \u0423 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u0432\u0435\u0431-\u0441\u0430\u0439\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u0440\u0430\u044f\u043c\u0438. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u044d\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443, \u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043c\u0438\u0440\u0435 \u043c\u0443\u0440\u043b\u044b\u0447\u0435\u0442 \u043e\u0442 \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u043e\u0434\u0438\u043d \u043a\u043e\u0442\u0435\u043d\u043e\u043a. \u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0435\u0440\u0434\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u0442\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043e\u043a\u0430\u0437\u043e\u0432 \u0432 \u043a\u043b\u0438\u043a\u043e-\u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u041f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043f\u043e\u0447\u0442\u0438 \u0432\u0435\u0441\u044c \u0431\u044e\u0434\u0436\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0431\u043e\u0440\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043e\u043a\u0438. \u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430. \u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u0444\u043e\u0440\u043c\u044b \u043a\u043d\u043e\u043f\u043a\u0438, \u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435\u0445 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u043e\u0432, \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0443\u0440\u043b\u044b\u043a\u0430\u043d\u0438\u044f. \u041c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 A\/B\/n-\u0442\u0435\u0441\u0442, \u043d\u043e \u043c\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b: \u0438 \u0442\u0430\u043a \u043d\u0430 \u044d\u0442\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0443\u0449\u0435\u043d\u043e \u0434\u0435\u043d\u0435\u0433 \u043d\u0435\u043c\u0435\u0440\u0435\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0442\u044f\u0442 \u0438 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0435. \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u0441\u0442\u044b, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0439\u043a\u0443 \u043c\u043d\u043e\u0433\u043e\u0440\u0443\u043a\u0438\u0445 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0445 \u0431\u0430\u043d\u0434\u0438\u0442\u043e\u0432 (bayesian multi-armed bandits). \u0412\u043f\u0435\u0440\u0435\u0434.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-284480","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=284480"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284480\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=284480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=284480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}