{"id":335316,"date":"2022-07-04T21:00:08","date_gmt":"2022-07-04T21:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=335316"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=335316","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041e\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f17\/edc\/2b9\/f17edc2b972d0cd10a2a92768a2bce44.png\" width=\"1275\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f17\/edc\/2b9\/f17edc2b972d0cd10a2a92768a2bce44.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u043c \u043b\u043e\u043d\u0433\u0440\u0438\u0434\u0435 \u043a \u0441\u0442\u0430\u0440\u0442\u0443 <a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_040722&amp;utm_term=lead\"><u>\u043a\u0443\u0440\u0441\u0430 \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/a> \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0431 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<hr\/>\n<p>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u2014 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 Data Science. \u042d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \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, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0417\u043e\u043b\u043e\u0442\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \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 \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 (\u0444\u0443\u043d\u043a\u0446\u0438\u0438 UX, \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u043e\u0439 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438, \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430 \u0438 \u0442. \u0434.) \u2014 \u044d\u0442\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043a\u0430\u043a A\/B-\u0442\u0435\u0441\u0442\u044b. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e, \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u0442\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0420\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u2014 \u044d\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0442\u0430\u043a\u0430\u044f, \u0447\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0451 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044e, \u044d\u0442\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u043c\u0438, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u00ab\u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438\u00bb. \u0423 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0443\u0436\u0447\u0438\u043d \u0438\u043b\u0438 \u043f\u043e\u0436\u0438\u043b\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0438 \u0442. \u0434. (\u044d\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u0430\u043c\u0438 \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438). \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043d\u0430\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c \u0438 \u0435\u0451 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u0430\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0430\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435\u0442 \u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439. \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u044b \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u2014 \u0441\u0442\u0440\u0430\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u2014 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u042d\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442 \u0438\u043d\u0442\u0443\u0438\u0446\u0438\u044e \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c: \u043f\u043e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043d\u0438 \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0448\u0443\u043c\u043e\u043c.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0435 \u043b\u044e\u0434\u0435\u0439, \u0438 \u043c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0445 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e (\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043b\u0435\u0447\u0435\u043d\u0438\u0435) \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u044b (\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0433\u043e). \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u0440\u0443\u043f\u043f, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c \u043e\u0442 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u0438. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430.<\/p>\n<p>\u042f \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 1000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 dgp_rnd_assignment() \u0438\u0437 <a href=\"https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/dgp.py\">src.dgp<\/a> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 <a href=\"https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/utils.py\">src.utils<\/a>.<\/p>\n<pre><code class=\"python\">from src.utils import *  from src.dgp import dgp_rnd_assignment    df = dgp_rnd_assignment().generate_data()  df.head()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9c6\/5fe\/e11\/9c65fee1170e6979a4b4c578d3b7983a.png\" alt=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0445\" title=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0445\" width=\"1344\" height=\"356\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c6\/5fe\/e11\/9c65fee1170e6979a4b4c578d3b7983a.png\"\/><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/figcaption><\/figure>\n<p> \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e 1000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 gender (\u043f\u043e\u043b), age (\u0432\u043e\u0437\u0440\u0430\u0441\u0442) \u0438 income (\u0434\u043e\u0445\u043e\u0434 \u0437\u0430 \u043d\u0435\u0434\u0435\u043b\u044e). \u041a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043b\u0435\u0447\u0435\u043d\u0438\u044f, \u043b\u0438\u0431\u043e \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f group), \u0438 \u043b\u044e\u0434\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043b\u0435\u0447\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u043c \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f arm).<\/p>\n<h2>\u0414\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e: \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0437\u0443\u0447\u0430\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u2014 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Python <a href=\"https:\/\/seaborn.pydata.org\/\">seaborn<\/a>.<\/p>\n<h3>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430 (\u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb)<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u044d\u0442\u043e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430. \u0422\u0430\u043a\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u0426\u0435\u043d\u0442\u0440 \u00ab\u044f\u0449\u0438\u043a\u0430\u00bb \u2014 \u043c\u0435\u0434\u0438\u0430\u043d\u0430, \u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 (Q1) \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c (Q3) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u00ab\u0423\u0441\u044b\u00bb \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 1,5 \u0440\u0430\u0437\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u043c\u0435\u0436\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d (Q3\u2013Q1) \u0432\u043d\u0435 \u00ab\u044f\u0449\u0438\u043a\u0430\u00bb. \u0422\u043e\u0447\u043a\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u00ab\u0443\u0441\u043e\u0432\u00bb \u043d\u0430\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<p>\u042d\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 (\u044f\u0449\u0438\u043a \u0438 \u00ab\u0443\u0441\u044b\u00bb), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0432\u044b\u0431\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"python\">sns.boxplot(data=df, x='Group', y='Income'); plt.title(\"Boxplot\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/35f\/a6c\/c08\/35fa6cc08a062d85603af64924dcfd72.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" width=\"1256\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/35f\/a6c\/c08\/35fa6cc08a062d85603af64924dcfd72.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u0435\u044f\u043d\u043e: \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u0435\u0433\u043e \u00ab\u0443\u0441\u044b\u00bb \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044f\u0449\u0438\u043a\u0430 \u0441 \u0443\u0441\u0430\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043d\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/h3>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b (\u00ab\u0431\u0438\u043d\u044b\u00bb) \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435.<\/p>\n<pre><code class=\"python\">sns.histplot(data=df, x='Income', hue='Group', bins=50); plt.title(\"Histogram\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/00e\/0ac\/d32\/00e0acd32ba122b958b34e4ce5ea39c6.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" width=\"1232\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/00e\/0ac\/d32\/00e0acd32ba122b958b34e4ce5ea39c6.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0440\u0430\u0437\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0448\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 stat \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 common_norm \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 False, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\">sns.histplot(data=df, x='Income', hue='Group', bins=50, stat='density', common_norm=False); plt.title(\"Density Histogram\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a8f\/cce\/8f9\/a8fcce8f972f614aedde3afe06ef8c2f.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" width=\"1275\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a8f\/cce\/8f9\/a8fcce8f972f614aedde3afe06ef8c2f.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b!<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0438\u043d\u043e\u0432 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439. \u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u0438\u043d\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441 \u043e\u0434\u043d\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u0430 \u0435\u0441\u043b\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0434\u0438\u043d \u0431\u0438\u043d. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u0443\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0442\u0435\u0440\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h3>\u042f\u0434\u0435\u0440\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 (KDE).<\/p>\n<pre><code class=\"python\">sns.kdeplot(x='Income', data=df, hue='Group', common_norm=False); plt.title(\"Kernel Density Function\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/08b\/957\/7d3\/08b9577d3945d5f11a374a62f9a1cc6c.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\" width=\"1275\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/08b\/957\/7d3\/08b9577d3945d5f11a374a62f9a1cc6c.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0412\u044b\u0448\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044f\u0434\u0435\u0440\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0445\u043e\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u00ab\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043b\u0441\u0442\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b\u00bb (\u0442. \u0435. \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e) \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0447\u0451\u0440\u043d\u043e\u0433\u043e \u044f\u0449\u0438\u043a\u0430, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u2014 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043e\u0441\u0438 x (\u0434\u043e\u0445\u043e\u0434) \u043d\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0440\u0430\u0432\u043d\u043e\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u043e\u0432);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u043d\u0438\u043a\u0430\u043a\u0430\u044f \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f (\u043a\u0430\u043a \u0441 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438), \u043d\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">sns.histplot(x='Income', data=df, hue='Group', bins=len(df), stat=\"density\",       element=\"step\", fill=False, cumulative=True, common_norm=False); plt.title(\"Cumulative distribution function\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/666\/629\/069\/66662906979a9c80b76578b06b0c1882.png\" alt=\"\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438\" title=\"\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438\" width=\"1238\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/666\/629\/069\/66662906979a9c80b76578b06b0c1882.png\"\/><figcaption>\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a?<\/p>\n<ul>\n<li>\n<p>\u0414\u0432\u0435 \u043b\u0438\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 0,5 (\u043e\u0441\u044c Y), \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u044b c\u0445\u043e\u0436\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0440\u0430\u043d\u0436\u0435\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0441\u0438\u043d\u0435\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u043b\u0435\u0432\u0430 \u0438 \u043d\u0438\u0436\u0435 \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u043f\u0440\u0430\u0432\u0430: \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043b\u0441\u0442\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c<\/h3>\n<p>\u0420\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u2014 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c. \u042d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u0440\u0443\u0433 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0440\u0443\u0433\u0430. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u043d\u0438\u044e \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c \u0432 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.<\/p>\n<p>\u0412 Python \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u2013\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c, \u0438, \u0445\u043e\u0442\u044f \u043f\u0430\u043a\u0435\u0442 statsmodels \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.statsmodels.org\/dev\/generated\/statsmodels.graphics.gofplots.qqplot.html\">qqplot<\/a>, \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 percentile.<\/p>\n<pre><code class=\"python\">income = df['Income'].values income_t = df.loc[df.Group=='treatment', 'Income'].values income_c = df.loc[df.Group=='control', 'Income'].values  df_pct = pd.DataFrame() df_pct['q_treatment'] = np.percentile(income_t, range(100)) df_pct['q_control'] = np.percentile(income_c, range(100))<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0430 \u043a\u0430\u043a \u044d\u0442\u0430\u043b\u043e\u043d \u0432\u0437\u044f\u0442\u044c \u043b\u0438\u043d\u0438\u044e \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c \u0432 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432:<\/p>\n<pre><code class=\"python\">plt.figure(figsize=(8, 8)) plt.scatter(x='q_control', y='q_treatment', data=df_pct, label='Actual fit'); sns.lineplot(x='q_control', y='q_control', data=df_pct, color='r', label='Line of perfect fit'); plt.xlabel('Quantile of income, control group') plt.ylabel('Quantile of income, treatment group') plt.legend() plt.title(\"QQ plot\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9e5\/943\/40a\/9e594340ab54ba9592c5ed1fa51224b6.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\" width=\"1033\" height=\"1053\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e5\/943\/40a\/9e594340ab54ba9592c5ed1fa51224b6.png\"\/><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c<\/figcaption><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0434\u043e\u0445\u043e\u0434 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u0443 \u0436\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 (\u043b\u0438\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435), \u043d\u043e \u0445\u0432\u043e\u0441\u0442\u044b \u0448\u0438\u0440\u0435: \u0442\u043e\u0447\u043a\u0438 \u043d\u0438\u0436\u0435 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430 \u043b\u0435\u0432\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0438 \u0432\u044b\u0448\u0435 \u043d\u0430 \u043f\u0440\u0430\u0432\u043e\u043c.<\/p>\n<h2>\u0414\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0442\u0435\u0441\u0442\u044b<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0442. \u0435. \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u00ab\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c, \u0438\u043b\u0438 \u043e\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0448\u0443\u043c\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438?\u00bb<\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>T-\u0442\u0435\u0441\u0442<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u2014 t-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430. T-\u0442\u0435\u0441\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0417\u0434\u0435\u0441\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c4f\/d7b\/7c0\/c4fd7b7c0456b00ac47f7d1cb33dd067.png\" alt=\"\u0422-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430\" title=\"\u0422-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430\" width=\"1204\" height=\"214\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4f\/d7b\/7c0\/c4fd7b7c0456b00ac47f7d1cb33dd067.png\"\/><figcaption>\u0422-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/figcaption><\/figure>\n<p>x\u0305 \u2014 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, s \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0412 \u043c\u044f\u0433\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a t-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f t-\u0442\u0435\u0441\u0442\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 ttest_ind \u0438\u0437 scipy. \u041e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">from scipy.stats import ttest_ind  stat, p_value = ttest_ind(income_c, income_t) print(f\"t-test: statistic={stat:.4f}, p-value={p_value:.4f}\") t-test: statistic=-1.5549, p-value=0.1203<\/code><\/pre>\n<p>\u041d\u0430\u0448\u0435 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 0,12, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0432 \u043e\u0431\u0435\u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445.<\/p>\n<h3>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0445 (SMD)<\/h3>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u0438 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 t-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 t-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0438\u0437-\u0437\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0441 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u043d\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 (SMD). \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430, \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d1e\/163\/427\/d1e16342749e9ace917c69af26181bc6.png\" alt=\"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0445\" title=\"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0445\" width=\"1196\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d1e\/163\/427\/d1e16342749e9ace917c69af26181bc6.png\"\/><figcaption>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0445<\/figcaption><\/figure>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435 0,1 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u00ab\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439\u00bb \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u2014 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u2014 \u043b\u0438\u0431\u043e t-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439, \u043b\u0438\u0431\u043e SMD \u2014 \u0438 \u0437\u0430\u043d\u0435\u0441\u0442\u0438 \u0432 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <a href=\"https:\/\/causalml.readthedocs.io\/en\/latest\/causalml.html#module-causalml.match\">create_table_one<\/a> \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/causalml.readthedocs.io\/en\/latest\/about.html\">causalml<\/a>. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">from causalml.match import create_table_one  df['treatment'] = df['Group']=='treatment' create_table_one(df, 'treatment', ['Gender', 'Age', 'Income'])<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e7f\/2cf\/b02\/e7f2cfb0241c17d1fb08118a7198adff.png\" alt=\"\u0411\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\" title=\"\u0411\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\" width=\"1344\" height=\"341\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e7f\/2cf\/b02\/e7f2cfb0241c17d1fb08118a7198adff.png\"\/><figcaption>\u0411\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430<\/figcaption><\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 SMD \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0431\u043e\u043b\u0435\u0435 0,1 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f.<\/p>\n<h3>U-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u041c\u0430\u043d\u043d\u0430 \u2014 \u0423\u0438\u0442\u043d\u0438<\/h3>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u2014 U-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u041c\u0430\u043d\u043d\u0430 \u2014 \u0423\u0438\u0442\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u0443\u043b\u0435\u0432\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u2014 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 (\u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0438\u0435) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f.<\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440, U-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u041c\u0430\u043d\u043d\u0430 \u2014 \u0423\u0438\u0442\u043d\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432 \u0438 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0446\u0435\u043d\u0442\u0440\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435 U\u2081 = R\u2081 \u2212 n\u2081(n\u2081 + 1)\/2, \u0433\u0434\u0435 R\u2081 \u2014 \u0441\u0443\u043c\u043c\u0430 \u0440\u0430\u043d\u0433\u043e\u0432 \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0430 n\u2081 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435 U\u2082 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a stat = min(U\u2081, U\u2082).<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u043d\u0433\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 (\u0442. \u0435. \u043e\u0431 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043c\u0435\u0434\u0438\u0430\u043d\u0435) \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439.<\/p>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0437\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c R \u0438 U \u0442\u0430\u043a\u043e\u0432\u0430: \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435, \u0442\u043e R\u2081 = n\u2081(n\u2081 + 1)\/2 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, U\u2081 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u044b\u043c \u043d\u0443\u043b\u044e (\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435). \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b \u0434\u0432\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0431\u044b\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0438, U\u2081 \u0438 U\u2082 \u0431\u044b\u043b\u0438 \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438 \u043a n\u2081 n\u2082\/2 (\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435).<\/p>\n<p>\u041c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0442\u0435\u0441\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 mannwhitneyu \u0438\u0437 scipy:<\/p>\n<pre><code class=\"python\">from scipy.stats import mannwhitneyu  stat, p_value = mannwhitneyu(income_t, income_c) print(f\" Mann\u2013Whitney U Test: statistic={stat:.4f}, p-value={p_value:.4f}\") Mann\u2013Whitney U Test: statistic=106371.5000, p-value=0.6012<\/code><\/pre>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0,6, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u043c\u0435\u0434\u0438\u0430\u043d\u0430\u0445 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438.<\/p>\n<h3>\u041f\u0435\u0440\u043c\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b<\/h3>\n<p>\u041d\u0435\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u041c\u0430\u043d\u043d\u0430 \u2014 \u0423\u0438\u0442\u043d\u0438 \u2014 \u043f\u0435\u0440\u043c\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 (\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0435) \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043e\u0432\u043a\u0430 \u043c\u0435\u0442\u043e\u043a \u0433\u0440\u0443\u043f\u043f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0441 \u0435\u0451 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">sample_stat = np.mean(income_t) - np.mean(income_c) stats = np.zeros(1000) for k in range(1000):   labels = np.random.permutation((df['Group'] == 'treatment').values)   stats[k] = np.mean(income[labels]) - np.mean(income[labels==False]) p_value = np.mean(stats > sample_stat)  print(f\"Permutation test: p-value={p_value:.4f}\") Permutation test: p-value=0.0530<\/code><\/pre>\n<p>\u041f\u0435\u0440\u043c\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0434\u0430\u0451\u0442 \u043d\u0430\u043c p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0,053, \u0430 \u044d\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0441\u043b\u0430\u0431\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 5%.<\/p>\n<p>\u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435? \u041e\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1 \u2013 0,0560 = 94,4% \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0430\u043c.<\/p>\n<p>\u0422\u0435\u0441\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c: \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0442\u0435\u0441\u0442\u0430 \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">plt.hist(stats, label='Permutation Statistics', bins=30); plt.axvline(x=sample_stat, c='r', ls='--', label='Sample Statistic'); plt.legend(); plt.xlabel('Income difference between treatment and control group') plt.title('Permutation Test');<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/526\/1f9\/102\/5261f9102c783503000b23589a38be32.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c\" width=\"1207\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/526\/1f9\/102\/5261f9102c783503000b23589a38be32.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043f\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\u043c<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u0430 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0432 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0431\u043e\u0440\u043a\u0430\u0445, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c.<\/p>\n<h3>\u0422\u0435\u0441\u0442 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442<\/h3>\n<p>\u0422\u0435\u0441\u0442 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445.<\/p>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u0418\u0434\u0435\u044f \u0437\u0434\u0435\u0441\u044c \u2014 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f. \u0415\u0441\u043b\u0438 \u0431\u044b \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u0438\u043d\u0435. \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c: \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442 \u0431\u044b\u043b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u0438\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p>\u042f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0446\u0438\u043b\u044f\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0435\u0441\u043b\u0438 \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438.<\/p>\n<pre><code class=\"python\"># Init dataframe df_bins = pd.DataFrame()  # Generate bins from control group _, bins = pd.qcut(income_c, q=10, retbins=True) df_bins['bin'] = pd.cut(income_c, bins=bins).value_counts().index  # Apply bins to both groups df_bins['income_c_observed'] = pd.cut(income_c, bins=bins).value_counts().values df_bins['income_t_observed'] = pd.cut(income_t, bins=bins).value_counts().values  # Compute expected frequency in the treatment group df_bins['income_t_expected'] = df_bins['income_c_observed'] \/ np.sum(df_bins['income_c_observed']) * np.sum(df_bins['income_t_observed'])  df_bins<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a84\/b0e\/520\/a84b0e5200ed0e0d100d62a6f70a2d56.png\" alt=\"\u0411\u0438\u043d\u044b \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b\" title=\"\u0411\u0438\u043d\u044b \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b\" width=\"1344\" height=\"651\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a84\/b0e\/520\/a84b0e5200ed0e0d100d62a6f70a2d56.png\"\/><figcaption>\u0411\u0438\u043d\u044b \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0435\u0441\u0442, \u0441\u0440\u0430\u0432\u043d\u0438\u0432 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 (E) \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0435 (O) \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e \u0431\u0438\u043d\u0430\u043c. \u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b33\/caa\/13e\/b33caa13ed46809aa12fe5ecad333592.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442\" title=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442\" width=\"1196\" height=\"186\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b33\/caa\/13e\/b33caa13ed46809aa12fe5ecad333592.png\"\/><figcaption>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442<\/figcaption><\/figure>\n<p>\u0411\u0438\u043d\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a i, \u0430 O \u2014 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0438\u043d\u0435 i; E \u2014 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u0430 i. \u041c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u043d\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0435\u0446\u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0438\u043d \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0431\u0438\u043d\u043e\u0432. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0442\u0435\u0441\u0442\u0430 \u0438 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 chisquare \u0438\u0437 scipy:<\/p>\n<pre><code class=\"python\">from scipy.stats import chisquare  stat, p_value = chisquare(df_bins['income_t_observed'], df_bins['income_t_expected']) print(f\"Chi-squared Test: statistic={stat:.4f}, p-value={p_value:.4f}\") Chi-squared Test: statistic=32.1432, p-value=0.0002<\/code><\/pre>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0435\u0441\u0442 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e\u0431 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u041f\u043e\u0447\u0435\u043c\u0443? \u0414\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0446\u0435\u043d\u0442\u0440, \u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b, \u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0445\u0438-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0446\u0435\u043d\u0442\u0440\u0435, \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>\u0418 \u044d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0435\u0440\u0435\u0433\u0430\u0435\u0442: \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u043f\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0438\u0437 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0432\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435!<\/p>\n<h3>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430<\/h3>\n<p>\u0418\u0434\u0435\u044f \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad6\/804\/5e3\/ad68045e33a6dab50262c787c967422e.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430\" title=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430\" width=\"1200\" height=\"158\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad6\/804\/5e3\/ad68045e33a6dab50262c787c967422e.png\"\/><figcaption>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430<\/figcaption><\/figure>\n<p>\u0413\u0434\u0435 F\u2081 \u0438 F\u2082 \u2014 \u0434\u0432\u0435 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0430 x \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0410\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0442\u0435\u0441\u0442, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0442\u0435\u0441\u0442\u0430. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">df_ks = pd.DataFrame() df_ks['Income'] = np.sort(df['Income'].unique()) df_ks['F_control'] = df_ks['Income'].apply(lambda x: np.mean(income_c&lt;=x)) df_ks['F_treatment'] = df_ks['Income'].apply(lambda x: np.mean(income_t&lt;=x)) df_ks.head()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/895\/38b\/e0d\/89538be0dab443dab7206c586a313714.png\" alt=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438\" title=\"\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438\" width=\"1344\" height=\"356\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/895\/38b\/e0d\/89538be0dab443dab7206c586a313714.png\"\/><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u0447\u043a\u0443, \u0433\u0434\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435.<\/p>\n<pre><code class=\"python\">k = np.argmax( np.abs(df_ks['F_control'] - df_ks['F_treatment'])) ks_stat = np.abs(df_ks['F_treatment'][k] - df_ks['F_control'][k])<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438: \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0432\u0435 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<pre><code class=\"python\">y = (df_ks['F_treatment'][k] + df_ks['F_control'][k])\/2 plt.plot('Income', 'F_control', data=df_ks, label='Control') plt.plot('Income', 'F_treatment', data=df_ks, label='Treatment') plt.errorbar(x=df_ks['Income'][k], y=y, yerr=ks_stat\/2, color='k',       capsize=5, mew=3, label=f\"Test statistic: {ks_stat:.4f}\") plt.legend(loc='center right'); plt.title(\"Kolmogorov-Smirnov Test\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5a0\/90d\/493\/5a090d4933a3ef9e6546f97f6083080d.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430\" title=\"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430\" width=\"1201\" height=\"798\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a0\/90d\/493\/5a090d4933a3ef9e6546f97f6083080d.png\"\/><figcaption>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u041a\u043e\u043b\u043c\u043e\u0433\u043e\u0440\u043e\u0432\u0430 \u2014 \u0421\u043c\u0438\u0440\u043d\u043e\u0432\u0430<\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0438 \u0434\u043e\u0445\u043e\u0434\u0435 ~650. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0430\u043c \u0442\u0435\u0441\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e kstest \u0438\u0437 scipy. <\/p>\n<pre><code class=\"python\">from scipy.stats import kstest  stat, p_value = kstest(income_t, income_c) print(f\" Kolmogorov-Smirnov Test: statistic={stat:.4f}, p-value={p_value:.4f}\") Kolmogorov-Smirnov Test: statistic=0.0974, p-value=0.0355<\/code><\/pre>\n<p>\u041d\u0430\u0448\u0435 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435 5%, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e 95% \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e\u0431 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f \u2014 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<p>\u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f: \u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f. \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0433\u0440\u0443\u043f\u043f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e? \u0422\u043e\u0433\u0434\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u044b\u0448\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u043e, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u2014 \u043d\u0435\u0442. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430 (\u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb)<\/h3>\n<p>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f \u0438\u0437 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b: \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u044f\u0434\u043e\u043c.<\/p>\n<pre><code class=\"python\">sns.boxplot(x='Arm', y='Income', data=df.sort_values('Arm')); plt.title(\"Boxplot, multiple groups\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf4\/467\/0d1\/bf44670d1e005b47b472f15e04492865.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" width=\"1256\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf4\/467\/0d1\/bf44670d1e005b47b472f15e04492865.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f: \u0433\u0440\u0443\u043f\u043f\u044b \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u043c\u0435\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0434\u043e\u0445\u043e\u0434.<\/p>\n<h3>\u0421\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430<\/h3>\n<p>\u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432\u0438\u0434\u0430 \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u044f\u0434\u0435\u0440\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438, \u2014 \u0441\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430. \u041e\u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043e\u0441\u0438 Y \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430.<\/p>\n<pre><code class=\"python\">sns.violinplot(x='Arm', y='Income', data=df.sort_values('Arm')); plt.title(\"Violin Plot, multiple groups\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/234\/a4f\/56f\/234a4f56f3c58c19c0663b304b3ae4a1.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" width=\"1256\" height=\"835\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/234\/a4f\/56f\/234a4f56f3c58c19c0663b304b3ae4a1.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0438 \u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb, \u0441\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h3>Ridgeline (\u0433\u0440\u0443\u043f\u043f\u043e\u0432\u0430\u044f \u0445\u0440\u0435\u0431\u0442\u043e\u0432\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430)<\/h3>\n<p>\u042d\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0434\u0435\u0440\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0434\u043e\u043b\u044c \u043e\u0441\u0438 X, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435 \u0441\u043a\u0440\u0438\u043f\u0438\u0447\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u043e \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438 \u0432 matplotlib, \u043d\u0438 \u0432 seaborn \u043d\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u043e\u0439 \u0445\u0440\u0435\u0431\u0442\u043e\u0432\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u0438\u0437 <a href=\"https:\/\/github.com\/leotac\/joypy\">joypy<\/a>.<\/p>\n<pre><code class=\"python\">from joypy import joyplot  joyplot(df, by='Arm', column='Income', colormap=sns.color_palette(\"crest\", as_cmap=True)); plt.xlabel('Income'); plt.title(\"Ridgeline Plot, multiple groups\");<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a0d\/a94\/50b\/a0da9450b1d3323fc1096ba5a0d86666.png\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" title=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f\" width=\"1417\" height=\"951\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a0d\/a94\/50b\/a0da9450b1d3323fc1096ba5a0d86666.png\"\/><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u0430\u044f \u0445\u0440\u0435\u0431\u0442\u043e\u0432\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0433\u0440\u0443\u043f\u043f\u044b \u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u0445\u043e\u0434 \u0432\u044b\u0448\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u041d\u0430 \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043b\u0435\u0433\u0447\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f \u2014 \u0442\u0435\u0441\u0442\u044b<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0440\u0443\u043f\u043f. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c F-\u0442\u0435\u0441\u0442\u0435.<\/p>\n<h3>F-\u0442\u0435\u0441\u0442<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c (ANOVA).<\/p>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 F-\u0442\u0435\u0441\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/06a\/9d5\/638\/06a9d563885fe23b9d553fe7104632aa.png\" alt=\"F-\u0442\u0435\u0441\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430\" title=\"F-\u0442\u0435\u0441\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430\" width=\"1386\" height=\"172\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06a\/9d5\/638\/06a9d563885fe23b9d553fe7104632aa.png\"\/><figcaption>F-\u0442\u0435\u0441\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c G \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0443\u043f\u043f, N \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439, x\u0305 \u2014 \u043e\u0431\u0449\u0435\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u0430 x\u0305g \u2014 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 g. \u041f\u0440\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u0440\u0443\u043f\u043f\u044b f-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 F-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c.<\/p>\n<pre><code class=\"python\">from scipy.stats import f_oneway  income_groups = [df.loc[df['Arm']==arm, 'Income'].values for arm in df['Arm'].dropna().unique()] stat, p_value = f_oneway(*income_groups) print(f\"F Test: statistic={stat:.4f}, p-value={p_value:.4f}\") F Test: statistic=9.0911, p-value=0.0000<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e, \u0447\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0442\u0438\u043f\u0430\u043c\u0438 \u043b\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<p><a href=\"https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/distr.ipynb\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 Jupyter Notebook<\/a>.<\/p>\n<p>\u0410 \u043f\u043e\u043a\u0430 \u0432\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u0432\u0430\u043c \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a\u0438 \u0438\u043b\u0438 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044e, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<ul>\n<li>\n<p><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_040722&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_040722&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e <a href=\"https:\/\/skillfactory.ru\/concalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_040722&amp;utm_term=conc\">\u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044e<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e85\/0f9\/a91\/e850f9a91128fd192c5f8818988bd526.png\" width=\"1000\" height=\"200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e85\/0f9\/a91\/e850f9a91128fd192c5f8818988bd526.png\"\/><figcaption><\/figcaption><\/figure>\n<hr\/>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>[1] Student, <a href=\"https:\/\/www.jstor.org\/stable\/2331554\"><u>The Probable Error of a Mean<\/u><\/a> (1908), <em>Biometrika<\/em>.<\/p>\n<p>[2] F. Wilcoxon, <a href=\"https:\/\/www.jstor.org\/stable\/3001968\"><u>Individual Comparisons by Ranking Methods<\/u><\/a> (1945), <em>Biometrics Bulletin<\/em>.<\/p>\n<p>[3] B. L. Welch, <a href=\"https:\/\/academic.oup.com\/biomet\/article\/34\/1-2\/28\/210174\"><u>The generalization of \u201cStudent\u2019s\u201d problem when several different population variances are involved<\/u><\/a> (1947), <em>Biometrika<\/em>.<\/p>\n<p>[4] H. B. Mann, D. R. Whitney, <a href=\"https:\/\/www.jstor.org\/stable\/2236101\"><u>On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other<\/u><\/a> (1947), <em>The Annals of Mathematical Statistics<\/em>.<\/p>\n<p>[5] E. Brunner, U. Munzen, <a href=\"https:\/\/onlinelibrary.wiley.com\/doi\/abs\/10.1002\/(SICI)1521-4036(200001)42:1%3C17::AID-BIMJ17%3E3.0.CO;2-U\"><u>The Nonparametric Behrens-Fisher Problem: Asymptotic Theory and a Small-Sample Approximation<\/u><\/a> (2000), <em>Biometrical Journal<\/em>.<\/p>\n<p>[6] A. N. Kolmogorov, <a href=\"https:\/\/link.springer.com\/chapter\/10.1007\/978-94-011-2260-3_15\"><u>Sulla determinazione empirica di una legge di distribuzione<\/u><\/a> (1933), <em>Giorn. Ist. Ital. Attuar.<\/em>.<\/p>\n<p>[7] H. Cram\u00e9r, <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1080\/03461238.1928.10416862\"><u>On the composition of elementary errors<\/u><\/a> (1928), <em>Scandinavian Actuarial Journal<\/em>.<\/p>\n<p>[8] R. von Mises, <a href=\"https:\/\/www.ams.org\/journals\/bull\/1937-43-05\/S0002-9904-1937-06520-7\/\"><u>Wahrscheinlichkeit statistik und wahrheit<\/u><\/a> (1936), <em>Bulletin of the American Mathematical Society<\/em>.<\/p>\n<p>[9] T. W. Anderson, D. A. Darling, <a href=\"https:\/\/projecteuclid.org\/journals\/annals-of-mathematical-statistics\/volume-23\/issue-2\/Asymptotic-Theory-of-Certain-Goodness-of-Fit-Criteria-Based-on\/10.1214\/aoms\/1177729437.full\"><u>Asymptotic Theory of Certain \u201cGoodness of Fit\u201d Criteria Based on Stochastic Processes<\/u><\/a> (1953), <em>The Annals of Mathematical Statistics<\/em>.<\/p>\n<hr\/>\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\/674880\/\"> https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/674880\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u043c \u043b\u043e\u043d\u0433\u0440\u0438\u0434\u0435 \u043a \u0441\u0442\u0430\u0440\u0442\u0443 <a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_040722&amp;utm_term=lead\"><u>\u043a\u0443\u0440\u0441\u0430 \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/a> \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0431 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<hr\/>\n<p>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u2014 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 Data Science. \u042d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \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, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0417\u043e\u043b\u043e\u0442\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \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 \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u043b\u044e\u0431\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 (\u0444\u0443\u043d\u043a\u0446\u0438\u0438 UX, \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u043e\u0439 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438, \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430 \u0438 \u0442. \u0434.) \u2014 \u044d\u0442\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043a\u0430\u043a A\/B-\u0442\u0435\u0441\u0442\u044b. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043e\u0442\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e, \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u0442\u0438\u0445 \u0433\u0440\u0443\u043f\u043f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0420\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u2014 \u044d\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0442\u0430\u043a\u0430\u044f, \u0447\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0451 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044e, \u044d\u0442\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u043c\u0438, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u00ab\u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438\u00bb. \u0423 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0443\u0436\u0447\u0438\u043d \u0438\u043b\u0438 \u043f\u043e\u0436\u0438\u043b\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0438 \u0442. \u0434. (\u044d\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u0430\u043c\u0438 \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438). \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043d\u0430\u043c\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c \u0438 \u0435\u0451 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u0430\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0430\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435\u0442 \u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439. \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0442\u044b \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u2014 \u0441\u0442\u0440\u0430\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u2014 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u042d\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442 \u0438\u043d\u0442\u0443\u0438\u0446\u0438\u044e \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c: \u043f\u043e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043d\u0438 \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0448\u0443\u043c\u043e\u043c.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0435 \u043b\u044e\u0434\u0435\u0439, \u0438 \u043c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0445 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e (\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043b\u0435\u0447\u0435\u043d\u0438\u0435) \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u044b (\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0433\u043e). \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u0440\u0443\u043f\u043f, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c \u043e\u0442 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0440\u044c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u0438. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430.<\/p>\n<p>\u042f \u0441\u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 1000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 dgp_rnd_assignment() \u0438\u0437 <a href=\"https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/dgp.py\">src.dgp<\/a> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 <a href=\"https:\/\/github.com\/matteocourthoud\/Blog-Posts\/blob\/main\/notebooks\/src\/utils.py\">src.utils<\/a>.<\/p>\n<pre><code class=\"python\">from src.utils import *  from src.dgp import dgp_rnd_assignment    df = dgp_rnd_assignment().generate_data()  df.head()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/figcaption><\/figure>\n<p> \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e 1000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 gender (\u043f\u043e\u043b), age (\u0432\u043e\u0437\u0440\u0430\u0441\u0442) \u0438 income (\u0434\u043e\u0445\u043e\u0434 \u0437\u0430 \u043d\u0435\u0434\u0435\u043b\u044e). \u041a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043b\u0435\u0447\u0435\u043d\u0438\u044f, \u043b\u0438\u0431\u043e \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f group), \u0438 \u043b\u044e\u0434\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043b\u0435\u0447\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0447\u0435\u0442\u044b\u0440\u0451\u043c \u0442\u0438\u043f\u0430\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u044f (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f arm).<\/p>\n<h2>\u0414\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e: \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0437\u0443\u0447\u0430\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u2014 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Python <a href=\"https:\/\/seaborn.pydata.org\/\">seaborn<\/a>.<\/p>\n<h3>\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430 (\u00ab\u044f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb)<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u044d\u0442\u043e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0437\u043c\u0430\u0445\u0430. \u0422\u0430\u043a\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u0426\u0435\u043d\u0442\u0440 \u00ab\u044f\u0449\u0438\u043a\u0430\u00bb \u2014 \u043c\u0435\u0434\u0438\u0430\u043d\u0430, \u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 (Q1) \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c (Q3) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u00ab\u0423\u0441\u044b\u00bb \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 1,5 \u0440\u0430\u0437\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u043c\u0435\u0436\u043a\u0432\u0430\u0440\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d (Q3\u2013Q1) \u0432\u043d\u0435 \u00ab\u044f\u0449\u0438\u043a\u0430\u00bb. \u0422\u043e\u0447\u043a\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u00ab\u0443\u0441\u043e\u0432\u00bb \u043d\u0430\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<p>\u042d\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 (\u044f\u0449\u0438\u043a \u0438 \u00ab\u0443\u0441\u044b\u00bb), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0432\u044b\u0431\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"python\">sns.boxplot(data=df, x='Group', y='Income'); plt.title(\"Boxplot\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u0435\u044f\u043d\u043e: \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u0435\u0433\u043e \u00ab\u0443\u0441\u044b\u00bb \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044f\u0449\u0438\u043a\u0430 \u0441 \u0443\u0441\u0430\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043d\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/h3>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b (\u00ab\u0431\u0438\u043d\u044b\u00bb) \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435.<\/p>\n<pre><code class=\"python\">sns.histplot(data=df, x='Income', hue='Group', bins=50); plt.title(\"Histogram\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0440\u0430\u0437\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0448\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 stat \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 common_norm \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 False, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\">sns.histplot(data=df, x='Income', hue='Group', bins=50, stat='density', common_norm=False); plt.title(\"Density Histogram\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u044b!<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0438\u043d\u043e\u0432 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439. \u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0431\u0438\u043d\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0441 \u043e\u0434\u043d\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u0430 \u0435\u0441\u043b\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0434\u0438\u043d \u0431\u0438\u043d. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u0443\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430 \u0442\u0435\u0440\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u2014 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438.<\/p>\n<h3>\u042f\u0434\u0435\u0440\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 (KDE).<\/p>\n<pre><code class=\"python\">sns.kdeplot(x='Income', data=df, hue='Group', common_norm=False); plt.title(\"Kernel Density Function\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c<\/figcaption><\/figure>\n<p>\u0412\u044b\u0448\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044f\u0434\u0435\u0440\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0445\u043e\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u00ab\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043b\u0441\u0442\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b\u00bb (\u0442. \u0435. \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e) \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0447\u0451\u0440\u043d\u043e\u0433\u043e \u044f\u0449\u0438\u043a\u0430, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u2014 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043e\u0441\u0438 x (\u0434\u043e\u0445\u043e\u0434) \u043d\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0440\u0430\u0432\u043d\u043e\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043d\u043e\u0432);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u043d\u0438\u043a\u0430\u043a\u0430\u044f \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f (\u043a\u0430\u043a \u0441 \u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438), \u043d\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">sns.histplot(x='Income', data=df, hue='Group', bins=len(df), stat=\"density\",       element=\"step\", fill=False, cumulative=True, common_norm=False); plt.title(\"Cumulative distribution function\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u041a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a?<\/p>\n<ul>\n<li>\n<p>\u0414\u0432\u0435 \u043b\u0438\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 0,5 (\u043e\u0441\u044c Y), \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u044b c\u0445\u043e\u0436\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0440\u0430\u043d\u0436\u0435\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0441\u0438\u043d\u0435\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u043b\u0435\u0432\u0430 \u0438 \u043d\u0438\u0436\u0435 \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441\u043f\u0440\u0430\u0432\u0430: \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043b\u0441\u0442\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c<\/h3>\n<p>\u0420\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u2014 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c. \u042d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u0440\u0443\u0433 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0440\u0443\u0433\u0430. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u043d\u0438\u044e \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c \u0432 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.<\/p>\n<p>\u0412 Python \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c\u2013\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c, \u0438, \u0445\u043e\u0442\u044f \u043f\u0430\u043a\u0435\u0442 statsmodels \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.statsmodels.org\/dev\/generated\/statsmodels.graphics.gofplots.qqplot.html\">qqplot<\/a>, \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 percentile.<\/p>\n<pre><code class=\"python\">income = df['Income'].values income_t = df.loc[df.Group=='treatment', 'Income'].values income_c = df.loc[df.Group=='control', 'Income'].values  df_pct = pd.DataFrame() df_pct['q_treatment'] = np.percentile(income_t, range(100)) df_pct['q_control'] = np.percentile(income_c, range(100))<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u0435\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430, \u0430 \u043a\u0430\u043a \u044d\u0442\u0430\u043b\u043e\u043d \u0432\u0437\u044f\u0442\u044c \u043b\u0438\u043d\u0438\u044e \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c \u0432 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432:<\/p>\n<pre><code class=\"python\">plt.figure(figsize=(8, 8)) plt.scatter(x='q_control', y='q_treatment', data=df_pct, label='Actual fit'); sns.lineplot(x='q_control', y='q_control', data=df_pct, color='r', label='Line of perfect fit'); plt.xlabel('Quantile of income, control group') plt.ylabel('Quantile of income, treatment group') plt.legend() plt.title(\"QQ plot\");<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c-\u043a\u0432\u0430\u043d\u0442\u0438\u043b\u044c<\/figcaption><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: \u0434\u043e\u0445\u043e\u0434 \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u0443 \u0436\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 (\u043b\u0438\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435), \u043d\u043e \u0445\u0432\u043e\u0441\u0442\u044b \u0448\u0438\u0440\u0435: \u0442\u043e\u0447\u043a\u0438 \u043d\u0438\u0436\u0435 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430 \u043b\u0435\u0432\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0438 \u0432\u044b\u0448\u0435 \u043d\u0430 \u043f\u0440\u0430\u0432\u043e\u043c.<\/p>\n<h2>\u0414\u0432\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0442\u0435\u0441\u0442\u044b<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \u0442. \u0435. \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u00ab\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c, \u0438\u043b\u0438 \u043e\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0448\u0443\u043c\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438?\u00bb<\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>T-\u0442\u0435\u0441\u0442<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u2014 t-\u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430. T-\u0442\u0435\u0441\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0417\u0434\u0435\u0441\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u043b\u0438 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u0434\u0432\u0443\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption>\u0422-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/figcaption><\/figure>\n<p>x\u0305 \u2014 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, s \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0412 \u043c\u044f\u0433\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a t-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0421\u0442\u044c\u044e\u0434\u0435\u043d\u0442\u0430. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f t-\u0442\u0435\u0441\u0442\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 ttest_ind \u0438\u0437 scipy. \u041e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 p-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">from scipy.stats import ttest_ind  stat, p_value = ttest_ind(income_c, income_t) print(f\"t-test:<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-335316","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335316","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=335316"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335316\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}