*TWO SAMPLE MEAN

TWO SAMPLE MEAN

The relationship between two variables may be:

Types of Data

Independent data

Paired Data

2 groups

1 Variable

1 group

2 variables

n1=n2

Independent

Paired

We test normality with the Shapiro-Wilk test. The null-hypothesis is that the sample comes from a Normal distribution. If the p-value is greater than the confidence level (alpha), we don't reject the hypothesis

If Normal:

We can apply the Independent samples t-test, as we have checked Normality and independence. This will provide us with information about the relationship between the means

If not Normal

We compute the Wilcoxon test for independent samples

We can now check the equality of the variances by means of t-tests for equal variances

First, we need to asses normality. Here, we have to check the normality of the difference of the two variables. For this we need to check the difference of the variables. To do this, we compute a new variable "dif" and compute the Shapiro-Wilk test

If Normal

We can Apply the Paired T-test

If not Normal

Wilcoxon test for paired samples