{"id":3119,"date":"2023-07-19T03:24:49","date_gmt":"2023-07-19T03:24:49","guid":{"rendered":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/"},"modified":"2023-07-19T03:24:49","modified_gmt":"2023-07-19T03:24:49","slug":"exponentiele-distributiepython","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/","title":{"rendered":"Hoe exponenti\u00eble distributie in python te gebruiken"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">De <a href=\"https:\/\/statorials.org\/nl\/exponentiele-verdeling-1\/\" target=\"_blank\" rel=\"noopener\">exponenti\u00eble verdeling<\/a> is een waarschijnlijkheidsverdeling die wordt gebruikt om de tijd te modelleren die we moeten wachten totdat een bepaalde gebeurtenis plaatsvindt.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Als een <a href=\"https:\/\/statorials.org\/nl\/willekeurige-variabelen\/\" target=\"_blank\" rel=\"noopener\">willekeurige variabele<\/a> <em>X<\/em> een exponenti\u00eble verdeling volgt,<\/span> <span style=\"color: #000000;\">kan de cumulatieve verdelingsfunctie van <em>X<\/em> worden geschreven:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong><em>F<\/em> (x; \u03bb) = 1 \u2013 e <sup>-\u03bbx<\/sup><\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Goud:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>\u03bb:<\/strong> de snelheidsparameter (berekend als \u03bb = 1\/\u03bc)<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>e:<\/strong> Een constante die ongeveer gelijk is aan 2,718<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">In deze tutorial wordt uitgelegd hoe u de exponenti\u00eble distributie in Python gebruikt.<\/span><\/p>\n<h3> <strong>Hoe een exponenti\u00eble verdeling te genereren<\/strong><\/h3>\n<p> <span style=\"color: #000000;\">U kunt de functie <strong>expon.rvs(scale, size)<\/strong> uit de SciPy-bibliotheek in Python gebruiken om willekeurige waarden te genereren uit een exponenti\u00eble verdeling met een specifieke snelheidsparameter en steekproefomvang:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">from<\/span> scipy. <span style=\"color: #3366ff;\">stats<\/span> <span style=\"color: #008000;\">import<\/span> expo\n\n<span style=\"color: #008080;\">#generate random values from exponential distribution with rate=40 and sample size=10<\/span>\nexpon. <span style=\"color: #3366ff;\">rvs<\/span> (scale= <span style=\"color: #008000;\">40<\/span> , size= <span style=\"color: #008000;\">10<\/span> )\n\narray([116.5368323 , 67.23514699, 12.00399043, 40.74580584,\n        34.60922432, 2.68266663, 22.70459831, 97.66661811,\n         6.64272914, 46.15547298])\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>Opmerking<\/strong> : u kunt de volledige SciPy-bibliotheekdocumentatie <a href=\"https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.stats.expon.html\" target=\"_blank\" rel=\"noopener\">hier<\/a> vinden.<\/span><\/p>\n<h3> <strong>Hoe kansen te berekenen met behulp van een exponenti\u00eble verdeling<\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Stel dat het gemiddelde aantal minuten tussen uitbarstingen van een bepaalde geiser 40 minuten bedraagt. Hoe waarschijnlijk is het dat we minder dan 50 minuten zullen moeten wachten op een uitbarsting?<\/span><\/p>\n<p> <span style=\"color: #000000;\">Om dit probleem op te lossen, moeten we eerst de tariefparameter berekenen:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">\u03bb = 1\/\u03bc<\/span><\/li>\n<li> <span style=\"color: #000000;\">\u03bb = 1\/40<\/span><\/li>\n<li> <span style=\"color: #000000;\">\u03bb = 0,025<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">We kunnen \u03bb = 0,025 en x = 50 in de CDF-formule pluggen:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">P(X \u2264 x) = 1 \u2013 e <sup>-\u03bbx<\/sup><\/span><\/li>\n<li> <span style=\"color: #000000;\">P(X \u2264 50) = 1 \u2013 e <sup>-0,025(50)<\/sup><\/span><\/li>\n<li> <span style=\"color: #000000;\">P(X \u2264 50) = 0,7135<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">De kans dat we minder dan 50 minuten zullen moeten wachten op de volgende uitbarsting is <strong>0,7135<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">We kunnen de functie <strong>expon.cdf()<\/strong> van SciPy gebruiken om dit probleem in Python op te lossen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">from<\/span> scipy. <span style=\"color: #3366ff;\">stats<\/span> <span style=\"color: #008000;\">import<\/span> expo\n\n<span style=\"color: #008080;\">#calculate probability that x is less than 50 when mean rate is 40<\/span>\nexpon. <span style=\"color: #3366ff;\">cdf<\/span> (x=50, scale=40)\n\n0.7134952031398099\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De kans dat we minder dan 50 minuten zullen moeten wachten op de volgende uitbarsting is <strong>0,7135<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dit komt overeen met de waarde die we handmatig hebben berekend.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Hoe een exponenti\u00eble verdeling te plotten<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">U kunt de volgende syntaxis gebruiken om een exponenti\u00eble verdeling uit te zetten met een bepaalde tariefparameter:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">from<\/span> scipy. <span style=\"color: #3366ff;\">stats<\/span> <span style=\"color: #008000;\">import<\/span> expo\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#generate exponential distribution with sample size 10000<\/span>\nx = expon. <span style=\"color: #3366ff;\">rvs<\/span> (scale= <span style=\"color: #008000;\">40<\/span> ,size= <span style=\"color: #008000;\">10000<\/span> )\n\n<span style=\"color: #008080;\">#create plot of exponential distribution\n<\/span>plt. <span style=\"color: #3366ff;\">hist<\/span> (x, density= <span style=\"color: #008000;\">True<\/span> , edgecolor=' <span style=\"color: #ff0000;\">black<\/span> ')\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-26590 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/exponentielpython1.jpg\" alt=\"\" width=\"514\" height=\"388\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">In de volgende tutorials wordt uitgelegd hoe u andere veelgebruikte distributies in Python kunt gebruiken:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/visverspreidingspython\/\" target=\"_blank\" rel=\"noopener\">Hoe de Poisson-distributie in Python te gebruiken<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/t-python-distributie\/\" target=\"_blank\" rel=\"noopener\">Hoe t-distributie in Python te gebruiken<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/python-uniforme-distributie\/\" target=\"_blank\" rel=\"noopener\">Hoe uniforme distributie in Python te gebruiken<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>De exponenti\u00eble verdeling is een waarschijnlijkheidsverdeling die wordt gebruikt om de tijd te modelleren die we moeten wachten totdat een bepaalde gebeurtenis plaatsvindt. Als een willekeurige variabele X een exponenti\u00eble verdeling volgt, kan de cumulatieve verdelingsfunctie van X worden geschreven: F (x; \u03bb) = 1 \u2013 e -\u03bbx Goud: \u03bb: de snelheidsparameter (berekend als \u03bb [&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-3119","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 exponenti\u00eble verdeling in Python te gebruiken - Statorials<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.\" \/>\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\/exponentiele-distributiepython\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe de exponenti\u00eble verdeling in Python te gebruiken - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-19T03:24:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/exponentielpython1.jpg\" \/>\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=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/\",\"url\":\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/\",\"name\":\"Hoe de exponenti\u00eble verdeling in Python te gebruiken - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-19T03:24:49+00:00\",\"dateModified\":\"2023-07-19T03:24:49+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe exponenti\u00eble distributie in python te gebruiken\"}]},{\"@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 exponenti\u00eble verdeling in Python te gebruiken - Statorials","description":"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.","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\/exponentiele-distributiepython\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe de exponenti\u00eble verdeling in Python te gebruiken - Statorials","og_description":"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/","og_site_name":"Statorials","article_published_time":"2023-07-19T03:24:49+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/exponentielpython1.jpg"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/","url":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/","name":"Hoe de exponenti\u00eble verdeling in Python te gebruiken - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-19T03:24:49+00:00","dateModified":"2023-07-19T03:24:49+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt uitgelegd hoe je de exponenti\u00eble distributie in Python kunt gebruiken, met verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/exponentiele-distributiepython\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe exponenti\u00eble distributie in python te gebruiken"}]},{"@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\/3119","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=3119"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/3119\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=3119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=3119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=3119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}