{"id":3472,"date":"2026-03-01T20:31:03","date_gmt":"2026-03-01T19:31:03","guid":{"rendered":"https:\/\/www.gironi.it\/blog\/?p=3472"},"modified":"2026-07-12T20:16:14","modified_gmt":"2026-07-12T19:16:14","slug":"the-two-sample-t-test-how-to-test-a-hypothesis-for-dependent-or-independent-samples","status":"publish","type":"post","link":"https:\/\/www.gironi.it\/blog\/en\/the-two-sample-t-test-how-to-test-a-hypothesis-for-dependent-or-independent-samples\/","title":{"rendered":"The Two-Sample t-Test: How to Compare Two Groups (and Get It Right)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the <a href=\"\/blog\/en\/hypothesis-testing\/\">article on hypothesis testing<\/a> we saw how to check whether a sample mean is compatible with a hypothesis about the population. But in practice the most common case is comparing <em>two<\/em> groups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Does a new drug lower blood pressure more than a placebo? Does a training course improve test scores? Does a new landing page produce a higher CTR? In each case we have two groups (treatment vs control, before vs after, variant A vs B) and we want to know whether their means differ. The right tool is the <strong>two-sample t-test<\/strong>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">To get our bearings right away:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Scenario<\/th><th>Test<\/th><\/tr><\/thead><tbody><tr><td>Two different groups (e.g. men vs women)<\/td><td>Independent-samples t-test<\/td><\/tr><tr><td>Before and after on the same subject<\/td><td>Paired t-test<\/td><\/tr><tr><td>Two page variants (A\/B test)<\/td><td>Independent-samples t-test<\/td><\/tr><tr><td>Blood pressure before and after therapy<\/td><td>Paired t-test<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The choice between these two tests is not technical: it is <strong>conceptual<\/strong>. If the data are paired and we use an independent test, we lose power because we throw away the pairing information. If we use a paired test on independent data, we violate the independence assumption and risk finding significance where there is none.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"independent-samples\">When to Use the Independent-Samples t-Test?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Assumptions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For the test to be valid, several conditions must be met:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A random sample from each population<\/li><li>Observations within each sample are independent<\/li><li>The two samples are independent of each other<\/li><li>The observations come from approximately normal populations, or the sample size is large enough<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The t-test is fairly robust to moderate deviations from normality, especially with large samples (n \u2265 30 per group). It becomes problematic with very small samples and strongly skewed distributions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hypotheses:<\/p>\n\n\n\n\\( H_0 : \\mu_1 = \\mu_2 \\\\ \\)\n\n\n\n\\( H_a : \\mu_1 \\neq \\mu_2 \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\">In other words: $\\( H_0 : \\mu_1 &#8211; \\mu_2 = 0 \\)\\( , \\)\\( H_a : \\mu_1 &#8211; \\mu_2 \\neq 0 \\)$<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Test Statistic<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It all starts with the difference between the observed means. We compute t as:<\/p>\n\n\n\n\\( t = \\frac{(\\bar{x}_1 &#8211; \\bar{x}_2) &#8211; (\\mu_1 &#8211; \\mu_2)}{SE_{(\\bar{x}_1 &#8211; \\bar{x}_2)}} \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\">Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>$\\( \\bar{x}_1 &#8211; \\bar{x}_2 \\)$ is the observed difference between sample means<\/li><li>$\\( \\mu_1 &#8211; \\mu_2 \\)$ is the hypothesised difference under H\u2080 (zero)<\/li><li>$\\( SE_{(\\bar{x}_1 &#8211; \\bar{x}_2)} \\)$ is the standard error of the difference<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The standard error is calculated as follows \u2014 and this is the first important point:<\/p>\n\n\n\n\\( SE_{(\\bar{x}_1 &#8211; \\bar{x}_2)} = \\sqrt{\\frac{s^2_1}{n_1} + \\frac{s^2_2}{n_2}} \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\"><strong>N.B.: this is the Welch formula<\/strong> \u2014 it does not assume equal variances between the two groups, and it is more robust when sample sizes or variabilities differ. By default, <code>t.test()<\/code> in R uses Welch&#8217;s t-test, not Student&#8217;s classic t-test. It is the safest choice in practice: unless there is a strong reason to assume equal variances, Welch is preferable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we know for certain the variances are similar (balanced samples with close variances), we can use <code>var.equal = TRUE<\/code>, which corresponds to the classic pooled-variance t-test. For a more systematic comparison of the two approaches, see the <a href=\"\/blog\/en\/guide-to-statistical-tests-for-a-b-analysis\/\">Guide to Statistical Tests<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Degrees of freedom? I will let R calculate them (it uses the Welch-Satterthwaite approximation, which is a bit cumbersome by hand). Alternatively, a conservative approach: df = min(n\u2081, n\u2082) \u2212 1.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Checking Assumptions in R<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before running the test, we check normality:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Shapiro-Wilk test for each group\nshapiro.test(varA)\nshapiro.test(varB)\n\n# Q-Q plot for visual inspection\npar(mfrow = c(1, 2))\nqqnorm(varA, main = \"Group A\")\nqqline(varA)\nqqnorm(varB, main = \"Group B\")\nqqline(varB)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the Shapiro-Wilk p-value is greater than 0.05, we have no evidence to reject the normality hypothesis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">A Worked Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a practical scenario. Suppose we have two landing page variants for an SEO campaign: version A (the current one, the control) and version B (with a new headline and CTA). We want to know whether the new version yields a higher average CTR. We record 10 days of traffic for each variant and measure the CTR percentage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>varA &lt;- c(2.8, 3.1, 3.5, 2.9, 3.3, 3.0, 2.7, 3.2, 3.4, 3.1)\nvarB &lt;- c(3.2, 3.8, 3.5, 4.1, 3.6, 3.9, 3.3, 3.7, 4.0, 3.4)\n\nt.test(varA, varB)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\tWelch Two Sample t-test\n\ndata:  varA and varB\nt = -3.092, df = 17.6, p-value = 0.006297\nalternative hypothesis: true difference in means is not equal to 0\n95 percent confidence interval:\n -0.831 -0.157\nsample estimates:\nmean of x mean of y\n     3.10      3.65<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-4147\" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/two-sample-test-regions.png\" alt=\"t-distribution with critical region for the two-sample test example\"\/><figcaption class=\"wp-element-caption\">t-distribution with critical region for the two-sample test example<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let us interpret the output. The mean difference is 0.55 percentage points (3.65 \u2212 3.10), with a p-value of 0.0063 \u2014 well below the 0.05 threshold. The 95% confidence interval goes from \u22120.83 to \u22120.16: it does not contain zero. <strong>We have sufficient statistical evidence to reject H\u2080 in favour of the alternative hypothesis: the mean CTR of variant B differs from that of variant A.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-group has-background\" style=\"background-color:#f5f7f9;margin-top:2.5rem;margin-bottom:2.5rem;padding-top:1.5rem;padding-right:1.5rem;padding-bottom:1.5rem;padding-left:1.5rem\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>A word of caution: the p-value tells us <em>whether<\/em> there is a difference. It does not tell us <em>how large<\/em> it is. With large samples, any difference \u2014 even trivial \u2014 becomes &#8220;significant.&#8221; This is why we need a measure of effect size.<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Effect Size: Cohen&#8217;s d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cohen&#8217;s d<\/strong> standardises the difference by dividing by the pooled standard deviation:<\/p>\n\n\n\n\\( d = \\frac{\\bar{x}_1 &#8211; \\bar{x}_2}{s_{pooled}} \\\\ \\)\n\n\n\n\\( s_{pooled} = \\sqrt{\\frac{(n_1 &#8211; 1)s^2_1 + (n_2 &#8211; 1)s^2_2}{n_1 + n_2 &#8211; 2}} \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\">Let us calculate in R:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>n1 &lt;- length(varA); n2 &lt;- length(varB)\npooled_sd &lt;- sqrt(((n1-1)*sd(varA)^2 + (n2-1)*sd(varB)^2) \/ (n1+n2-2))\nd &lt;- (mean(varB) - mean(varA)) \/ pooled_sd\nd<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>[1] 1.38<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Rule of thumb: d \u2248 0.2 is small, 0.5 medium, 0.8 large. Our d = 1.38 is a large effect \u2014 the difference is not only statistically significant but also substantial.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Statistical Power<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If we do not find a significant difference, is it because there is none, or because the sample was too small? <strong>Power<\/strong> (1 \u2212 \u03b2) is the probability of detecting an effect of a given size, if it exists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let us calculate in R the sample size needed to detect a large effect with 80% power:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>library(pwr)\npwr.t.test(d = 0.8, power = 0.80, sig.level = 0.05,\n           type = \"two.sample\", alternative = \"two.sided\")<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>     Two-sample t test power calculation\n\n              n = 25.52\n              d = 0.8\n      sig.level = 0.05\n          power = 0.8\n    alternative = two.sided<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We need about 26 observations per group to have an 80% chance of detecting a large effect. With our 10 observations per group, power is much lower \u2014 the fact that we still found significance is a sign that the effect is genuinely strong.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"paired-samples\">When to Use the Paired (Dependent) t-Test?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When the same subjects are measured before and after an intervention, we have <strong>paired data<\/strong>. The test does not compare the means of two groups, but rather <strong>the mean of the differences<\/strong> between before and after.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Assumptions<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>The sample of differences is random<\/li><li>The paired differences are independent of one another<\/li><li>The differences come from an approximately normal population (or n is large enough)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Hypotheses:<\/p>\n\n\n\n\\( H_0 : \\delta = 0 \\\\ \\)\n\n\n\n\\( H_a : \\delta \\neq 0 \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\">where \u03b4 is the mean difference in the population.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The formula is analogous to the one-sample test, applied to the differences:<\/p>\n\n\n\n\\( t = \\frac{\\bar{d} &#8211; \\delta}{SE_{\\bar{d}}} \\\\ \\)\n\n\n\n<p class=\"wp-block-paragraph\">where $\\( \\bar{d} \\)\\( is the mean of the sample differences and \\)\\( SE_{\\bar{d}} = \\frac{s_d}{\\sqrt{n}} \\)$ is the standard error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The standard deviation of the differences:<\/p>\n\n\n\n\\( s_d = \\sqrt{\\frac{\\Sigma(d &#8211; \\bar{d})^2}{n &#8211; 1}} \\\\ \\)\n\n\n\n<h3 class=\"wp-block-heading\">Checking Assumptions in R<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>diff &lt;- after - before\nshapiro.test(diff)\n\n# Visual inspection\nqqnorm(diff)\nqqline(diff)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">A Worked Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine this scenario: an SEO instructor wants to assess the effectiveness of an intensive course. She gives participants a 100-point test on the first day (pre) and the same test at the end of the course (post). The same students \u2014 not two different groups \u2014 are measured twice. Here are the scores:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pre  &lt;- c(68, 75, 82, 71, 79, 65, 73, 77, 70, 74)\npost &lt;- c(72, 78, 85, 76, 82, 70, 75, 80, 74, 79)\n\ndiff &lt;- post - pre\ndiff<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>[1] 4 3 3 5 3 5 2 3 4 5<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-4148\" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/two-sample-test-paired.png\" alt=\"Histogram of paired differences with normal curve overlay\"\/><figcaption class=\"wp-element-caption\">Histogram of paired differences with normal curve overlay<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let us check normality of the differences:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shapiro.test(diff)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\tShapiro-Wilk normality test\n\ndata:  diff\nW = 0.905, p-value = 0.248<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">p &gt; 0.05 \u2192 we do not reject the normality hypothesis. Let us proceed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>t.test(pre, post, paired = TRUE)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\tPaired t-test\n\ndata:  pre and post\nt = -7.746, df = 9, p-value = 2.86e-05\nalternative hypothesis: true mean difference is not equal to 0\n95 percent confidence interval:\n -4.171 -2.029\nsample estimates:\nmean difference\n         -3.1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The mean improvement is 3.1 points, with p &lt; 0.001. The 95% confidence interval goes from \u22124.17 to \u22122.03 points \u2014 it does not contain zero. We have statistical evidence of a significant improvement after the course.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Effect Size for Paired Data<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>d_paired &lt;- mean(diff) \/ sd(diff)\nd_paired<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>[1] 2.45<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group has-background\" style=\"background-color:#f5f7f9;margin-top:2.5rem;margin-bottom:2.5rem;padding-top:1.5rem;padding-right:1.5rem;padding-bottom:1.5rem;padding-left:1.5rem\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>Note: Cohen&#8217;s d for paired data tends to be much larger than for independent data, because between-subject variability is removed by the within-subject comparison. This is physiological, not a mistake.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"decision-flowchart\">Decision Flowchart<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"1040\" class=\"wp-image-4149\" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/t-test-choice-flowchart.png\" alt=\"Flowchart for choosing the right t-test\" srcset=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/t-test-choice-flowchart.png 1200w, https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/t-test-choice-flowchart-300x260.png 300w, https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2026\/07\/t-test-choice-flowchart-1024x887.png 1024w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption class=\"wp-element-caption\">Flowchart for choosing the right t-test<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A text version of the reasoning:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Same subjects measured twice?<\/strong> \u2192 Paired t-test<\/li><li><strong>Two independent groups?<\/strong> \u2192 Welch t-test (default)<\/li><li><strong>Non-normal data with small samples?<\/strong> \u2192 Non-parametric test (Mann-Whitney or Wilcoxon)<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"when-not-to-use\">When NOT to Use the t-Test<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The t-test is powerful, but not universal:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Strongly skewed distributions with small samples<\/strong> (n &lt; 15 per group): the t-test loses reliability. Use the Mann-Whitney test (wilcox.test in R) for independent samples, or the Wilcoxon signed-rank test for paired data.<\/li><li><strong>More than two groups<\/strong>: you need analysis of variance (ANOVA), which we will cover in a future article.<\/li><li><strong>Ordinal data<\/strong>: the t-test works on means, which assume at least interval-scale data. For rankings or Likert scales, non-parametric tests are better.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">FAQ<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What is the difference between paired and independent t-tests?<\/strong><br> In the paired t-test we compare the mean of the differences <em>within<\/em> each subject (before\/after). In the independent version we compare the means of two separate groups. The choice depends on the experimental design, not our preference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>When should I use Welch instead of the classic t-test?<\/strong><br> Always, by default. Welch does not assume equal variances and is more robust. Use <code>var.equal = TRUE<\/code> only if you have a solid reason to believe the variances are similar (balanced samples with close variances).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does the t-test work with small samples?<\/strong><br> Yes, provided the data are approximately normal. With n &lt; 15 per group, always check normality with <code>shapiro.test()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What if my data are not normal?<\/strong><br> Use <code>wilcox.test()<\/code> in R: for independent samples (Mann-Whitney) or with paired = TRUE for paired data (Wilcoxon signed-rank).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try It Yourself<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Take the independent-sample example data and calculate:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>A one-tailed test: does variant B have a <em>higher<\/em> CTR than A? (alternative = &#8220;greater&#8221;)<\/li><li>What sample size would be needed to detect a medium effect (d = 0.5) with 80% power?<\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">We have covered two fundamental tools for comparing groups: the <strong>independent-samples t-test<\/strong>, the workhorse of A\/B testing, and the <strong>paired t-test<\/strong>, indispensable for pre\/post designs. In both cases the p-value alone is not enough: effect size, power, and confidence intervals complete the picture. In the next article we will tackle the case of three or more groups \u2014 and that is where <strong>analysis of variance (ANOVA)<\/strong> comes in.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Further Reading<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For a detailed and systematic treatment of two-sample testing \u2014 pooled vs Welch, paired designs, and the assumptions that underpin them \u2014 <em>Statistica<\/em> by Newbold, Carlson and Thorne provides the full theoretical and practical framework needed to apply these tests correctly in real-world settings. <a href=\"https:\/\/www.amazon.it\/dp\/8891910651?tag=consulenzeinf-21&amp;ascsubtag=the-two-sample-t-test-how-to-test-a-hypothesis-for-dependent-or-independent-samples\" rel=\"nofollow sponsored noopener\" target=\"_blank\">Amazon<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the article on hypothesis testing we saw how to check whether a sample mean is compatible with a hypothesis about the population. But in practice the most common case is comparing two groups. Does a new drug lower blood pressure more than a placebo? Does a training course improve test scores? Does a new &hellip; <a href=\"https:\/\/www.gironi.it\/blog\/en\/the-two-sample-t-test-how-to-test-a-hypothesis-for-dependent-or-independent-samples\/\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;The Two-Sample t-Test: How to Compare Two Groups (and Get It Right)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[161],"tags":[],"class_list":["post-3472","post","type-post","status-publish","format-standard","hentry","category-statistics"],"lang":"en","translations":{"en":3472,"it":1411},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Paolo Gironi","author_link":"https:\/\/www.gironi.it\/blog\/author\/autore-articoli\/"},"uagb_comment_info":1,"uagb_excerpt":"In the article on hypothesis testing we saw how to check whether a sample mean is compatible with a hypothesis about the population. But in practice the most common case is comparing two groups. Does a new drug lower blood pressure more than a placebo? Does a training course improve test scores? Does a new&hellip;","_links":{"self":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/comments?post=3472"}],"version-history":[{"count":5,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3472\/revisions"}],"predecessor-version":[{"id":4196,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3472\/revisions\/4196"}],"wp:attachment":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/media?parent=3472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/categories?post=3472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/tags?post=3472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}