{"id":5225,"date":"2024-04-02T08:21:59","date_gmt":"2024-04-02T08:21:59","guid":{"rendered":"https:\/\/radicalbit.ai\/?post_type=glossary&#038;p=5225"},"modified":"2025-03-04T16:21:37","modified_gmt":"2025-03-04T16:21:37","slug":"kolmogorov-smirnov-test","status":"publish","type":"glossary","link":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/","title":{"rendered":"Kolmogorov-Smirnov Test"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Kolmogorov-Smirnov (KS) test is a <strong>statistical method<\/strong> widely used in AI and machine learning to <strong>compare the similarity between two probability distributions.<\/strong> It is particularly valuable for assessing whether two datasets are drawn from the same underlying distribution, which is crucial in various AI applications, including model evaluation and data analysis. As a <strong>non-parametric test<\/strong>, the KS test does not assume any specific distribution (e.g., normal or binomial) for the data. This makes it versatile and applicable to any type of distribution, including continuous and discrete distributions, although it is more commonly used for continuous data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Does it work?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The test calculates the <strong>maximum distance<\/strong> between the <strong>cumulative distribution functions (CDFs)<\/strong> of two samples. The CDFs are typically empirical, derived from the data samples themselves. The test determines if this maximum distance is significant enough to reject the null hypothesis that the two samples come from the same distribution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Types of KS Tests<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Two-Sample KS Test<\/strong>: This is the most common version used in AI, where two empirical distributions are compared. It is useful for comparing the performance of different models or checking if a model&#8217;s training and production data distributions are similar<br><\/li>\n\n\n\n<li><strong>One-Sample KS Test<\/strong>: This version compares an empirical distribution to a theoretical distribution. It is less commonly used in AI but can be applied to test if a dataset follows a specific distribution, such as a normal distribution.<br><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Applications in AI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The KS test serves multiple critical functions in AI applications. It helps <strong>evaluate the performance<\/strong> of machine learning models by comparing the distribution of predicted outcomes with actual results, providing valuable insights into how well a model generalizes to new data. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, it&#8217;s used to<strong> compare the distribution<\/strong> of features in training and production datasets, ensuring that models are deployed on data similar to what they were trained on, which is essential for maintaining model performance over time. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The test also plays an important role in <strong>anomaly detection<\/strong> by identifying when a new dataset significantly differs from a baseline distribution, potentially indicating anomalies that require further investigation. These applications collectively make the Kolmogorov-Smirnov test an indispensable tool in the AI practitioner&#8217;s toolkit for ensuring model reliability and data consistency.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Kolmogorov-Smirnov (KS) test is a statistical method widely used in AI and machine learning to compare the similarity between two probability distributions. It is&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4814,"menu_order":0,"template":"","meta":{"footnotes":""},"class_list":["post-5225","glossary","type-glossary","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Kolmogorov-Smirnov Test | Radicalbit<\/title>\n<meta name=\"description\" content=\"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kolmogorov-Smirnov Test | Radicalbit\" \/>\n<meta property=\"og:description\" content=\"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/\" \/>\n<meta property=\"og:site_name\" content=\"Radicalbit\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-04T16:21:37+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/radicalbit.ai\/wp-content\/uploads\/2024\/02\/Simpler-faster-better-MLOps.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/\",\"url\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/\",\"name\":\"Kolmogorov-Smirnov Test | Radicalbit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/radicalbit.ai\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simpler-faster-better-MLOps.jpg\",\"datePublished\":\"2024-04-02T08:21:59+00:00\",\"dateModified\":\"2025-03-04T16:21:37+00:00\",\"description\":\"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/#primaryimage\",\"url\":\"https:\\\/\\\/radicalbit.ai\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simpler-faster-better-MLOps.jpg\",\"contentUrl\":\"https:\\\/\\\/radicalbit.ai\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simpler-faster-better-MLOps.jpg\",\"width\":1200,\"height\":628,\"caption\":\"Radicalbit MLOps & AI Observability Platform\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/resources\\\/glossary\\\/kolmogorov-smirnov-test\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kolmogorov-Smirnov Test\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/\",\"name\":\"Radicalbit\",\"description\":\"Simpler, faster, better MLOps\",\"publisher\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#organization\",\"name\":\"Radicalbit\",\"url\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/radicalbit.ai\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/radicalbit__RGB__logo-horizontal-positive-e1701861883280.webp\",\"contentUrl\":\"https:\\\/\\\/radicalbit.ai\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/radicalbit__RGB__logo-horizontal-positive-e1701861883280.webp\",\"width\":1570,\"height\":405,\"caption\":\"Radicalbit\"},\"image\":{\"@id\":\"https:\\\/\\\/radicalbit.ai\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/6639929\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kolmogorov-Smirnov Test | Radicalbit","description":"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/","og_locale":"it_IT","og_type":"article","og_title":"Kolmogorov-Smirnov Test | Radicalbit","og_description":"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions","og_url":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/","og_site_name":"Radicalbit","article_modified_time":"2025-03-04T16:21:37+00:00","og_image":[{"width":1200,"height":628,"url":"http:\/\/radicalbit.ai\/wp-content\/uploads\/2024\/02\/Simpler-faster-better-MLOps.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Tempo di lettura stimato":"2 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/","url":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/","name":"Kolmogorov-Smirnov Test | Radicalbit","isPartOf":{"@id":"https:\/\/radicalbit.ai\/it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/#primaryimage"},"image":{"@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/#primaryimage"},"thumbnailUrl":"https:\/\/radicalbit.ai\/wp-content\/uploads\/2024\/02\/Simpler-faster-better-MLOps.jpg","datePublished":"2024-04-02T08:21:59+00:00","dateModified":"2025-03-04T16:21:37+00:00","description":"The Kolmogorov-Smirnov Test is a non-parametric statistical test that allows determining the degree of similarity between two distributions","breadcrumb":{"@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/#primaryimage","url":"https:\/\/radicalbit.ai\/wp-content\/uploads\/2024\/02\/Simpler-faster-better-MLOps.jpg","contentUrl":"https:\/\/radicalbit.ai\/wp-content\/uploads\/2024\/02\/Simpler-faster-better-MLOps.jpg","width":1200,"height":628,"caption":"Radicalbit MLOps & AI Observability Platform"},{"@type":"BreadcrumbList","@id":"https:\/\/radicalbit.ai\/it\/resources\/glossary\/kolmogorov-smirnov-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/radicalbit.ai\/it\/"},{"@type":"ListItem","position":2,"name":"Kolmogorov-Smirnov Test"}]},{"@type":"WebSite","@id":"https:\/\/radicalbit.ai\/it\/#website","url":"https:\/\/radicalbit.ai\/it\/","name":"Radicalbit","description":"Simpler, faster, better MLOps","publisher":{"@id":"https:\/\/radicalbit.ai\/it\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/radicalbit.ai\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Organization","@id":"https:\/\/radicalbit.ai\/it\/#organization","name":"Radicalbit","url":"https:\/\/radicalbit.ai\/it\/","logo":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/radicalbit.ai\/it\/#\/schema\/logo\/image\/","url":"https:\/\/radicalbit.ai\/wp-content\/uploads\/2023\/11\/radicalbit__RGB__logo-horizontal-positive-e1701861883280.webp","contentUrl":"https:\/\/radicalbit.ai\/wp-content\/uploads\/2023\/11\/radicalbit__RGB__logo-horizontal-positive-e1701861883280.webp","width":1570,"height":405,"caption":"Radicalbit"},"image":{"@id":"https:\/\/radicalbit.ai\/it\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/6639929\/"]}]}},"_links":{"self":[{"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/glossary\/5225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/glossary\/5225\/revisions"}],"predecessor-version":[{"id":8114,"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/glossary\/5225\/revisions\/8114"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/media\/4814"}],"wp:attachment":[{"href":"https:\/\/radicalbit.ai\/it\/wp-json\/wp\/v2\/media?parent=5225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}