location test

{{One source|date=April 2025}}

A location test{{cite web |title=Location Test — sci_analysis 2.2.0 documentation |url=https://sci-analysis.readthedocs.io/en/latest/location_test.html |website=sci-analysis.readthedocs.io |access-date=14 April 2025}} is a statistical hypothesis test that compares the location parameter of a statistical population to a given constant, or that compares the location parameters of two statistical populations to each other. Most commonly, the location parameter (or parameters) of interest are expected values, but location tests based on medians or other measures of location are also used.

One-sample location test

The one-sample location test compares the location parameter of one sample to a given constant. An example of a one-sample location test would be a comparison of the location parameter for the blood pressure distribution of a population to a given reference value. In a one-sided test, it is stated before the analysis is carried out that it is only of interest if the location parameter is either larger than, or smaller than the given constant, whereas in a two-sided test, a difference in either direction is of interest.

Two-sample location test

The two-sample location test compares the location parameters of two samples to each other. A common situation is where the two populations correspond to research subjects who have been treated with two different treatments (one of them possibly being a control or placebo). In this case, the goal is to assess whether one of the treatments typically yields a better response than the other. In a one-sided test, it is stated before the analysis is carried out that it is only of interest if a particular treatment yields the better responses, whereas in a two-sided test, it is of interest whether either of the treatments is superior to the other.

The following tables provide guidance to the selection of the proper parametric or non-parametric statistical tests for a given data set.

Parametric and nonparametric location tests

The following table summarizes some common parametric and nonparametric tests for the location parameters of one or more samples.

class="wikitable"

|+Ordinal and numerical measures

rowspan="3" align="center"| 1 group

| rowspan="3" align="center"|

| align="center"| N ≥ 30

| align="center"|

| align="center"| One-sample t-test

rowspan="2" align="center"| N < 30

| align="center"| Normally distributed

| align="center"| One-sample t-test

align="center"| Not normal

| align="center"| Sign test

rowspan="6" align="center"| 2 groups

| rowspan="3" align="center"| Independent

| align="center"| N ≥ 30

| align="center"|

| align="center"| t-test

rowspan="2" align="center"| N < 30

| align="center"| Normally distributed

| align="center"| t-test

align="center"| Not normal

| align="center"| Mann–Whitney U or Wilcoxon rank-sum test

rowspan="3" align="center"| Paired

| align="center"| N ≥ 30

| align="center"|

| align="center"| paired t-test

rowspan="2" align="center"| N < 30

| align="center"| Normally distributed

| align="center"| paired t-test

align="center"| Not normal

| align="center"| Wilcoxon signed-rank test

rowspan="5" align="center"| 3 or more groups

| rowspan="3" align="center"| Independent

| rowspan="2" align="center"| Normally distributed

| align="center"| 1 factor

| align="center"| One way anova

align="center"| ≥ 2 factors

| align="center"| two or other anova

align="center"| Not normal

| align="center"|

| align="center"| Kruskal–Wallis one-way analysis of variance by ranks

rowspan="2" align="center"| Dependent

| align="center"| Normally distributed

| align="center"|

| align="center"| Repeated measures anova

align="center"| Not normal

| align="center"|

| align="center"| Friedman two-way analysis of variance by ranks

class="wikitable"

|+Nominal measures

rowspan="2" align="center"| 1 group

| rowspan="2" align="center"|

| align="center"| np and n(1-p) ≥ 5

| align="center"| Z-approximation

align="center"| np or n(1-p) < 5

| align="center"| binomial

rowspan="3" align="center"| 2 groups

| rowspan="2" align="center"| Independent

| align="center"| np < 5

| align="center"| fisher exact test or Barnard's test

align="center"| np ≥ 5

| align="center"| chi-squared test

align="center"| Paired

| align="center"|

| align="center"| McNemar or Kappa

rowspan="3" align="center"| 3 or more groups

| rowspan="2" align="center"| Independent

| align="center"| np < 5

| align="center"| collapse categories for chi-squared test

align="center"| np ≥ 5

| align="center"| chi-squared test

align="center"| Dependent

| align="center"|

| align="center"| Cochran's Q

References

{{reflist}}

{{statistics}}

{{DEFAULTSORT:Location Test}}

^