{"id":856,"date":"2023-07-28T12:51:26","date_gmt":"2023-07-28T12:51:26","guid":{"rendered":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/"},"modified":"2023-07-28T12:51:26","modified_gmt":"2023-07-28T12:51:26","slug":"teste-de-friedman-python","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/","title":{"rendered":"Como realizar o teste de friedman em python"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">O <a href=\"https:\/\/statorials.org\/pt\/teste-de-friedman\/\" target=\"_blank\" rel=\"noopener\">teste de Friedman<\/a> \u00e9 uma alternativa n\u00e3o param\u00e9trica<a href=\"https:\/\/statorials.org\/pt\/medicoes-repetidas-anova-python\/\" target=\"_blank\" rel=\"noopener\">\u00e0 ANOVA de medidas repetidas<\/a> . \u00c9 utilizado para determinar se existe ou n\u00e3o diferen\u00e7a estatisticamente significativa entre as m\u00e9dias de tr\u00eas ou mais grupos em que os mesmos sujeitos aparecem em cada grupo.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Este tutorial explica como realizar o teste de Friedman em Python.<\/span><\/p>\n<h3> <strong>Exemplo: o teste de Friedman em Python<\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Um pesquisador quer saber se os tempos de rea\u00e7\u00e3o dos pacientes s\u00e3o iguais com tr\u00eas medicamentos diferentes. Para testar isso, ele mediu o tempo de rea\u00e7\u00e3o (em segundos) de 10 pacientes diferentes a cada um dos tr\u00eas medicamentos.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Siga as etapas a seguir para realizar o teste de Friedman em Python para determinar se o tempo m\u00e9dio de rea\u00e7\u00e3o difere entre os medicamentos.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Passo 1: Insira os dados.<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Primeiramente, criaremos tr\u00eas tabelas contendo os tempos de resposta de cada paciente em cada um dos tr\u00eas medicamentos:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>group1 = [4, 6, 3, 4, 3, 2, 2, 7, 6, 5]\ngroup2 = [5, 6, 8, 7, 7, 8, 4, 6, 4, 5]\ngroup3 = [2, 4, 4, 3, 2, 2, 1, 4, 3, 2]<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>Etapa 2: execute o teste de Friedman.<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">A seguir, realizaremos o teste de Friedman usando a <a href=\"https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.stats.friedmanchisquare.html\" target=\"_blank\" rel=\"noopener\">fun\u00e7\u00e3o friedmanchisquare()<\/a> da biblioteca scipy.stats:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">from<\/span> scipy <span style=\"color: #107d3f;\">import<\/span> stats\n\n<span style=\"color: #008080;\">#perform Friedman Test\n<\/span>stats. <span style=\"color: #3366ff;\">friedmanchisquare<\/span> (group1, group2, group3)\n\n(statistic=13.3514, pvalue=0.00126)<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>Etapa 3: interprete os resultados.<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">O teste de Friedman utiliza as seguintes hip\u00f3teses nulas e alternativas:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>A hip\u00f3tese nula (H <sub>0<\/sub> ):<\/strong> A m\u00e9dia de cada popula\u00e7\u00e3o \u00e9 igual.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>A hip\u00f3tese alternativa: (Ha):<\/strong> Pelo menos uma m\u00e9dia populacional \u00e9 diferente das demais.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Neste exemplo, a estat\u00edstica de teste \u00e9 <strong>13,3514<\/strong> e o valor p correspondente \u00e9 p = <strong>0,00126<\/strong> . Como esse valor de p \u00e9 inferior a 0,05, podemos rejeitar a hip\u00f3tese nula de que o tempo m\u00e9dio de resposta \u00e9 o mesmo para os tr\u00eas medicamentos.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Ou seja, temos evid\u00eancias suficientes para concluir que o tipo de medicamento utilizado causa diferen\u00e7as estatisticamente significativas no tempo de resposta.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>O teste de Friedman \u00e9 uma alternativa n\u00e3o param\u00e9trica\u00e0 ANOVA de medidas repetidas . \u00c9 utilizado para determinar se existe ou n\u00e3o diferen\u00e7a estatisticamente significativa entre as m\u00e9dias de tr\u00eas ou mais grupos em que os mesmos sujeitos aparecem em cada grupo. Este tutorial explica como realizar o teste de Friedman em Python. Exemplo: o [&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-856","post","type-post","status-publish","format-standard","hentry","category-guia"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Como realizar o teste de Friedman em Python - Estatoriais<\/title>\n<meta name=\"description\" content=\"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.\" \/>\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\/pt\/teste-de-friedman-python\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Como realizar o teste de Friedman em Python - Estatoriais\" \/>\n<meta property=\"og:description\" content=\"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-28T12:51:26+00:00\" \/>\n<meta name=\"author\" content=\"Dr. benjamim anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. benjamim anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/\",\"url\":\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/\",\"name\":\"Como realizar o teste de Friedman em Python - Estatoriais\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-28T12:51:26+00:00\",\"dateModified\":\"2023-07-28T12:51:26+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como realizar o teste de friedman em python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/pt\/#website\",\"url\":\"https:\/\/statorials.org\/pt\/\",\"name\":\"Statorials\",\"description\":\"O seu guia para a literacia estat\u00edstica!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/pt\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\",\"name\":\"Dr. benjamim anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. benjamim anderson\"},\"description\":\"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais\",\"sameAs\":[\"https:\/\/statorials.org\/pt\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Como realizar o teste de Friedman em Python - Estatoriais","description":"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.","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\/pt\/teste-de-friedman-python\/","og_locale":"pt_PT","og_type":"article","og_title":"Como realizar o teste de Friedman em Python - Estatoriais","og_description":"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.","og_url":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/","og_site_name":"Statorials","article_published_time":"2023-07-28T12:51:26+00:00","author":"Dr. benjamim anderson","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Dr. benjamim anderson","Tempo estimado de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/","url":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/","name":"Como realizar o teste de Friedman em Python - Estatoriais","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-28T12:51:26+00:00","dateModified":"2023-07-28T12:51:26+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Uma explica\u00e7\u00e3o simples sobre como realizar e interpretar o teste de Friedman em Python.","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/teste-de-friedman-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/teste-de-friedman-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Como realizar o teste de friedman em python"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/pt\/#website","url":"https:\/\/statorials.org\/pt\/","name":"Statorials","description":"O seu guia para a literacia estat\u00edstica!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/pt\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-PT"},{"@type":"Person","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666","name":"Dr. benjamim anderson","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr. benjamim anderson"},"description":"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais","sameAs":["https:\/\/statorials.org\/pt"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/comments?post=856"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/856\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}