{"id":341449,"date":"2022-11-18T21:00:05","date_gmt":"2022-11-18T21:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=341449"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=341449","title":{"rendered":"<span>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u043a <u><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_181122&amp;utm_term=lead\">\u0441\u0442\u0430\u0440\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/a><\/u>.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/700260\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tg\/0g\/l7\/tg0gl7du_uaedkl0orar-xki3su.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tg\/0g\/l7\/tg0gl7du_uaedkl0orar-xki3su.png\"\/><\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u043e\u043b\u043e\u0442\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0440\u0430\u0441\u0447\u0451\u0442\u0430 <strong>\u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 (causal effect)<\/strong> \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (\u043b\u0435\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u043a\u043b\u0430\u043c\u044b, \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u0438 \u0434\u0440.) \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0431\u043e\u043b\u0435\u0437\u043d\u044c, \u0434\u043e\u0445\u043e\u0434 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0440.) \u2014 \u044d\u0442\u043e <strong>A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>, (\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0420\u041a\u0418). \u041c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0440.) \u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0443\u044e \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u0438\u0437 \u0433\u0440\u0443\u043f\u043f. \u042d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0435\u043c\u044b\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u043c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u2014 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 <strong>\u0432\u0437\u0430\u0438\u043c\u043e\u0432\u043b\u0438\u044f\u043d\u0438\u044f<\/strong> \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0438\u0437 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0430\u043a. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u043b\u0435\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0430\u043d\u0438\u0435, \u0430 \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u0412 \u0431\u0438\u0437\u043d\u0435\u0441\u0435 \u0447\u0430\u0441\u0442\u044b\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0432\u043b\u0438\u044f\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <strong>\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 (network effect)<\/strong> \u2014 \u0441\u0435\u0442\u044c \u0442\u0435\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u043c\u043d\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0430\u043c \u043c\u043e\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439 \u0438\u043b\u0438 \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043e\u0432 \u2014 \u0438 <strong>\u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u044b\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f (general equilibrium effect)<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u044f \u0441\u0434\u0435\u043b\u0430\u044e \u043b\u0443\u0447\u0448\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0434\u0430\u0436 \u0435\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445. \u041e\u043f\u044b\u0442\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0433\u043e\u0440\u043e\u0434\u0430, \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0438 \u0434\u0430\u0436\u0435 \u0446\u0435\u043b\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043e\u043d\u0438 <strong>\u043e\u0431\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u043e\u0440\u043e\u0436\u0435<\/strong>. \u0414\u0430\u0442\u044c \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e 50% \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043b\u0438\u043d\u0438\u043a\u0438 \u043e\u0431\u043e\u0439\u0434\u0451\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0447\u0435\u043c \u0434\u0430\u0442\u044c \u0435\u0433\u043e 50% \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e <strong>\u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong>, \u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043e\u0447\u0435\u043d\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0433\u0434\u0435-\u0442\u043e 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434: \u0415\u0433\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <strong>\u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f (Synthetic Control)<\/strong>. \u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0435\u0436\u0441\u0435\u043a\u0446\u0438\u043e\u043d\u043d\u043e\u0439 (\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u043d\u0435 \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c). \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d \u0432 \u043e\u0442\u0440\u0430\u0441\u043b\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445, \u043a\u0430\u043a <a href=\"https:\/\/proceedings.neurips.cc\/paper\/2021\/file\/48d23e87eb98cc2227b5a8c33fa00680-Paper.pdf\">Google<\/a>, <a href=\"https:\/\/eng.uber.com\/causal-inference-at-uber\/\">Uber<\/a>, <a href=\"https:\/\/github.com\/Microsoft\/SparseSC\">Microsoft<\/a>, \u0438 <a href=\"https:\/\/www.amazon.science\/publications\/a-self-supervised-approach-to-hierarchical-forecasting-with-applications-to-groupwise-synthetic-controls\">Amazon<\/a> \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043e\u0432 \u0442\u0430\u043a\u0441\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"primer-s-avtonomnymi-avtomobilyami\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f\u043c\u0438<\/h1>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b <strong>\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440 \u0442\u0430\u043a\u0441\u0438<\/strong> \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0439 \u0430\u0432\u0442\u043e\u043f\u0430\u0440\u043a \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 <strong>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/strong> \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0432\u0430\u0448\u0435 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0435\u0437\u0434\u043a\u0438 \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u0441\u0442 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0432\u044b\u043b\u044c\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u0433\u043b\u0443\u044e \u0441\u0443\u043c\u043c\u0443. \u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u043e\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0435\u0437\u0434\u043a\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u0441 \u0441\u0442\u0430\u043d\u0435\u0442 <strong>&#171;\u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u0430&#187; (spillover effect)<\/strong> \u0438\u0437 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e: \u0435\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u043e\u043d\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0441\u0440\u043e\u043a, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0447\u0438\u0441\u043b\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0430\u043a\u0441\u0438\u0441\u0442\u043e\u0432-\u043b\u044e\u0434\u0435\u0439 (\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430). \u042d\u0442\u043e <strong>\u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442<\/strong> \u043d\u0430 \u0445\u043e\u0434 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0438 \u0438\u0441\u043a\u0430\u0437\u0438\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0432\u0441\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043e\u0434\u0438\u043d \u0433\u043e\u0440\u043e\u0434. \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0430 \u043c\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0431\u0435\u0440\u0435\u043c\u2026 (<em>\u0442\u0430\u0434\u0430\u0430\u043c<\/em>)\u2026 \u041c\u0430\u0439\u0430\u043c\u0438!<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/proxy\/1*s3v8-lxldTn9pU5m7DEbYA.jpeg\" alt=\"\u041f\u0430\u043d\u043e\u0440\u0430\u043c\u0430 \u041c\u0430\u0439\u0430\u043c\u0438\" data-src=\"https:\/\/miro.medium.com\/proxy\/1*s3v8-lxldTn9pU5m7DEbYA.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>\u042f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u043d\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0430\u043c \u0421\u0428\u0410 \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0432\u044b\u043c\u044b\u0448\u043b\u0435\u043d\u044b, \u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e-\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <a href=\"https:\/\/stats.oecd.org\/Index.aspx?DataSetCode=CITIES\">OECD 2022 Metropolitan Areas database<\/a>. \u042f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <code>dgp_selfdriving()<\/code> \u0438\u0437 <code>[src.dgp](https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/dgp.py)<\/code>. \u042f \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0438\u0437 <code>[src.utils](https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/utils.py)<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from causalml.match import create_table_one  create_table_one(df, 'treated', ['density', 'employment', 'gdp', 'population', 'revenue'])<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1z\/om\/i8\/1zomi81qon3rzuqas6jxobrm3mu.png\" alt=\"\u0417\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\" data-src=\"https:\/\/habrastorage.org\/webt\/1z\/om\/i8\/1zomi81qon3rzuqas6jxobrm3mu.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e 46 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u043c \u0433\u043e\u0440\u043e\u0434\u0430\u043c \u0421\u0428\u0410 \u0437\u0430 2002\u20132019 \u0433\u043e\u0434\u044b. \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c <strong>\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/strong>: \u0432\u0441\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u043c\u043a\u0430\u0445. \u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e \u0432 2013 \u0433\u043e\u0434\u0443.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e <strong>\u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u0433\u043e\u0440\u043e\u0434<\/strong>, \u041c\u0430\u0439\u0430\u043c\u0438, \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0433\u043e\u0440\u043e\u0434\u0430\u043c\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0438? \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>create_table_one<\/code> \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"https:\/\/causalml.readthedocs.io\/\">causalml<\/a> \u043e\u0442 Uber \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c <strong>\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 (covariate balance table)<\/strong>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f. \u041a\u0430\u043a \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u044d\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (causal inference analysis).<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">smf.ols('revenue ~ treated', data=df[df['post']==True]).fit().summary().tables[1]<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/l8\/dr\/mo\/l8drmoc3jwhobnd28qscgxbibuu.png\" alt=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/l8\/dr\/mo\/l8drmoc3jwhobnd28qscgxbibuu.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u043d\u0430\u0448\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c <strong>\u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438<\/strong> \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u041c\u0430\u0439\u0430\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0433\u043e\u0440\u043e\u0434\u0430 \u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0438\u0436\u0435 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0445\u043e\u0434\u0430 \u0438 \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f <strong>\u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439<\/strong> \u043d\u0430 \u043d\u0430\u0448\u0443 \u0432\u044b\u0440\u0443\u0447\u043a\u0443 (<code>revenue<\/code>).<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0443\u0442\u0451\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b. \u042d\u0444\u0444\u0435\u043a\u0442 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 (<code>revenue<\/code>) \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u043f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">smf.ols('revenue ~ treated', data=df[df['post']==True]).fit().summary().tables[1]<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1v\/vo\/ln\/1vvolnk_uqapjkrzbi4sugwfuzg.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/1v\/vo\/ln\/1vvolnk_uqapjkrzbi4sugwfuzg.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u043c, \u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f <strong>\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e <strong>\u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u043e\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/strong>. \u0415\u043c\u0443 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442 \u043e\u0434\u0438\u043d \u0433\u043e\u0440\u043e\u0434, \u041c\u0430\u0439\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u0442\u0440\u0443\u0434\u043e\u043c \u043f\u043e\u0434\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0433\u043e\u0440\u043e\u0434\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u041c\u0430\u0439\u0430\u043c\u0438 <strong>\u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435<\/strong> \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">smf.ols('revenue ~ post', data=df[df['city']==treated_city]).fit().summary().tables[1]<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/cu\/48\/ky\/cu48kyr3ibbixs4zlgpmr0apgag.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/cu\/48\/ky\/cu48kyr3ibbixs4zlgpmr0apgag.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c <strong>\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong> \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441 2013 \u0433\u043e\u0434\u0430 <strong>\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/strong>. \u041f\u0440\u0438\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f\u043c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0442\u044f\u0436\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0432 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0430\u043c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <strong>\u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442<\/strong>, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0433\u043e\u0440\u043e\u0434\u0443, \u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u2014 \u0433\u043e\u0434\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df = df.pivot(index='year', columns='city', values='revenue').reset_index()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u041c\u0430\u0439\u0430\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">cities = [c for c in df.columns if c!='year']df['Other Cities'] = df[[c for c in cities if c != treated_city]].mean(axis=1)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">def plot_lines(df, line1, line2, year, hline=True):     sns.lineplot(x=df['year'], y=df[line1].values, label=line1)     sns.lineplot(x=df['year'], y=df[line2].values, label=line2)     plt.axvline(x=year, ls=\":\", color='C2', label='Self-Driving Cars', zorder=1)     plt.legend();     plt.title(\"Average revenue per day (in M$)\");<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0440\u0430\u0437 \u0443\u0436 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u041c\u0430\u0439\u0430\u043c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0446\u0432\u0435\u0442\u043e\u0432\u0443\u044e \u043f\u0430\u043b\u0438\u0442\u0440\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">sns.set_palette(sns.color_palette(['#f14db3', '#0dc3e2', '#443a84'])) plot_lines(df, treated_city, 'Other Cities', treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/99\/n8\/jz\/99n8jzyukh1rc-oa_ahgtmqiwho.png\" alt=\"png\" data-src=\"https:\/\/habrastorage.org\/webt\/99\/n8\/jz\/99n8jzyukh1rc-oa_ahgtmqiwho.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0443\u0447\u043a\u0430 \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438, \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0430\u0441\u0442\u0451\u0442. \u041d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u043c\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u044b \u0434\u043e\u0445\u043e\u0434\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u043e\u0441\u043b\u0438. \u0421\u0443\u0434\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0443, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f\u043c.<\/p>\n<p>  <\/p>\n<p>\u0410 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/p>\n<p>  <\/p>\n<h1 id=\"metod-sinteticheskogo-kontrolya\">\u041c\u0435\u0442\u043e\u0434 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f<\/h1>\n<p>  <\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u00ab\u0434\u0430\u00bb! \u041c\u0435\u0442\u043e\u0434 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 <strong>\u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442<\/strong> \u0438 <strong>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong>, \u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f <strong>\u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong>. \u0418\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u0430: \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0443\u0442\u044b\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043d\u0430\u043c\u0438. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u00ab\u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u00bb \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0433\u043e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u044b\u043b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d <a href=\"https:\/\/www.jstor.org\/stable\/3132164\">\u0410\u0431\u0430\u0434\u0438 \u0438 \u0413\u0430\u0440\u0434\u0435\u0437\u0430\u0431\u0430\u043b\u0435\u043c (2003)<\/a> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/www.aeaweb.org\/articles?id=10.1257\/jep.31.2.3\">\u201c\u0412\u0430\u0436\u043d\u0435\u0439\u0448\u0435\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043b\u0435\u0442 \u0432 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438\u201d<\/a>. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"postanovka-zadachi\">\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u043d\u0435\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 i.i.d. <em>i = 1, \u2026, n<\/em> \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <em>t=1, \u2026,T<\/em> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>(X\u1d62\u209c,D\u1d62,Y\u1d62\u209c)<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 <em>D\u1d62\u2208{0,1}<\/em> (<code>treated<\/code>);<\/li>\n<li>\u0440\u0435\u0430\u043a\u0446\u0438\u044e <em>Y\u1d62\u209c\u2208\u211d<\/em>(<code>revenue<\/code>);<\/li>\n<li>\u0432\u0435\u043a\u0442\u043e\u0440 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a <em>X\u1d62\u209c\u2208\u211d\u207f<\/em> (<code>population<\/code>, <code>density<\/code>, <code>employment<\/code> \u0438 <code>GDP<\/code>).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <em>t*<\/em> (\u0443 \u043d\u0430\u0441 \u044d\u0442\u043e 2013 \u0433\u043e\u0434) \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u041c\u0430\u0439\u0430\u043c\u0438). \u041c\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e <em>D<\/em> \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c (\u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438) \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"problema\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430. \u0412 \u044d\u0442\u043e\u043c \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 <strong>\u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>\u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 (event study approach)<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0448\u0435. \u041d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043b\u0438\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/05\/yj\/vl\/05yjvlsmx9xlqwd1jofol5dha18.png\" alt=\"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\" data-src=\"https:\/\/habrastorage.org\/webt\/05\/yj\/vl\/05yjvlsmx9xlqwd1jofol5dha18.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <em>Y<\/em>\u207d\u1d48\u207e\u2090,\u209c \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <em>t<\/em>, \u043f\u0440\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 <em>a<\/em> \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 <em>d<\/em>. \u041f\u043e \u0441\u0443\u0442\u0438, \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 <strong>\u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c <em>Y<\/em>\u207d\u2070\u207e\u209c,\u209a\u2092\u209b\u209c: \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044b\u043c\u0438 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 (<em>a=t<\/em>), \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e (<em>d=0<\/em>).<\/p>\n<p>  <\/p>\n<h2 id=\"reshenie\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/arxiv.org\/pdf\/1610.07748.pdf\">\u0414\u0443\u0434\u0447\u0435\u043d\u043a\u043e-\u0418\u043d\u0431\u0435\u043d\u0441\u0430 (2018)<\/a>. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jd\/bc\/0z\/jdbc0zh90w1s9g6yqtbrp5sis3s.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/jd\/bc\/0z\/jdbc0zh90w1s9g6yqtbrp5sis3s.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0433\u0434\u0435<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f <em>\u03b1<\/em> \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438;<\/li>\n<li>\u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <em>\u03b2\u1d62<\/em> \u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 <em>i<\/em> (\u0431\u0435\u0437 \u043d\u0438\u0445 \u044d\u0442\u043e \u0431\u044b\u043b \u0431\u044b \u043c\u0435\u0442\u043e\u0434 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043d\u0430\u043c <strong>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0432\u0435\u0441\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438<\/strong>? \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zv\/1y\/6g\/zv1y6g32chuypubnrpkd_salwqi.png\" alt=\"\u0421\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b\" data-src=\"https:\/\/habrastorage.org\/webt\/zv\/1y\/6g\/zv1y6g32chuypubnrpkd_salwqi.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0442\u0430\u043a\u043e\u0432\u044b, \u0447\u0442\u043e \u043e\u043d\u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 <em>Xc<\/em> \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 <em>X\u209c<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0431\u043b\u0438\u0437\u043a\u043e\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u0441 <strong>\u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/strong>. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043d\u0435\u0451.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u0435\u043c <strong>\u043c\u043d\u043e\u0433\u043e<\/strong> \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, <strong>\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0437\u043e\u0433\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/strong> \u0438 <strong>\u043e\u0434\u0438\u043d \u044d\u043d\u0434\u043e\u0433\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/strong>, \u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u043d\u0434\u043e\u0433\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0447\u0435\u0440\u0435\u0437 \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u044d\u043a\u0437\u043e\u0433\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/0u\/2s\/ts\/0u2stsk0h1bgyhyqfgp-h6uiyyy.png\" alt=\"\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/0u\/2s\/ts\/0u2stsk0h1bgyhyqfgp-h6uiyyy.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0443 \u043d\u0430\u0441 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e <strong>\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432<\/strong> (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432), \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <strong>\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong> \u0438 \u043e\u0434\u0438\u043d <strong>\u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442<\/strong>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0443 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u043d\u0430\u043c, \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0443\u0436\u043d\u043e <strong>\u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kq\/fa\/cy\/kqfacyvjte5a-4wwxsmugybnkl8.png\" alt=\"\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445\" data-src=\"https:\/\/habrastorage.org\/webt\/kq\/fa\/cy\/kqfacyvjte5a-4wwxsmugybnkl8.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b <strong>\u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f<\/strong> \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0438 \u0431\u044b \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kd\/5o\/qx\/kd5oqxljcasdgsxhakadd4fdnw0.png\" alt=\"\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f\" data-src=\"https:\/\/habrastorage.org\/webt\/kd\/5o\/qx\/kd5oqxljcasdgsxhakadd4fdnw0.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 <strong>\u043d\u0435 \u043b\u0438\u0448\u0435\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439<\/strong>. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0437\u043e\u0433\u0435\u043d\u043d\u044b\u0445 \u0438 \u044d\u043d\u0434\u043e\u0433\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e <strong>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439<\/strong>, \u0430 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043c\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u043c\u0438 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 <strong>\u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/strong>.<\/p>\n<p>  <\/p>\n<h2 id=\"bernyomsya-k-nashim-avtomobilyam\">B\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044f\u043c<\/h2>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c! \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>synth_predict<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u0430\u0445, \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c \u0433\u043e\u0440\u043e\u0434\u0435, \u041c\u0430\u0439\u0430\u043c\u0438, \u0434\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0442\u0430\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def synth_predict(df, model, city, year):     other_cities = [c for c in cities if c not in ['year', city]]     y = df.loc[df['year'] &lt;= year, city]     X = df.loc[df['year'] &lt;= year, other_cities]     df[f'Synthetic {city}'] = model.fit(X, y).predict(df[other_cities])     return model<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0446\u0435\u043d\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from sklearn.linear_model import LinearRegressioncoef = synth_predict(df, LinearRegression(), treated_city, treatment_year).coef_<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 (<code>revenue<\/code>) \u0434\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439 \u0432 \u041c\u0430\u0439\u0430\u043c\u0438 <strong>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/strong>? \u041a\u0430\u043a\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 <strong>\u044d\u0444\u0444\u0435\u043a\u0442<\/strong> \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f?<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043e\u0431\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">plot_lines(df, treated_city, f'Synthetic {treated_city}', treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/iv\/ig\/ac\/ivigacwxk3j9oqyojurwbjdawzm.png\" alt=\"\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0438 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0443\u0447\u043a\u0438 \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/iv\/ig\/ac\/ivigacwxk3j9oqyojurwbjdawzm.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0434\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443, \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0449\u0443\u0442\u0438\u043c\u043e\u0435 <strong>\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435<\/strong> \u043d\u0430 \u0432\u044b\u0440\u0443\u0447\u043a\u0443 (<code>revenue<\/code>) \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438: \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0442\u0440\u0435\u043d\u0434 \u043d\u0438\u0436\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u0438\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043d\u0430\u043b\u0438\u0446\u043e <strong>\u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 [\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438]<\/strong>: \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u044b\u0440\u0443\u0447\u043a\u0438 (<code>revenue<\/code>) \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0432\u044b\u0440\u0443\u0447\u043a\u0438 (<code>revenue<\/code>) \u0432 \u041c\u0430\u0439\u0430\u043c\u0438, \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0441\u0442\u0440\u0430\u043d\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <strong>\u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432<\/strong>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u0434\u043b\u044f \u043d\u0438\u0445.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df_states = pd.DataFrame({'city': [c for c in cities if c!=treated_city], 'ols_coef': coef})plt.figure(figsize=(10, 9))sns.barplot(data=df_states, x='ols_coef', y='city');<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vj\/rw\/qr\/vjrwqrc_xtp85prhkzba5esopn8.png\" alt=\"\u0421\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b\" data-src=\"https:\/\/habrastorage.org\/webt\/vj\/rw\/qr\/vjrwqrc_xtp85prhkzba5esopn8.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e <strong>\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e-\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439. \u042f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u041c\u0430\u0439\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 0,2 \u0421\u0435\u043d\u0442-\u041b\u0443\u0438\u0441\u0430, 0,15 \u041e\u043a\u043b\u0430\u0445\u043e\u043c\u0430-\u0441\u0438\u0442\u0438 \u0438 0,15 \u0425\u0430\u0440\u0442\u0444\u043e\u0440\u0434\u0430. \u041d\u043e \u043a\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u041c\u0430\u0439\u0430\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 -0,15 \u0432\u0438\u0441\u043a\u043e\u043d\u0441\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430 \u041c\u0438\u043b\u0443\u043e\u043a\u0438?<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043a\u0430\u043a <strong>\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435<\/strong> \u043f\u043e \u043d\u0435\u043e\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u043c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0433\u043e\u0440\u043e\u0434\u0430\u043c.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/strong>. \u0423 \u0430\u0432\u0442\u043e\u0440\u0430 \u0437\u0434\u0435\u0441\u044c \u0438 \u0435\u0449\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u0442\u043e\u0438\u0442 &#171;states&#187;. \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u0445\u043e\u0434\u0438\u043b \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043b, \u0438 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u0438\u043b \u0430\u0432\u0442\u043e\u0440\u0430. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0441\u0434\u0435\u043b\u0430\u044e \u0441\u0442\u0430\u0432\u043a\u0443 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u0438\u0441\u0430\u043b (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443 \u043c\u0435\u043d\u044f \u0442\u0440\u0438: \u043b\u0438\u0431\u043e \u043e\u043d (1) \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b \u0448\u0442\u0430\u0442\u044b, \u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043a \u0433\u043e\u0440\u043e\u0434\u0430\u043c \u0437\u0430\u0431\u044b\u043b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c, \u043b\u0438\u0431\u043e (2) \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443 \u0441\u0432\u043e\u0438 United States, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0444\u0440\u0430\u0437\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0432\u0443\u0447\u0430\u0442\u044c \u0434\u0432\u0443\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e, \u043b\u0438\u0431\u043e, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, (3) \u043e\u043d \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443 \u043d\u0435 &#171;\u0448\u0442\u0430\u0442\u044b&#187;, \u0430 &#171;\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f&#187; \u0438\/\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e df_states, \u043d\u043e \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0443\u0434\u044f \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0443, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c\u0443 \u0432\u044b\u0448\u0435, \u0438 \u043f\u043e \u0441\u0443\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u044d\u0442\u0438\u043c\u0438 &#171;\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438&#187; \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u0433\u043e\u0440\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0437 \u043c\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043c\u043e\u0451 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u0435\u0440\u043d\u043e, \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e &#171;states&#187; \u0441\u043b\u043e\u0432\u043e\u043c &#171;\u0433\u043e\u0440\u043e\u0434\u0430&#187; \u0438 \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f. <\/p><\/blockquote>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u0443\u043c\u043c\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0443.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u043e\u0431\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b (\u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f), \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 <strong>\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b<\/strong>.<\/p>\n<p>  <\/p>\n<h2 id=\"ogranicheniya-vesovyh-koefficientov\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432, <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1198\/jasa.2009.ap08746\">\u0410\u0431\u0430\u0434\u0438, \u0414\u0430\u0439\u043c\u043e\u043d\u0434 \u0438 \u0425\u0430\u0439\u043d\u043c\u044e\u043b\u043b\u0435\u0440 (2010)<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qo\/zw\/q4\/qozwq4eueq-6fraio1jwwgifzy8.png\" alt=\"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/webt\/qo\/zw\/q4\/qozwq4eueq-6fraio1jwwgifzy8.png\"\/><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0437\u0430\u0434\u0430\u0451\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <em>\u03b2<\/em>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b <em>Xc<\/em> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b <em>X\u209c<\/em> \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430;<\/li>\n<li>\u0438\u0445 \u0441\u0443\u043c\u043c\u0430 \u0440\u0430\u0432\u043d\u0430 1;<\/li>\n<li>\u043e\u043d\u0438 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <strong>\u043f\u043e\u0434\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (interpretable counterfactual)<\/strong> \u0432 \u0432\u0438\u0434\u0435 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c, \u0433\u0434\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0443 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>SyntheticControl()<\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c <code>loss<\/code>, \u0438 \u043c\u0435\u0442\u043e\u0434\u044b <code>fit<\/code> \u0434\u043b\u044f \u0435\u0451 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 <code>predict<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">from toolz import partial from scipy.optimize import fmin_slsqp  class SyntheticControl():      # Loss function     def loss(self, W, X, y) -> float:         return np.sqrt(np.mean((y \u2014 X.dot(W))**2))      # Fit model     def fit(self, X, y):         w_start = [1\/X.shape[1]]*X.shape[1]         self.coef_ = fmin_slsqp(partial(self.loss, X=X, y=y),                          np.array(w_start),                          f_eqcons=lambda x: np.sum(x) \u2014 1,                          bounds=[(0.0, 1.0)]*len(w_start),                          disp=False)         self.mse = self.loss(W=self.coef_, X=X, y=y)         return self      # Predict      def predict(self, X):         return X.dot(self.coef_)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 <code>SyntheticControl<\/code> \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>LinearRegression<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df_states['coef_synth'] = synth_predict(df, SyntheticControl(), treated_city, treatment_year).coef_ plot_lines(df, treated_city, f'Synthetic {treated_city}', treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/aj\/9w\/y8\/aj9wy8xjbzqx8j0zszx6b5vjej8.png\" alt=\"\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0438 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0432 \u041c\u0430\u0439\u0430\u043c\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/aj\/9w\/y8\/aj9wy8xjbzqx8j0zszx6b5vjej8.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <strong>\u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/strong> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f. \u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0432\u044b\u0440\u0443\u0447\u043a\u0430 <code>(revenue)<\/code> \u0431\u043b\u0438\u0437\u043a\u0438, \u043d\u043e \u043d\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043a \u043d\u0443\u043b\u044e (\u043a\u0430\u043a <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.Lasso.html\">Lasso<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0418, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u044d\u0444\u0444\u0435\u043a\u0442 \u0443 \u043d\u0430\u0441 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043b \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a <strong>\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/strong> \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043b\u0438\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df_states['coef_synth'] = synth_predict(df, SyntheticControl(), treated_city, treatment_year).coef_ plot_lines(df, treated_city, f'Synthetic {treated_city}', treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">plot_difference(df, treated_city, treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/we\/2w\/uy\/we2wuyq9vmbqndizu_uwpsq1g3q.png\" alt=\"\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u0438 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438\" data-src=\"https:\/\/habrastorage.org\/webt\/we\/2w\/uy\/we2wuyq9vmbqndizu_uwpsq1g3q.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u044f\u0432\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 <strong>\u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u0432 \u041c\u0430\u0439\u0430\u043c\u0438 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439).<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">plt.figure(figsize=(10, 9))sns.barplot(data=df_states, x='coef_synth', y='city');<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/c5\/4h\/ng\/c54hngou_trq66140oyz_ydcwkk.png\" alt=\"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/webt\/c5\/4h\/ng\/c54hngou_trq66140oyz_ydcwkk.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>revenue<\/code> \u0434\u043b\u044f \u041c\u0430\u0439\u0430\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432: \u0422\u0430\u043c\u043f\u044b, \u0421\u0435\u043d\u0442-\u041b\u0443\u0438\u0441\u0430 \u0438, \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u041b\u0430\u0441-\u0412\u0435\u0433\u0430\u0441\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0430\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 <strong>\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439<\/strong>.<\/p>\n<p>  <\/p>\n<h1 id=\"postroenie-vyvodov\">\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u043e\u0432<\/h1>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0441 <strong>\u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u044f\u0445<\/strong>? \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e? \u0418\u043b\u0438 \u043f\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439: &#171;<em>\u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0446\u0435\u043d\u043a\u0438 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u043e\u0439 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0430<\/em>?&#187;.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Permutation_test\"><strong>\u043f\u0435\u0440\u043c\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\/\u0442\u0435\u0441\u0442 \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 (permutation test)<\/strong><\/a>. \u0415\u0433\u043e <strong>\u0438\u0434\u0435\u044f<\/strong> \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430, \u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u0432 \u041c\u0430\u0439\u0430\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0433\u043e\u0440\u043e\u0434\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0438\u0445 \u0441 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u041c\u0430\u0439\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">fig, ax = plt.subplots() for city in cities:     synth_predict(df, SyntheticControl(), city, treatment_year)     plot_difference(df, city, treatment_year, vline=False, alpha=0.2, color='C1', lw=3) plot_difference(df, treated_city, treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/r2\/mp\/z2\/r2mpz2hcuuckslgnmtjcqnv2ynw.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/webt\/r2\/mp\/z2\/r2mpz2hcuuckslgnmtjcqnv2ynw.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0444\u0444\u0435\u043a\u0442 \u0434\u043b\u044f \u041c\u0430\u0439\u0430\u043c\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e <strong>\u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u0435\u043d<\/strong> \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0448\u0443\u043c\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u043d\u0434\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u0442\u044c \u043b\u0438\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043d\u0438\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0445. \u042d\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430 \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043d\u0434 \u0432 \u0432\u0438\u0434\u0435 <strong>\u0432\u044b\u043f\u0443\u043a\u043b\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 (convex combination)<\/strong> \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432. \u0413\u043e\u0440\u043e\u0434\u0430 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <code>revenue<\/code> \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u043d\u043e <strong>\u0434\u043b\u044f \u043d\u0438\u0445 \u0441\u0430\u043c\u0438\u0445 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043d\u0434<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u0441\u043a\u0430\u0436\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437, \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043c \u0433\u043e\u0440\u043e\u0434\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c &#171;\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0443\u044e&#187; \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 (MSE) \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dx\/qz\/zi\/dxqzzipsawt45feseskmqs43ea8.png\" alt=\"\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430\" data-src=\"https:\/\/habrastorage.org\/webt\/dx\/qz\/zi\/dxqzzipsawt45feseskmqs43ea8.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1198\/jasa.2009.ap08746\">\u0410\u0431\u0430\u0434\u0438, \u0414\u0430\u0439\u043c\u043e\u043d\u0434 \u0438 \u0425\u0430\u0439\u043d\u043c\u044e\u043b\u043b\u0435\u0440 (2010)<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0434\u0432\u043e\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0442\u0443 \u0436\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># Reference mse mse_treated = synth_predict(df, SyntheticControl(), treated_city, treatment_year).mse  # Other mse fig, ax = plt.subplots() for city in cities:     mse = synth_predict(df, SyntheticControl(), city, treatment_year).mse     if mse &lt; 2 * mse_treated:         plot_difference(df, city, treatment_year, vline=False, alpha=0.2, color='C1', lw=3) plot_difference(df, treated_city, treatment_year)<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dq\/vq\/s7\/dqvqs7t-khwoig5ph2qbua-3wai.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/webt\/dq\/vq\/s7\/dqvqs7t-khwoig5ph2qbua-3wai.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442 \u0434\u043b\u044f \u041c\u0430\u0439\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e.<\/p>\n<p>  <\/p>\n<p><strong>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1198\/jasa.2009.ap08746\">\u0410\u0431\u0430\u0434\u0438, \u0414\u0430\u0439\u043c\u043e\u043d\u0434 \u0438 \u0425\u0430\u0439\u043d\u043c\u044e\u043b\u043b\u0435\u0440 (2010)<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/xu\/qj\/zm\/xuqjzm7kc9ayya9ehwe2q7ednhe.png\" alt=\"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\" data-src=\"https:\/\/habrastorage.org\/webt\/xu\/qj\/zm\/xuqjzm7kc9ayya9ehwe2q7ednhe.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c p-\u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">lambdas = {} for city in cities:     mse_pre = synth_predict(df, SyntheticControl(), city, treatment_year).mse     mse_tot = np.mean((df[f'Synthetic {city}'] - df[city])**2)     lambdas[city] = (mse_tot - mse_pre) \/ mse_pre  print(f\"p-value: {np.mean(np.fromiter(lambdas.values(), dtype='float') > lambdas[treated_city]):.4}\")<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">p-value: 0.04348<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0435, \u0432\u0441\u0435\u0433\u043e 4,3% \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438\u043c\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442, \u0447\u0435\u043c \u041c\u0430\u0439\u0430\u043c\u0438. \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 p-\u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 0,043. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">fig, ax = plt.subplots() _, bins, _ = plt.hist(lambdas.values(), bins=20, color=\"C1\"); plt.hist([lambdas[treated_city]], bins=bins) plt.title('Ratio of $MSE_{post}$ and $MSE_{pre}$ across cities'); ax.add_artist(AnnotationBbox(OffsetImage(plt.imread('fig\/miami.png'), zoom=0.25), (2.7, 1.7), frameon=False));<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/um\/fg\/rs\/umfgrswrj7e2bbat7wdhbmffkbk.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0430\u043c\" data-src=\"https:\/\/habrastorage.org\/webt\/um\/fg\/rs\/umfgrswrj7e2bbat7wdhbmffkbk.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043b\u044f \u041c\u0430\u0439\u0430\u043c\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u043b\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0431\u044b\u043b \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0448\u0443\u043c\u043e\u043c.<\/p>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e-\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 <strong>\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong> \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432. \u0422\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>\u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u0430<\/strong>, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 <strong>\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong> \u0432 \u043e\u0434\u0438\u043d \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 <strong>\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432<\/strong> \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439. \u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 <strong>\u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438<\/strong>: \u043c\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c <strong>\u00ab\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b\u00bb<\/strong>: \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Data_dredging\">\u00ab\u0430\u043f\u043e\u0441\u0442\u0435\u0440\u0438\u043e\u0440\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u00bb<\/a> \u0438 \u0432\u044b\u0434\u0451\u0440\u0433\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0441\u043b\u0435\u043f\u0443\u044e. \u0414\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0440\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 <strong>\u044f\u0432\u043d\u044b\u043c<\/strong>: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u044b\u0439, \u0435\u0433\u043e <strong>\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/strong> \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c (generalized synthetic control) <a href=\"https:\/\/www.cambridge.org\/core\/journals\/political-analysis\/article\/generalized-synthetic-control-method-causal-inference-with-interactive-fixed-effects-models\/B63A8BD7C239DD4141C67DA10CD0E4F3\">\u0421\u044e\u0439 (2017)<\/a>, \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 (synthetic difference-in-differences) <a href=\"https:\/\/arxiv.org\/pdf\/1610.07748.pdf\">\u0414\u0443\u0434\u0447\u0435\u043d\u043a\u043e \u0438 \u0418\u043c\u0431\u0435\u043d\u0441 (2017)<\/a>, \u043f\u0435\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c (penalized synthetic control) <a href=\"https:\/\/www.tandfonline.com\/doi\/full\/10.1080\/01621459.2021.1971535\">\u0410\u0431\u0430\u0434\u0438 \u0438 \u041b\u0451\u0440 (2020)<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b (matrix completion methods) <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1080\/01621459.2021.1891924\">\u042d\u0444\u0438 \u0438 \u0441\u043e\u0430\u0432\u0442. (2021)<\/a>. \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0437 \u0443\u0441\u0442 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u0432, \u043d\u0430 Youtube \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u0435\u043a\u0446\u0438\u044e \u0410\u043b\u044c\u0431\u0435\u0440\u0442\u043e \u0410\u0431\u0430\u0434\u0438 \u0432 NBER Summer Institute.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6377dd1b8f11379b280ca51e\" data-style=\"\" id=\"6377dd1b8f11379b280ca51e\" width=\"\"><\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0441\u044b\u043b\u043a\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>[1] A. Abadie, J. Gardeazabal, <a href=\"https:\/\/www.jstor.org\/stable\/3132164\">The Economic Costs of Conflict: A Case Study of the Basque Country<\/a> (2003), <em>The American Economic Review<\/em>.<\/p>\n<p>  <\/p>\n<p>[2] A. Abadie, A. Diamond, J. Hainmueller, <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1198\/jasa.2009.ap08746\">Synthetic Control Methods for Comparative Case Studies: Estimating the Effect of California\u2019s Tobacco Control Program<\/a> (2010), <em>Journal of the American Statistical Association<\/em>.<\/p>\n<p>  <\/p>\n<p>[3] A. Abadie, <a href=\"https:\/\/www.aeaweb.org\/articles?id=10.1257\/jel.20191450\">Using Synthetic Controls: Feasibility, Data Requirements, and Methodological Aspects<\/a> (2021), <em>Journal of Economic Perspectives<\/em>.<\/p>\n<p>  <\/p>\n<p>[4] N. Doudchenko, G. Imbens, <a href=\"https:\/\/arxiv.org\/pdf\/1610.07748.pdf\">Balancing, Regression, Difference-In-Differences and Synthetic Control Methods: A Synthesis<\/a> (2017), <em>working paper<\/em>.<\/p>\n<p>  <\/p>\n<p>[5] Y. Xu, <a href=\"https:\/\/www.cambridge.org\/core\/journals\/political-analysis\/article\/generalized-synthetic-control-method-causal-inference-with-interactive-fixed-effects-models\/B63A8BD7C239DD4141C67DA10CD0E4F3\">Generalized Synthetic Control Method: Causal Inference with Interactive Fixed Effects Models<\/a> (2018), <em>Political Analysis<\/em>.<\/p>\n<p>  <\/p>\n<p>[6] A. Abadie, J. L\u2019Hour, <a href=\"https:\/\/www.tandfonline.com\/doi\/full\/10.1080\/01621459.2021.1971535\">A Penalized Synthetic Control Estimator for Disaggregated Data<\/a> (2020), <em>Journal of the American Statistical Association<\/em>.<\/p>\n<p>  <\/p>\n<p>[7] S. Athey, M. Bayati, N. Doudchenko, G. Imbens, K. Khosravi, <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1080\/01621459.2021.1891924\">Matrix Completion Methods for Causal Panel Data Models<\/a> (2021), <em>Journal of the American Statistical Association<\/em>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"drugie-stati-po-teme\">\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u0442\u0435\u043c\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/towardsdatascience.com\/b63dc69e3d8c\">DAGs and Control Variables<\/a>;<\/li>\n<li><a href=\"https:\/\/towardsdatascience.com\/99bf5cffa0d9\">Matching, Weighting, or Regression?<\/a>;<\/li>\n<li><a href=\"https:\/\/towardsdatascience.com\/8a9c1e340832\">Understanding Meta Learners<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"dannye\">\u0414\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li>OECD (2022), <a href=\"https:\/\/stats.oecd.org\/Index.aspx?DataSetCode=CITIES\"><em>Metropolitan Areas database<\/em><\/a>, \u043f\u043e\u0441\u043b. \u0440\u0435\u0434. 30.07.22<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u0443\u0447\u0438\u043c \u0432\u0430\u0441 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u00a0\u043f\u0440\u043e\u043a\u0430\u0447\u0430\u043b\u0438 \u043a\u0430\u0440\u044c\u0435\u0440\u0443 \u0438 \u0441\u0442\u0430\u043b\u0438 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u043c IT-\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0435\u0440\u043d\u0451\u043c \u0434\u0435\u043d\u044c\u0433\u0438 (\u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u2014 \u0430\u043a\u0446\u0438\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u00ab\u0427\u0451\u0440\u043d\u043e\u0439 \u043f\u044f\u0442\u043d\u0438\u0446\u044b\u00bb).<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_181122&amp;utm_term=banner\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/1b\/dh\/iu\/1bdhiubvma3zkcbjnagowkrdta8.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/1b\/dh\/iu\/1bdhiubvma3zkcbjnagowkrdta8.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  <\/p>\n<ul>\n<li><u><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_181122&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist (24 \u043c\u0435\u0441\u044f\u0446\u0430)<\/a><\/u><\/li>\n<li><u><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_181122&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python (16 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/u><\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u0443\u0440\u0441\u043e\u0432<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p><strong>Data Science \u0438\u00a0Machine Learning<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-dlya-data-science#syllabus?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mat_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-i-machine-learning-dlya-data-science?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_matml_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438\u00a0Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dea_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Data Engineering<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning-i-deep-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mldl_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438\u00a0Deep Learning\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_ml_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Machine Learning<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_pws_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/frontend-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fr_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_webdev_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/ios-razrabotchik-s-nulya?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_ios_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/android-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_andr_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Java \u0438\u00a0C#<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/java-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_java_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer-testirovshik-po?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_qaja_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430\u00a0JAVA<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-sharp-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cdev_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/game-razrabotchik-na-unity-i-c-sharp?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_gamedev_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430\u00a0Unity<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041e\u0442\u00a0\u043e\u0441\u043d\u043e\u0432\u00a0\u2014 \u0432\u00a0\u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/algoritmy-i-struktury-dannyh?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_algo_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-plus-plus-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cplus_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_181122&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u00ab\u0411\u0435\u043b\u044b\u0439 \u0445\u0430\u043a\u0435\u0440\u00bb<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0410\u00a0\u0442\u0430\u043a\u0436\u0435<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/devops-ingineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_devops_181122&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0DevOps<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_181122&amp;utm_term=cat\">\u0412\u0441\u0435 \u043a\u0443\u0440\u0441\u044b<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/company\/skillfactory\/blog\/700260\/\"> https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/700260\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u043a <u><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_181122&amp;utm_term=lead\">\u0441\u0442\u0430\u0440\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/a><\/u>.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/700260\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tg\/0g\/l7\/tg0gl7du_uaedkl0orar-xki3su.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tg\/0g\/l7\/tg0gl7du_uaedkl0orar-xki3su.png\"\/><\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u043e\u043b\u043e\u0442\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0440\u0430\u0441\u0447\u0451\u0442\u0430 <strong>\u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 (causal effect)<\/strong> \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (\u043b\u0435\u0447\u0435\u043d\u0438\u044f, \u0440\u0435\u043a\u043b\u0430\u043c\u044b, \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u0438 \u0434\u0440.) \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0431\u043e\u043b\u0435\u0437\u043d\u044c, \u0434\u043e\u0445\u043e\u0434 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0440.) \u2014 \u044d\u0442\u043e <strong>A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>, (\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0420\u041a\u0418). \u041c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0440.) \u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0443\u044e \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u0438\u0437 \u0433\u0440\u0443\u043f\u043f. \u042d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0435\u043c\u044b\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-341449","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341449","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=341449"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341449\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}