**The test is used to compare sample average with paired data.**

## Introduction

Pairing allows the risk of misinterpretation to be ruled out in cases where data have common relationships that may affect the results of the tests. In this specific case, the **student test** allows:

- Compare the average of 2 samples
- Compare the variance of 2 samples (where for independent data we used the
**Fisher test**)

**Example : **

- One wants to test a ”
*before*“-”*after*” on meat consumption over a year of the same individual sample. Pairing is done by the individual whose characteristics can evolve between Test 1 and test 2. - We want to test whether a training plan has been effective. Pre-and post-training skills will be compared, with the pairing being performed by the individuals who have taken the training.

## The principle

The principle of the test is based on the creation of the data pairs. This is the difference between the values of this data pair that we will study in the case of a comparison of averages.

For the comparison of variances, we will perform the test from the correlation we have between the variances of the 2 samples.

## Step 1: Test hypothesis

### Comparison of 2 averages

The test of comparing averages consists of the Shape following assumptions:

**H _{ } :**

**μ**

_{1}**=**

**μ**

_{2}**H _{1} :**

**μ**

_{1}**≠ μ**

_{2}### Comparing 2 variances

The test of comparing variances consists of the following Shape assumptions:

**H _{ } :**

**σ**

_{1}**=**

**σ**

_{2}**H _{1} :**

**σ**

_{1}**≠ σ**

_{2}## Step 2: Transforming data

### Comparison of 2 averages

We Shape a new data that is:

**D _{I} = x_{i1} – x_{i2}**

### Comparing 2 variances

The ratio of the 2 variances of the samples, but modified from the **Pearson correlation **coefficient^{1}is used. To calculate it, two new variables are used:

**U _{I} = x_{i1} + x_{i2}**

**V _{I} = x_{i1} -x_{i2}**

Based on these data, the Pearson correlation coefficient is calculated which will later be* tested*.

## Step 3: Practical value

### Comparison of 2 averages

With:

**d**average of the set D_{cross}:_{I}of the data pairs**n:**number of individual pairs in total**σ**standard deviation of differences D_{D}:_{I}

### Comparing 2 variances

**r:**Pearson correlation coefficient**n:**number of individual pairs in total

## Step 4: Calculating the critical value

The approximation of the student’s law is used to calculate the critical value (Excel function T.INV) for:

A probability that will depend on the meaning of the test is:

- Bilateral: 1-α/2
- Left unilateral: α
- Right unilateral: 1-α

A number of degrees of freedom of N-1 (n being the number of data pairs).

## Step 5: Calculate the p-Value

The p-Value depends on the size of the samples and the direction of the test. We use the **p-Value** calculated from the student’s law. We find:

- For a bilateral test: Tdist (I practical value I; dof ; 2
- For a unilateral left or right test: TDist (I practical value I; dof ; 1

With:

- For a comparison of average: dof = n – 1
- For a comparison of variance: dof = n – 2
- n: number of data pairs

## Step 6: Interpretation

Test direction | Result | Statistical conclusion | Practical conclusion |
---|---|---|---|

Bilateral | Practical value > Critical value α/2 and Practical value < Critical value 1 - α/2 | We reject H0 | The 2 samples are different at the given level of risk α. |

Unilateral right | Practical value < Critical value α | We reject H0 | Sample 1 is statistically larger than sample 2 at the given level of risk α. |

Unilateral left | Practical value > Critical value α | We reject H0 | Sample 1 is statistically smaller than 2 at the given level of risk α. |

Result | Statistical conclusion | Practical conclusion |
---|---|---|

p-value > α | We retain H0 | Our 2 data series are identical or close with a risk of being wrong with p-value% |

p-Value < α | We reject H0 | Our 2 series of data are statistically different with a risk of being wrong with p-value% |

## Source

1-R. Rafiq (2013) – population comparison, parametric tests

E. G. Pitman (1939) – A Note on normal correlation

A. Myers, C. H. Hansen (2003) – Experimental psychology

M. Vaubourdolle (2007) – Toxicology, mathematical, Physical and chemical sciences