Analysis of variance (ANOVA) can take care of this. The total sum of squares is partitioned into a between group sum of squares and a within group sum of squares . Their degrees of freedom are 1 and n-2 respectively where n is the total sample size (for both groups). Comparison of the groups may be done by the between group F and within group or error effect is measured by the corresponding F statistic.
Which statistical test should be used within same group and within two group in clinical study?
Comparison of units of an ensemble
You will use tests for related samples, if You excute 2 experiments with the same objects. This is the TOTE scheme of programming: test - operation - test exit. Example: unit without exposition - same unit after exposition. The time course is in succession.
And You will use tests for unrelated samples, if You choose two samples of the universe. This is a parallel loop with one switch on and one switch off. Example: unit with exposition and unit witout exposition. The time course is concurrent.
Decision making
Is there at two course or a two way problem? This is Your question
Do more than two state of things exist? This leads to variance analysis. Is there any difference?
Frequencies and independent samples Fisher-Yates-Test, four-fold-table, KSO-Test for actuarial survival curve
Frequencies and dependent samples McNemar-Test, Lehmacher Test, Bowker-Test
Ranks or transformed indicated values and independent samples Median test, Buck's U-Test, comparison of time course of curves
Ranks or transformed indicated values and dependent samples Algebraic sign test, Wilcoxon's algebraic sign test, comparison of time course of curves
Cardinal numerals and independent samples Fisher-PItman-Test, Kolmogoroff-Smirnov-(KSO)-test
Cardinal numerals and dependent samples Fisher's randomizing test
Thank You so much for Your hints about the clinical usual choice of preferred tests. This lightens practice.
"The assumptions underlying a t-test are that
X follows a normal distribution with mean μ and variance σ2
ps2 follows a χ2 distribution with p degrees of freedom under the null hypothesis, where p is a positive constant
Z and s are independent."
Certainly the categorial nature of original data decides about the choice of appropriate tests. The 3 x 2- matrix above gives a comprehensible scheme for selecting tests with few assumptions. Perhaps this enlightens the knowledge seeker.