{"id":1483,"date":"2023-07-26T05:15:37","date_gmt":"2023-07-26T05:15:37","guid":{"rendered":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/"},"modified":"2023-07-26T05:15:37","modified_gmt":"2023-07-26T05:15:37","slug":"teste-de-bartlett-em-r","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/","title":{"rendered":"Como realizar o teste de bartlett em r (passo a passo)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/pt\/teste-de-bartlett\/\" target=\"_blank\" rel=\"noopener\">O teste de Bartlett<\/a> \u00e9<\/span> <span style=\"color: #000000;\">um teste estat\u00edstico para determinar se as vari\u00e2ncias entre v\u00e1rios grupos s\u00e3o iguais ou n\u00e3o.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Muitos testes estat\u00edsticos (como uma <a href=\"https:\/\/statorials.org\/pt\/uma-maneira-anova\/\" target=\"_blank\" rel=\"noopener\">ANOVA unidirecional<\/a> ) assumem que as vari\u00e2ncias s\u00e3o iguais entre as amostras. O teste de Bartlett pode ser usado para verificar esta hip\u00f3tese.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Este teste usa as seguintes <a href=\"https:\/\/statorials.org\/pt\/teste-de-hipotese-1\/\" target=\"_blank\" rel=\"noopener\">hip\u00f3teses<\/a> nulas e alternativas:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>H <sub>0<\/sub> :<\/strong> A vari\u00e2ncia entre cada grupo \u00e9 igual.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong><sub>HA<\/sub> :<\/strong> Pelo menos um grupo tem uma vari\u00e2ncia que n\u00e3o \u00e9 igual aos outros.<\/span><\/p>\n<p> <span style=\"color: #000000;\">A estat\u00edstica de teste segue uma distribui\u00e7\u00e3o qui-quadrado com <em>k-1<\/em> graus de liberdade, onde <em>k<\/em> \u00e9 o n\u00famero de grupos.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Se o <a href=\"https:\/\/statorials.org\/pt\/p-valores-significancia-estatistica\/\" target=\"_blank\" rel=\"noopener\">valor p<\/a> correspondente da estat\u00edstica de teste estiver abaixo de um certo n\u00edvel de signific\u00e2ncia (como \u03b1 = 0,05), ent\u00e3o podemos rejeitar a hip\u00f3tese nula e concluir que nem todos os grupos t\u00eam a mesma vari\u00e2ncia.<\/span><\/p>\n<p> <span style=\"color: #000000;\">O exemplo passo a passo a seguir mostra como realizar o teste de Bartlett em R.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Etapa 1: crie os dados<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Para determinar se tr\u00eas t\u00e9cnicas de estudo diferentes levam a resultados de exames diferentes, um professor designa aleatoriamente 10 alunos para usar cada t\u00e9cnica (T\u00e9cnica A, B ou C) durante uma semana e, em seguida, aplica um teste a cada aluno. dificuldade igual.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Os resultados dos exames dos 30 alunos s\u00e3o apresentados abaixo:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create data frame<\/span>\ndf &lt;-data. <span style=\"color: #3366ff;\">frame<\/span> (group = <span style=\"color: #3366ff;\">rep<\/span> (c(' <span style=\"color: #008000;\">A<\/span> ', ' <span style=\"color: #008000;\">B<\/span> ', ' <span style=\"color: #008000;\">C<\/span> '), <span style=\"color: #3366ff;\">each<\/span> =10),\n                score = c(85, 86, 88, 75, 78, 94, 98, 79, 71, 80,\n                          91, 92, 93, 85, 87, 84, 82, 88, 95, 96,\n                          79, 78, 88, 94, 92, 85, 83, 85, 82, 81))\n\n<span style=\"color: #008080;\">#view data frame\n<\/span>df\n\n   group score\n1 to 85\n2 To 86\n3 to 88\n4 to 75\n5 to 78\n6 to 94\n7 to 98\n8 to 79\n9 to 71\n10 to 80\n11 B 91\n12 B 92\n13 B 93\n14 B 85\n15 B 87\n16 B 84\n17 B 82\n18 B 88\n19 B 95\n20 B 96\n21 C 79\n22 C 78\n23 C 88\n24 C 94\n25 C 92\n26 C 85\n27 C 83\n28 C 85\n29 C 82\n30 C 81<\/strong><\/pre>\n<h3> <span style=\"color: #000000;\"><strong>Passo 2: Realize o teste de Bartlett<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Para realizar o teste de Bartlett, voc\u00ea pode usar a fun\u00e7\u00e3o <strong>bartlett.test<\/strong> na base R, que usa a seguinte sintaxe:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>bartlett.test(f\u00f3rmula,dados)<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Veja como usar esta fun\u00e7\u00e3o em nosso exemplo:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#perform Bartlett's test\n<\/span>bartlett. <span style=\"color: #3366ff;\">test<\/span> (score ~ group, data = df)\n\n\tBartlett test of homogeneity of variances\n\ndata: score by group\nBartlett's K-squared = 3.3024, df = 2, p-value = 0.1918<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">O teste retorna os seguintes resultados:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Estat\u00edstica de teste <em>B<\/em> : <strong>3,3024<\/strong><\/span><\/li>\n<li> <span style=\"color: #000000;\">Valor P: <strong>0,1918<\/strong><\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Como o valor p n\u00e3o \u00e9 inferior a 0,05, o professor n\u00e3o rejeitar\u00e1 a hip\u00f3tese nula.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Por outras palavras, ela n\u00e3o tem provas suficientes para dizer que os tr\u00eas grupos t\u00eam lacunas diferentes.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Assim, ela pode proceder \u00e0 realiza\u00e7\u00e3o da ANOVA unidirecional.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Recursos adicionais<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/pt\/calculadora-de-teste-de-bartlett\/\" target=\"_blank\" rel=\"noopener\">Calculadora de teste de Bartlett<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/hipoteses-de-danova\/\" target=\"_blank\" rel=\"noopener\">Como verificar as suposi\u00e7\u00f5es da ANOVA<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/unidirecional-anova-r\/\" target=\"_blank\" rel=\"noopener\">Como realizar ANOVA unidirecional em R<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>O teste de Bartlett \u00e9 um teste estat\u00edstico para determinar se as vari\u00e2ncias entre v\u00e1rios grupos s\u00e3o iguais ou n\u00e3o. Muitos testes estat\u00edsticos (como uma ANOVA unidirecional ) assumem que as vari\u00e2ncias s\u00e3o iguais entre as amostras. O teste de Bartlett pode ser usado para verificar esta hip\u00f3tese. Este teste usa as seguintes hip\u00f3teses nulas [&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-1483","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 Bartlett em R (passo a passo) - Statorials<\/title>\n<meta name=\"description\" content=\"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.\" \/>\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-bartlett-em-r\/\" \/>\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 Bartlett em R (passo a passo) - Statorials\" \/>\n<meta property=\"og:description\" content=\"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-26T05:15:37+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-bartlett-em-r\/\",\"url\":\"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/\",\"name\":\"Como realizar o teste de Bartlett em R (passo a passo) - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-26T05:15:37+00:00\",\"dateModified\":\"2023-07-26T05:15:37+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como realizar o teste de bartlett em r (passo a passo)\"}]},{\"@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 Bartlett em R (passo a passo) - Statorials","description":"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.","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-bartlett-em-r\/","og_locale":"pt_PT","og_type":"article","og_title":"Como realizar o teste de Bartlett em R (passo a passo) - Statorials","og_description":"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.","og_url":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/","og_site_name":"Statorials","article_published_time":"2023-07-26T05:15:37+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-bartlett-em-r\/","url":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/","name":"Como realizar o teste de Bartlett em R (passo a passo) - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-26T05:15:37+00:00","dateModified":"2023-07-26T05:15:37+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Este tutorial explica como realizar o teste de Bartlett para homogeneidade de vari\u00e2ncias em R, incluindo um exemplo passo a passo.","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/teste-de-bartlett-em-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Como realizar o teste de bartlett em r (passo a passo)"}]},{"@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\/1483","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=1483"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/1483\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=1483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=1483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=1483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}