5Two‐Sample and One‐Sample Tests

One‐ and two‐sample tests were the early cornerstones in statistical data analysis. Nowadays, however, our experimental designs tend to be more complex than what these simple tests can handle. Nonetheless, these tests, the famous Student's t‐test in particular, provide excellent entry points into statistical modelling, since the underlying principle can be understood quite easily and they get you into the swing of understanding hypothesis testing and the interpretation of test statistics such as t‐, z‐, F‐, chi squared‐values, etc.

5.1 The t‐Statistic

The t‐statistic boils down to a simple signal‐to‐noise ratio where the difference between two group means (the signal or effect) is normalized (divided) by the pooled standard deviation of the two groups (the noise, Figure 5.3).

(5.1) StartLayout 1st Row 1st Column t 2nd Column equals StartFraction Signal Over Noise EndFraction equals StartFraction Difference between means Over Pooled standard deviation EndFraction equals StartFraction x overbar Subscript 1 Baseline minus x overbar Subscript 2 Baseline Over StartRoot StartFraction s 1 squared Over n 1 EndFraction plus StartFraction s 2 squared Over n 2 EndFraction EndRoot EndFraction EndLayout

This test‐statistic follows a symmetric, bell‐shaped distribution similar to the normal distribution but with longer tails that is called Student's t‐distribution. The number of degrees of freedom (n 1 plus n 2 minus 2) is the shape defining parameter of the t‐distribution (Figure 5.1).

5.2 Two Sample Tests: Comparing Two Groups

5.2.1 Student's t‐Test

Student's t‐test is applied in situations ...

Get R-ticulate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.