{"id":950,"date":"2023-07-28T05:19:18","date_gmt":"2023-07-28T05:19:18","guid":{"rendered":"https:\/\/statorials.org\/nl\/grubbs-test-python\/"},"modified":"2023-07-28T05:19:18","modified_gmt":"2023-07-28T05:19:18","slug":"grubbs-test-python","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/grubbs-test-python\/","title":{"rendered":"Hoe grubbs &#39;tester in python uit te voeren"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><strong>De Grubbs-test<\/strong> wordt gebruikt om de aanwezigheid van uitbijters in een dataset te identificeren. Om deze test te kunnen gebruiken, moet een dataset ongeveer normaal verdeeld zijn en minimaal zeven waarnemingen bevatten.<\/span><\/p>\n<p> <span style=\"color: #000000;\">In deze tutorial wordt uitgelegd hoe u de Grubbs-test in Python uitvoert.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Grubbs-test in Python<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Om de Grubbs-test in Python uit te voeren, kunnen we de functie smirnov_grubbs() uit het pakket <a href=\"https:\/\/pypi.org\/project\/outlier_utils\/\" target=\"_blank\" rel=\"noopener noreferrer\">outlier_utils<\/a> gebruiken, die de volgende syntaxis gebruikt:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>smirnov_grubbs.test (gegevens, alfa = 0,05)<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Goud:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>data:<\/strong> een numerieke vector van datawaarden<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>alpha:<\/strong> Het significantieniveau dat voor de test moet worden gebruikt. De standaardwaarde is 0,05<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Om deze functie te gebruiken, moet u eerst het <a href=\"https:\/\/pypi.org\/project\/outlier_utils\/\" target=\"_blank\" rel=\"noopener noreferrer\">outlier_utils-<\/a> pakket installeren:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>pip install outlier_utils\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Zodra dit pakket is ge\u00efnstalleerd, kunt u de Grubbs-test uitvoeren. De volgende voorbeelden illustreren hoe u dit kunt doen.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 1: Tweestaartige Grubbs-test<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code illustreert hoe u een tweezijdige Grubbs-test uitvoert, waarmee uitschieters aan beide uiteinden van de gegevensset worden gedetecteerd.<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> numpy <span style=\"color: #107d3f;\">as<\/span> np\n<span style=\"color: #008000;\">from<\/span> outliers <span style=\"color: #008000;\">import<\/span> smirnov_grubbs <span style=\"color: #008000;\">as<\/span> grubbs\n\n<span style=\"color: #008080;\">#define data<\/span>\ndata = np.array([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29, 40])\n\n<span style=\"color: #008080;\">#perform Grubbs' test<\/span>\ngrubbs. <span style=\"color: #3366ff;\">test<\/span> (data, alpha=.05)\n\narray([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29])\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Deze functie retourneert eenvoudigweg een array zonder de uitbijters. In dit geval was de maximale waarde van 40 een uitschieter en daarom verwijderd.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 2: Eenzijdige Grubbs-test<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u een eenzijdige Grubbs-test uitvoert voor de minimumwaarde en maximumwaarde in een gegevensset:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> numpy <span style=\"color: #107d3f;\">as<\/span> np\n<span style=\"color: #008000;\">from<\/span> outliers <span style=\"color: #008000;\">import<\/span> smirnov_grubbs <span style=\"color: #008000;\">as<\/span> grubbs\n\n<span style=\"color: #008080;\">#define data<\/span>\ndata = np.array([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29, 40])\n\n<span style=\"color: #008080;\">#perform Grubbs' test to see if minimum value is an outlier<\/span>\ngrubbs. <span style=\"color: #3366ff;\">min_test<\/span> (data, alpha=.05)\n\narray([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29, 40])\n\n<span style=\"color: #008080;\">#perform Grubbs' test to see if minimum value is an outlier\n<\/span>grubbs. <span style=\"color: #3366ff;\">max_test<\/span> (data, alpha=.05)\n\narray([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29])\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De minimale uitbijtertest heeft de minimumwaarde niet als uitbijter gedetecteerd. De maximale uitschietertest stelde echter vast dat de maximale waarde van 40 een uitschieter was en werd daarom verwijderd.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 3: Extraheer de index van de uitbijter<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u de index van de uitbijter kunt extraheren:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> numpy <span style=\"color: #107d3f;\">as<\/span> np\n<span style=\"color: #008000;\">from<\/span> outliers <span style=\"color: #008000;\">import<\/span> smirnov_grubbs <span style=\"color: #008000;\">as<\/span> grubbs\n\n<span style=\"color: #008080;\">#define data<\/span>\ndata = np.array([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29, 40])\n\n<span style=\"color: #008080;\">#perform Grubbs' test and identify index (if any) of the outlier<\/span>\ngrubbs. <span style=\"color: #3366ff;\">max_test_indices<\/span> (data, alpha=.05)\n\n[16]\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Dit vertelt ons dat er een uitbijter is op indexpositie 16 van de tabel.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 4: Haal de waarde uit de uitbijter<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u de waarde uit de uitbijter kunt extraheren:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> numpy <span style=\"color: #107d3f;\">as<\/span> np\n<span style=\"color: #008000;\">from<\/span> outliers <span style=\"color: #008000;\">import<\/span> smirnov_grubbs <span style=\"color: #008000;\">as<\/span> grubbs\n\n<span style=\"color: #008080;\">#define data<\/span>\ndata = np.array([5, 14, 15, 15, 14, 19, 17, 16, 20, 22, 8, 21, 28, 11, 9, 29, 40])\n\n<span style=\"color: #008080;\">#perform Grubbs' test and identify the actual value (if any) of the outlier<\/span>\ngrubbs. <span style=\"color: #3366ff;\">max_test_outliers<\/span> (data, alpha=.05)\n\n[40]\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Dit vertelt ons dat er een uitbijter is met een waarde van 40.<\/span><\/p>\n<h3> <strong>Hoe om te gaan met uitschieters<\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Als de Grubbs-test een uitbijter in uw dataset identificeert, heeft u verschillende opties:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1. Controleer nogmaals of de waarde geen typefout of gegevensinvoerfout is.<\/strong> Soms zijn waarden die als uitschieters in datasets verschijnen eenvoudigweg typefouten die door een individu zijn gemaakt tijdens het invoeren van gegevens. Controleer eerst of de waarde correct is ingevoerd voordat u verdere beslissingen neemt.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>2. Wijs een nieuwe waarde toe aan de uitbijter<\/strong> . Als de uitbijter het gevolg blijkt te zijn van een typfout of een fout bij het invoeren van gegevens, kunt u besluiten er een nieuwe waarde aan toe te kennen, zoals het gemiddelde<\/span> <a href=\"https:\/\/statorials.org\/nl\/meet-de-centrale-tendens\/\" target=\"_blank\" rel=\"noopener noreferrer\">of de mediaan<\/a> <span style=\"color: #000000;\">van de dataset.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>3. Verwijder de uitbijter.<\/strong> Als de waarde echt een uitbijter is, kunt u ervoor kiezen deze te verwijderen als deze een aanzienlijke impact heeft op uw analyse.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>De Grubbs-test wordt gebruikt om de aanwezigheid van uitbijters in een dataset te identificeren. Om deze test te kunnen gebruiken, moet een dataset ongeveer normaal verdeeld zijn en minimaal zeven waarnemingen bevatten. In deze tutorial wordt uitgelegd hoe u de Grubbs-test in Python uitvoert. Grubbs-test in Python Om de Grubbs-test in Python uit te voeren, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-950","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe de Grubbs-test in Python uit te voeren - Statorials<\/title>\n<meta name=\"description\" content=\"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/nl\/grubbs-test-python\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe de Grubbs-test in Python uit te voeren - Statorials\" \/>\n<meta property=\"og:description\" content=\"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/grubbs-test-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-28T05:19:18+00:00\" \/>\n<meta name=\"author\" content=\"Dr.benjamin anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr.benjamin anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/grubbs-test-python\/\",\"url\":\"https:\/\/statorials.org\/nl\/grubbs-test-python\/\",\"name\":\"Hoe de Grubbs-test in Python uit te voeren - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-28T05:19:18+00:00\",\"dateModified\":\"2023-07-28T05:19:18+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/grubbs-test-python\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/grubbs-test-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/grubbs-test-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe grubbs &#39;tester in python uit te voeren\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe de Grubbs-test in Python uit te voeren - Statorials","description":"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.","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:\/\/statorials.org\/nl\/grubbs-test-python\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe de Grubbs-test in Python uit te voeren - Statorials","og_description":"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.","og_url":"https:\/\/statorials.org\/nl\/grubbs-test-python\/","og_site_name":"Statorials","article_published_time":"2023-07-28T05:19:18+00:00","author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"3\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/grubbs-test-python\/","url":"https:\/\/statorials.org\/nl\/grubbs-test-python\/","name":"Hoe de Grubbs-test in Python uit te voeren - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-28T05:19:18+00:00","dateModified":"2023-07-28T05:19:18+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"Een eenvoudige uitleg over het uitvoeren van de Grubbs-test in Python om uitschieters te detecteren.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/grubbs-test-python\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/grubbs-test-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/grubbs-test-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe grubbs &#39;tester in python uit te voeren"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=950"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/950\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}