{"id":374943,"date":"2024-05-21T06:12:38","date_gmt":"2024-05-21T06:12:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=374943"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=374943","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0437 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0<\/h3>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0434\u0435\u043b\u0435\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u00a0<\/h3>\n<p>\u0412 \u0410\/\u0412 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f (\u0431\u0430\u043a\u0435\u0442\u043e\u0432), \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3>\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f\u00a0<\/h3>\n<p><strong>\u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438\u00a0<strong>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/strong>\u00a0\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f (buckets), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/841\/af8\/159\/841af81597873e1dce7fd01c0adbc606.png\" width=\"1600\" height=\"682\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/841\/af8\/159\/841af81597873e1dce7fd01c0adbc606.png\"\/><\/figure>\n<p>\u0427\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442 \u0432 \u043f\u043b\u044e\u0441\u0430\u0445 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438?<\/p>\n<h3>\u041f\u0420\u0418\u041c\u0415\u041d\u0415\u041d\u0418\u0415 \u0411\u0410\u041a\u0415\u0422\u0418\u0417\u0410\u0426\u0418\u0418:\u00a0<\/h3>\n<ol>\n<li>\n<p><strong>\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432<\/strong>: \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u043e\u0431\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0433\u0440\u0443\u043f\u043f, \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432<\/strong>: \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0445 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0433\u0435\u0442\u0435\u0440\u043e\u0433\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u0442\u0435\u0440\u043e\u0433\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u043c\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043b\u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043e\u043d.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041a\u0410\u041a \u0418\u0421\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u042c \u0411\u0410\u041a\u0415\u0422\u0418\u0417\u0410\u0426\u0418\u042e:\u00a0<\/h3>\n<ol>\n<li>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430<\/strong>: \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u043a\u0435\u0442\u043e\u0432. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0431\u0430\u043a\u0435\u0442\u0430\u043c \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u041f\u0440\u0438 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u0445 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0431\u0430\u043a\u0435\u0442\u044b. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0438\u0437 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0438\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e\u00a0<\/h4>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445:<\/p>\n<ol>\n<li>\n<p>\u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c<\/h4>\n<p>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430 (\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u043b\u044c\u0442\u0430-\u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0438 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438)<\/p>\n<pre><code class=\"python\">def t_test_deltamethod(x_0: np.array, y_0: np.array, x_1: np.array, y_1: np.array) -> float:     n_0 = y_0.shape[0]     n_1 = y_1.shape[0]      mean_x_0, var_x_0 = np.mean(x_0), np.var(x_0)     mean_x_1, var_x_1 = np.mean(x_1), np.var(x_1)      mean_y_0, var_y_0 = np.mean(y_0), np.var(y_0)     mean_y_1, var_y_1 = np.mean(y_1), np.var(y_1)      cov_0 = np.mean((x_0 - mean_x_0.reshape(-1, )) * (y_0 - mean_y_0.reshape(-1, )))     cov_1 = np.mean((x_1 - mean_x_1.reshape(-1, )) * (y_1 - mean_y_1.reshape(-1, )))      var_0 = var_x_0 \/ mean_y_0 ** 2 + var_y_0 * mean_x_0 ** 2 \/ mean_y_0 ** 4 - 2 * mean_x_0 \/ mean_y_0 ** 3 * cov_0     var_1 = var_x_1 \/ mean_y_1 ** 2 + var_y_1 * mean_x_1 ** 2 \/ mean_y_1 ** 4 - 2 * mean_x_1 \/ mean_y_1 ** 3 * cov_1      rto_0 = np.sum(x_0) \/ np.sum(y_0)     rto_1 = np.sum(x_1) \/ np.sum(y_1)      statistic = (rto_1 - rto_0) \/ np.sqrt(var_0 \/ n_0 + var_1 \/ n_1)     pvalue = 2 * np.minimum(stats.norm(0, 1).cdf(statistic), 1 - stats.norm(0, 1).cdf(statistic))     return statistic, pvalue<\/code><\/pre>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b\u00a0<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u0442\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c: \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c:\u00a0<\/h4>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0430\u043a\u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0435: \u043f\u043e\u0441\u043b\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u0440\u0438\u043a \u0438\u043c\u0435\u0435\u0442 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7bc\/375\/127\/7bc37512787133fb46be09b46d2f962d.png\" alt=\"\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10\" title=\"\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10\" width=\"974\" height=\"962\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7bc\/375\/127\/7bc37512787133fb46be09b46d2f962d.png\"\/><\/p>\n<div><figcaption>\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f0c\/142\/035\/f0c14203594a400bf24f3480fba9c205.png\" alt=\"\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75\" title=\"\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75\" width=\"970\" height=\"960\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f0c\/142\/035\/f0c14203594a400bf24f3480fba9c205.png\"\/><\/p>\n<div><figcaption>\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75<\/figcaption><\/div>\n<\/figure>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b 1: \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437\u00a0<\/h4>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">num_users = 1000000 num_buckets = 10000 alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000<\/code><\/pre>\n<p>\u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445: \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437 \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/398\/1eb\/3c6\/3981eb3c68ad952bcba5782729312dba.png\" alt=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)\" title=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)\" width=\"1948\" height=\"1100\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/398\/1eb\/3c6\/3981eb3c68ad952bcba5782729312dba.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">import numpy as np from scipy.stats import ttest_ind from concurrent.futures import ThreadPoolExecutor, as_completed from tqdm import tqdm  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 num_users = 1000000 num_buckets = 10000 mean_control = 50  std_dev = 10  alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000   def run_simulation(lift):     mean_treatment = mean_control * lift     control_group = np.random.normal(mean_control, std_dev, num_users)     treatment_group = np.random.normal(mean_treatment, std_dev, num_users)          bucket_indices = np.random.randint(0, num_buckets, num_users)     bucket_sums_control = np.bincount(bucket_indices, weights=control_group, minlength=num_buckets)     bucket_sums_treatment = np.bincount(bucket_indices, weights=treatment_group, minlength=num_buckets)     bucket_counts = np.bincount(bucket_indices, minlength=num_buckets)          bucket_means_control = bucket_sums_control \/ bucket_counts     bucket_means_treatment = bucket_sums_treatment \/ bucket_counts          t_stat_ind, p_value_ind = ttest_ind(treatment_group, control_group)     t_stat_agg, p_value_agg = t_test_deltamethod(bucket_sums_control, bucket_counts, bucket_sums_treatment, bucket_counts)          return (p_value_ind &lt;= alpha, p_value_agg &lt;= alpha)  # \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 results = [] with ThreadPoolExecutor(max_workers=4) as executor:     future_to_lift = {executor.submit(run_simulation, lift): lift for lift in lifts for _ in range(num_simulations)}     results = []     for future in tqdm(as_completed(future_to_lift), total=len(future_to_lift), desc='Simulating'):         results.append(future.result())  # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 TPR = {lift: 0 for lift in lifts} TPR_b = {lift: 0 for lift in lifts}  for result, lift in zip(results, future_to_lift.values()):     TPR[lift] += result[0]     TPR_b[lift] += result[1]  for lift in lifts:     TPR[lift] \/= num_simulations     TPR_b[lift] \/= num_simulations  fig = go.Figure()  fig.add_trace(go.Scatter(x=(np.asarray(list(TPR.keys()))-1)*100, y=list(TPR.values()), mode='lines+markers', name='Individual Data')) fig.add_trace(go.Scatter(x=(np.asarray(list(TPR.keys()))-1)*100, y=list(TPR_b.values()), mode='lines+markers', name='Aggregated Data'))  fig.update_layout(title='TPR Individual Data vs Aggregated Data (normal distribution)',                   xaxis_title='Lift %',                   yaxis_title='Power',                   height=600,                   width=1000,                   template='plotly_white')  fig.show()<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ab\/8b6\/fb2\/5ab8b6fb2b33f0213b2ad3b1d2989a15.png\" alt=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)\" title=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)\" width=\"1940\" height=\"1106\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ab\/8b6\/fb2\/5ab8b6fb2b33f0213b2ad3b1d2989a15.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">... num_users = 1000000 num_buckets = 10000 mean_control = np.log(50)   std_dev = .75   alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000   def run_simulation(lift):     mean_treatment = mean_control * lift     control_group = np.random.lognormal(mean_control, std_dev, num_users)     treatment_group = np.random.lognormal(mean_treatment, std_dev, num_users)     ...<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b 2: \u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u00a0<\/h4>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">num_users = 100000  # \u041e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 num_simulations = 500  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f sigma = 0.75  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f alpha = 0.05  # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 lift = 1.001  # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 lift  # \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f bucket_ranges = [1, 5, 10, 20, 30, 50, 70, 100, 500, 1000, 2000, 3000, 5000, 7000, 10000, 11000, 12000, 15000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000]<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043f\u0440\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0441 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u0447\u0438\u0441\u043b\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u0412\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 (100\u043a) \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/301\/39a\/c16\/30139ac1655f6f59834a06aedc777ba9.png\" alt=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430\" title=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430\" width=\"3036\" height=\"1128\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/301\/39a\/c16\/30139ac1655f6f59834a06aedc777ba9.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">num_users = 100000  # \u041e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 num_simulations = 500  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f sigma = 0.75  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f alpha = 0.05  # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 lift = 1.001  # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 lift  # \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f bucket_ranges = [1, 5, 10, 20, 30, 50, 70, 100, 500, 1000, 2000, 3000, 5000, 7000, 10000, 11000, 12000, 15000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000]  def run_simulation(num_buckets):     power_individual = 0     power_aggregated = 0     for _ in range(num_simulations):         # \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445         mean_treatment = mean_control * lift         control_group = np.random.lognormal(mean_control, std_dev, num_users)         treatment_group = np.random.lognormal(mean_treatment, std_dev, num_users)                      # \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f         bucket_indices = np.random.randint(0, num_buckets, num_users)         bucket_sums_control = np.bincount(bucket_indices, weights=control_group, minlength=num_buckets)         bucket_sums_treatment = np.bincount(bucket_indices, weights=treatment_group, minlength=num_buckets)         bucket_counts = np.bincount(bucket_indices, minlength=num_buckets)                  # T-\u0442\u0435\u0441\u0442\u044b         _, p_value_ind = ttest_ind(treatment_group, control_group)         _, p_value_agg = t_test_deltamethod(bucket_sums_control, bucket_counts, bucket_sums_treatment, bucket_counts)                  # \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438         if p_value_ind &lt;= alpha:             power_individual += 1         if p_value_agg &lt;= alpha:             power_aggregated += 1          return num_buckets, power_individual \/ num_simulations, power_aggregated \/ num_simulations  # \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435\u043c results = [] with ThreadPoolExecutor(max_workers=4) as executor:     futures = {executor.submit(run_simulation, num_buckets): num_buckets for num_buckets in bucket_ranges}     for future in tqdm(as_completed(futures), total=len(futures), desc=\"Simulating\"):         result = future.result()         results.append(result)         print(f\"Num Buckets: {result[0]}, Power Individual: {result[1]}, Power Aggregated: {result[2]}\")  # \u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 print(results.sort(key=lambda x: x[0]))  num_buckets = [result[0] for result in results] power_individual = [result[1] for result in results] power_aggregated = [result[2] for result in results]  fig = go.Figure()  fig.add_trace(go.Scatter(x=num_buckets, y=power_individual, mode='lines+markers', name='Individual Data'))  fig.add_trace(go.Scatter(x=num_buckets, y=power_aggregated, mode='lines+markers', name='Aggregated Data'))  fig.update_layout(     title='Statistical Power vs Number of Buckets',     xaxis_title='Number of Buckets',     yaxis_title='Power',     height=600,     template='plotly_white' )  fig.show() <\/code><\/pre>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b 3: \u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u00a0<\/h4>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">num_buckets = 10000   num_simulations = 1000  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f sigma = 0.75  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f alpha = 0.05  # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 lift = 1.001  # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 lift  user_ranges = [10000, 100000, 500000, 1000000] <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u0430\u043a\u0435\u0442\u0435. \u042d\u0442\u043e \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/47c\/329\/174\/47c329174b05b67a42ac434a71120db6.png\" alt=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439\" title=\"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439\" width=\"3028\" height=\"1104\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/47c\/329\/174\/47c329174b05b67a42ac434a71120db6.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">num_buckets = 10000   num_simulations = 1000  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f sigma = 0.75  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f alpha = 0.05  # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 lift = 1.001  # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 lift  user_ranges = [10000, 100000, 500000, 1000000]   def run_simulation(num_users):     power_individual = 0     power_aggregated = 0     for _ in range(num_simulations):         # \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445         mean_treatment = mean_control * lift         control_group = np.random.lognormal(mean_control, std_dev, num_users)         treatment_group = np.random.lognormal(mean_treatment, std_dev, num_users)                      # \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f         bucket_indices = np.random.randint(0, num_buckets, num_users)         bucket_sums_control = np.bincount(bucket_indices, weights=control_group, minlength=num_buckets)         bucket_sums_treatment = np.bincount(bucket_indices, weights=treatment_group, minlength=num_buckets)         bucket_counts = np.bincount(bucket_indices, minlength=num_buckets)                  # T-\u0442\u0435\u0441\u0442\u044b         _, p_value_ind = ttest_ind(treatment_group, control_group)         _, p_value_agg = t_test_deltamethod(bucket_sums_control, bucket_counts, bucket_sums_treatment, bucket_counts)                  # \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438         if p_value_ind &lt;= alpha:             power_individual += 1         if p_value_agg &lt;= alpha:             power_aggregated += 1                  print(power_individual)          return num_users, power_individual \/ num_simulations, power_aggregated \/ num_simulations  results = [] with ThreadPoolExecutor(max_workers=4) as executor:     futures = {executor.submit(run_simulation, num_users): num_buckets for num_users in user_ranges}     for future in tqdm(as_completed(futures), total=len(futures), desc=\"Simulating\"):         result = future.result()         results.append(result)         print(f\"Num Users: {result[0]}, Power Individual: {result[1]}, Power Aggregated: {result[2]}\")  print(results.sort(key=lambda x: x[0]))  num_users = [result[0] for result in results] power_individual = [result[1] for result in results] power_aggregated = [result[2] for result in results]  fig = go.Figure()  fig.add_trace(go.Scatter(x=num_users, y=power_individual, mode='lines+markers', name='Individual Data'))  fig.add_trace(go.Scatter(x=num_users, y=power_aggregated, mode='lines+markers', name='Aggregated Data'))  # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438 \u043c\u0435\u0442\u043e\u043a \u043e\u0441\u0435\u0439 fig.update_layout(     title='Statistical Power vs Number of Users for 10k buckets',     xaxis_title='Number of Users',     yaxis_title='Power',     height=600,     template='plotly_white' )  fig.show() <\/code><\/pre>\n<h4>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:\u00a0<\/h4>\n<ol>\n<li>\n<p><strong>\u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0441 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u0435\u0437<\/strong>: \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u0431\u044b\u043b\u0430 \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u0438 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432<\/strong>: \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e, \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0431\u0430\u043a\u0435\u0442\u043e\u0432, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0431\u044b\u043b\u0430 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0441 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0451.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/strong>: \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u00a0<\/h3>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 1000 \u0431\u0430\u043a\u0435\u0442\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0441 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u0435\u0437 \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b-\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432. \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/815331\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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:\/\/habr.com\/ru\/articles\/811059\/\"> https:\/\/habr.com\/ru\/articles\/811059\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0<\/h3>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0434\u0435\u043b\u0435\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u00a0<\/h3>\n<p>\u0412 \u0410\/\u0412 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f (\u0431\u0430\u043a\u0435\u0442\u043e\u0432), \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3>\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f\u00a0<\/h3>\n<p><strong>\u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438\u00a0<strong>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/strong>\u00a0\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f (buckets), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442 \u0432 \u043f\u043b\u044e\u0441\u0430\u0445 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438?<\/p>\n<h3>\u041f\u0420\u0418\u041c\u0415\u041d\u0415\u041d\u0418\u0415 \u0411\u0410\u041a\u0415\u0422\u0418\u0417\u0410\u0426\u0418\u0418:\u00a0<\/h3>\n<ol>\n<li>\n<p><strong>\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432<\/strong>: \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u043e\u0431\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0433\u0440\u0443\u043f\u043f, \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432<\/strong>: \u0411\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b\u0445 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0433\u0435\u0442\u0435\u0440\u043e\u0433\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u0442\u0435\u0440\u043e\u0433\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u043c\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043b\u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043e\u043d.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041a\u0410\u041a \u0418\u0421\u041f\u041e\u041b\u042c\u0417\u041e\u0412\u0410\u0422\u042c \u0411\u0410\u041a\u0415\u0422\u0418\u0417\u0410\u0426\u0418\u042e:\u00a0<\/h3>\n<ol>\n<li>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430<\/strong>: \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u043a\u0435\u0442\u043e\u0432. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0430\u0434 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0431\u0430\u043a\u0435\u0442\u0430\u043c \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u041f\u0440\u0438 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u0445 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0431\u0430\u043a\u0435\u0442\u044b. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0438\u0437 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0438\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0442\u044b\u0441\u044f\u0447\u0430\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e\u00a0<\/h4>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445:<\/p>\n<ol>\n<li>\n<p>\u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c<\/h4>\n<p>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430 (\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u043b\u044c\u0442\u0430-\u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0440\u0438 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438)<\/p>\n<pre><code class=\"python\">def t_test_deltamethod(x_0: np.array, y_0: np.array, x_1: np.array, y_1: np.array) -> float:     n_0 = y_0.shape[0]     n_1 = y_1.shape[0]      mean_x_0, var_x_0 = np.mean(x_0), np.var(x_0)     mean_x_1, var_x_1 = np.mean(x_1), np.var(x_1)      mean_y_0, var_y_0 = np.mean(y_0), np.var(y_0)     mean_y_1, var_y_1 = np.mean(y_1), np.var(y_1)      cov_0 = np.mean((x_0 - mean_x_0.reshape(-1, )) * (y_0 - mean_y_0.reshape(-1, )))     cov_1 = np.mean((x_1 - mean_x_1.reshape(-1, )) * (y_1 - mean_y_1.reshape(-1, )))      var_0 = var_x_0 \/ mean_y_0 ** 2 + var_y_0 * mean_x_0 ** 2 \/ mean_y_0 ** 4 - 2 * mean_x_0 \/ mean_y_0 ** 3 * cov_0     var_1 = var_x_1 \/ mean_y_1 ** 2 + var_y_1 * mean_x_1 ** 2 \/ mean_y_1 ** 4 - 2 * mean_x_1 \/ mean_y_1 ** 3 * cov_1      rto_0 = np.sum(x_0) \/ np.sum(y_0)     rto_1 = np.sum(x_1) \/ np.sum(y_1)      statistic = (rto_1 - rto_0) \/ np.sqrt(var_0 \/ n_0 + var_1 \/ n_1)     pvalue = 2 * np.minimum(stats.norm(0, 1).cdf(statistic), 1 - stats.norm(0, 1).cdf(statistic))     return statistic, pvalue<\/code><\/pre>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b\u00a0<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e \u0442\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c: \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c:\u00a0<\/h4>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0430\u043a\u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0435: \u043f\u043e\u0441\u043b\u0435 \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u0440\u0438\u043a \u0438\u043c\u0435\u0435\u0442 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = 50, \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 10<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0441\u0440\u0435\u0434\u043d\u0435\u0435 = log(50), \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f = 0.75<\/figcaption><\/div>\n<\/figure>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b 1: \u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437\u00a0<\/h4>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">num_users = 1000000 num_buckets = 10000 alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000<\/code><\/pre>\n<p>\u041c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445: \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0431\u0435\u0437 \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">import numpy as np from scipy.stats import ttest_ind from concurrent.futures import ThreadPoolExecutor, as_completed from tqdm import tqdm  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 num_users = 1000000 num_buckets = 10000 mean_control = 50  std_dev = 10  alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000   def run_simulation(lift):     mean_treatment = mean_control * lift     control_group = np.random.normal(mean_control, std_dev, num_users)     treatment_group = np.random.normal(mean_treatment, std_dev, num_users)          bucket_indices = np.random.randint(0, num_buckets, num_users)     bucket_sums_control = np.bincount(bucket_indices, weights=control_group, minlength=num_buckets)     bucket_sums_treatment = np.bincount(bucket_indices, weights=treatment_group, minlength=num_buckets)     bucket_counts = np.bincount(bucket_indices, minlength=num_buckets)          bucket_means_control = bucket_sums_control \/ bucket_counts     bucket_means_treatment = bucket_sums_treatment \/ bucket_counts          t_stat_ind, p_value_ind = ttest_ind(treatment_group, control_group)     t_stat_agg, p_value_agg = t_test_deltamethod(bucket_sums_control, bucket_counts, bucket_sums_treatment, bucket_counts)          return (p_value_ind &lt;= alpha, p_value_agg &lt;= alpha)  # \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 results = [] with ThreadPoolExecutor(max_workers=4) as executor:     future_to_lift = {executor.submit(run_simulation, lift): lift for lift in lifts for _ in range(num_simulations)}     results = []     for future in tqdm(as_completed(future_to_lift), total=len(future_to_lift), desc='Simulating'):         results.append(future.result())  # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 TPR = {lift: 0 for lift in lifts} TPR_b = {lift: 0 for lift in lifts}  for result, lift in zip(results, future_to_lift.values()):     TPR[lift] += result[0]     TPR_b[lift] += result[1]  for lift in lifts:     TPR[lift] \/= num_simulations     TPR_b[lift] \/= num_simulations  fig = go.Figure()  fig.add_trace(go.Scatter(x=(np.asarray(list(TPR.keys()))-1)*100, y=list(TPR.values()), mode='lines+markers', name='Individual Data')) fig.add_trace(go.Scatter(x=(np.asarray(list(TPR.keys()))-1)*100, y=list(TPR_b.values()), mode='lines+markers', name='Aggregated Data'))  fig.update_layout(title='TPR Individual Data vs Aggregated Data (normal distribution)',                   xaxis_title='Lift %',                   yaxis_title='Power',                   height=600,                   width=1000,                   template='plotly_white')  fig.show()<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u043b\u0438\u0444\u0442\u0430 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430)<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">... num_users = 1000000 num_buckets = 10000 mean_control = np.log(50)   std_dev = .75   alpha = .05  lifts = np.asarray([1., 1.0001, 1.0002, 1.0005, 1.001, 1.002]) num_simulations = 1000   def run_simulation(lift):     mean_treatment = mean_control * lift     control_group = np.random.lognormal(mean_control, std_dev, num_users)     treatment_group = np.random.lognormal(mean_treatment, std_dev, num_users)     ...<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b 2: \u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u00a0<\/h4>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">num_users = 100000  # \u041e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 num_simulations = 500  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f sigma = 0.75  # \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f alpha = 0.05  # \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 lift = 1.001  # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 lift  # \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f bucket_ranges = [1, 5, 10, 20, 30, 50, 70, 100, 500, 1000, 2000, 3000, 5000, 7000, 10000, 11000, 12000, 15000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000]<\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043f\u0440\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0441 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435\u043c \u0447\u0438\u0441\u043b\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u0412\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 (100\u043a) \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u043a\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">num_users = 100000  # \u041e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 num_simulations = 500  # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0430\u043a\u0435\u0442\u043e\u0432 mean_control = np.log(50)  # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-374943","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/374943","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=374943"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/374943\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=374943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=374943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}