{"id":11664,"date":"2019-12-25T18:41:47","date_gmt":"2019-12-25T16:41:47","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?post_type=dt_lessons&#038;p=11664"},"modified":"2019-12-25T18:41:47","modified_gmt":"2019-12-25T16:41:47","slug":"independent-t-test-formula","status":"publish","type":"dt_lessons","link":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/","title":{"rendered":"Independent T-Test Formula"},"content":{"rendered":"<div id=\"rdoc\">\n<p>This article describes the <strong>independent t-test formula<\/strong>, which is used to compare the means of two independent groups. The independent t-test formula is also referred as:<\/p>\n<ul>\n<li><em>unpaired t-test formula<\/em>,<\/li>\n<li><em>independent samples t-test formula<\/em>,<\/li>\n<li><em>two sample t-test formula<\/em>,<\/li>\n<li><em>2 sample t-test formula<\/em> and<\/li>\n<li><em>two sample t-test equation<\/em><\/li>\n<\/ul>\n<p>The independent samples t-test comes in two different forms:<\/p>\n<ul>\n<li>the standard <em>Student\u2019s t-test<\/em>, which assumes that the variance of the two groups are equal.<\/li>\n<li>the <em>Welch\u2019s t-test<\/em>, which is less restrictive compared to the original Student\u2019s test. This is the test where you do not assume that the variance is the same in the two groups, which results in the fractional degrees of freedom.<\/li>\n<\/ul>\n<p>In this article, you will learn the <em>Student t-test formula<\/em> and the <em>Weltch t-test formula<\/em>.<\/p>\n<p>Contents:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#formula\">Formula<\/a><\/li>\n<li><a href=\"#related-article\">Related article<\/a><\/li>\n<\/ul>\n<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div class='dt-sc-ico-content type1'><div class='custom-icon' ><a href='https:\/\/www.datanovia.com\/en\/product\/practical-statistics-in-r-for-comparing-groups-numerical-variables\/' target='_blank'><span class='fa fa-book'><\/span><\/a><\/div><h4><a href='https:\/\/www.datanovia.com\/en\/product\/practical-statistics-in-r-for-comparing-groups-numerical-variables\/' target='_blank'> Related Book <\/a><\/h4>Practical Statistics in R II - Comparing Groups: Numerical Variables<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div id=\"formula\" class=\"section level2\">\n<h2>Formula<\/h2>\n<ol style=\"list-style-type: decimal;\">\n<li><strong>Classical two independent samples t-test<\/strong> (Student t-test). If the variance of the two groups are equivalent (<strong>homoscedasticity<\/strong>), the t-test value, comparing the two samples (<span class=\"math inline\">\\(A\\)<\/span> and <span class=\"math inline\">\\(B\\)<\/span>), can be calculated as follow.<\/li>\n<\/ol>\n<p><span class=\"math display\">\\[<br \/>\nt = \\frac{m_A - m_B}{\\sqrt{ \\frac{S^2}{n_A} + \\frac{S^2}{n_B} }}<br \/>\n\\]<\/span><\/p>\n<p>where,<\/p>\n<ul>\n<li><span class=\"math inline\">\\(m_A\\)<\/span> and <span class=\"math inline\">\\(m_B\\)<\/span> represent the mean value of the group A and B, respectively.<\/li>\n<li><span class=\"math inline\">\\(n_A\\)<\/span> and <span class=\"math inline\">\\(n_B\\)<\/span> represent the sizes of the group A and B, respectively.<\/li>\n<li><span class=\"math inline\">\\(S^2\\)<\/span> is an estimator of the pooled variance of the two groups. It can be calculated as follow :<\/li>\n<\/ul>\n<p><span class=\"math display\">\\[<br \/>\nS^2 = \\frac{\\sum{(x-m_A)^2}+\\sum{(x-m_B)^2}}{n_A+n_B-2}<br \/>\n\\]<\/span><\/p>\n<p>with degrees of freedom (df): <span class=\"math inline\">\\(df = n_A + n_B - 2\\)<\/span>.<\/p>\n<ol style=\"list-style-type: decimal;\" start=\"2\">\n<li><strong>Welch t-statistic<\/strong>. If the variances of the two groups being compared are different (<strong>heteroscedasticity<\/strong>), it\u2019s possible to use the Welch t-test, which is an adaptation of the Student t-test. The Welch t-statistic is calculated as follow :<\/li>\n<\/ol>\n<p><span class=\"math display\">\\[<br \/>\nt = \\frac{m_A - m_B}{\\sqrt{ \\frac{S_A^2}{n_A} + \\frac{S_B^2}{n_B} }}<br \/>\n\\]<\/span><\/p>\n<p>where, <span class=\"math inline\">\\(S_A\\)<\/span> and <span class=\"math inline\">\\(S_B\\)<\/span> are the standard deviation of the the two groups A and B, respectively.<\/p>\n<p>Unlike the classic Student\u2019s t-test, the Welch t-test formula involves the variance of each of the two groups (<span class=\"math inline\">\\(S_A^2\\)<\/span> and <span class=\"math inline\">\\(S_B^2\\)<\/span>) being compared. In other words, it does not use the pooled variance <span class=\"math inline\">\\(S\\)<\/span>.<\/p>\n<p>The <strong>degrees of freedom<\/strong> of <strong>Welch t-test<\/strong> is estimated as follow :<\/p>\n<p><span class=\"math display\">\\[<br \/>\ndf = (\\frac{S_A^2}{n_A}+ \\frac{S_B^2}{n_B})^2 \/ (\\frac{S_A^4}{n_A^2(n_A-1)} + \\frac{S_B^4}{n_B^2(n_B-1)} )<br \/>\n\\]<\/span><\/p>\n<div class=\"success\">\n<p>A p-value can be computed for the corresponding absolute value of t-statistic (|t|).<\/p>\n<p>If the p-value is inferior or equal to the significance level 0.05, we can reject the null hypothesis and accept the alternative hypothesis. In other words, we can conclude that the mean values of group A and B are significantly different.<\/p>\n<\/div>\n<div class=\"warning\">\n<p>Note that, the Welch t-test is considered as the safer one. Usually, the results of the <strong>classical student\u2019s t-test<\/strong> and the <strong>Welch t-test<\/strong> are very similar unless both the group sizes and the standard deviations are very different.<\/p>\n<\/div>\n<\/div>\n<div id=\"related-article\" class=\"section level2\">\n<h2>Related article<\/h2>\n<p><a href=\"\/?p=10861\">T-test in R<\/a><\/p>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.<\/p>\n","protected":false},"author":1,"featured_media":9106,"parent":11662,"menu_order":76,"comment_status":"open","ping_status":"closed","template":"","class_list":["post-11664","dt_lessons","type-dt_lessons","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia<\/title>\n<meta name=\"description\" content=\"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia\" \/>\n<meta property=\"og:description\" content=\"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\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=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/\",\"name\":\"Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg\",\"datePublished\":\"2019-12-25T16:41:47+00:00\",\"description\":\"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lessons\",\"item\":\"https:\/\/www.datanovia.com\/en\/lessons\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"T-Test Formula\",\"item\":\"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Independent T-Test Formula\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"name\":\"Datanovia\",\"description\":\"Data Mining and Statistics for Decision Support\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia","description":"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.","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:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/","og_locale":"en_US","og_type":"article","og_title":"Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia","og_description":"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.","og_url":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/","og_site_name":"Datanovia","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/","url":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/","name":"Independent T-Test Formula : Excellent Tutorial You Will Love - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg","datePublished":"2019-12-25T16:41:47+00:00","description":"Describes the independent t-test formula, which is used to compare the means of two independent groups. You will learn the Student t-test formula and the Weltch t-test formula.","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2019\/05\/X26111983_559948284345120_8536988914848438622_n.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/independent-t-test-formula\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/"},{"@type":"ListItem","position":2,"name":"Lessons","item":"https:\/\/www.datanovia.com\/en\/lessons\/"},{"@type":"ListItem","position":3,"name":"T-Test Formula","item":"https:\/\/www.datanovia.com\/en\/lessons\/t-test-formula\/"},{"@type":"ListItem","position":4,"name":"Independent T-Test Formula"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/#website","url":"https:\/\/www.datanovia.com\/en\/","name":"Datanovia","description":"Data Mining and Statistics for Decision Support","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/"}}]}},"multi-rating":{"mr_rating_results":[]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/types\/dt_lessons"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/comments?post=11664"}],"version-history":[{"count":0,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11664\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/dt_lessons\/11662"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media\/9106"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media?parent=11664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}