# Marginal Homogeneity test / Stuart-Maxwell test

This page offers all the basic information you need about the marginal homogeneity test / stuart-maxwell test . It is part of Statkat’s wiki module, containing similarly structured info pages for many different statistical methods. The info pages give information about null and alternative hypotheses, assumptions, test statistics and confidence intervals, how to find *p * values, SPSS how-to’s and more.

To compare the marginal homogeneity test / stuart-maxwell test with other statistical methods, go to Statkat's or practice with the marginal homogeneity test / stuart-maxwell test at Statkat's

##### Contents

- 1. When to use
- 2. Null hypothesis
- 3. Alternative hypothesis
- 4. Assumptions
- 5. Test statistic
- 6. Sampling distribution
- 7. Significant?
- 8. Example context
- 9. SPSS

##### When to use?

Deciding which statistical method to use to analyze your data can be a challenging task. Whether a statistical method is appropriate for your data is partly determined by the measurement level of your variables. The marginal homogeneity test / stuart-maxwell test requires the following variable types:

Independent variable: 2 paired groups | Dependent variable: One categorical with $J$ independent groups ($J \geqslant 2$) |

Note that theoretically, it is always possible to 'downgrade' the measurement level of a variable. For instance, a test that can be performed on a variable of ordinal measurement level can also be performed on a variable of interval measurement level, in which case the interval variable is downgraded to an ordinal variable. However, downgrading the measurement level of variables is generally a bad idea since it means you are throwing away important information in your data (an exception is the downgrade from ratio to interval level, which is generally irrelevant in data analysis).

If you are not sure which method you should use, you might like the assistance of our method selection tool or our method selection table.

##### Null hypothesis

The marginal homogeneity test / stuart-maxwell test tests the following null hypothesis (H_{0}):

_{0}: for each category $j$ of the dependent variable, $\pi_j$ for the first paired group = $\pi_j$ for the second paired group

Here $\pi_j$ is the population proportion in category $j$

##### Alternative hypothesis

The marginal homogeneity test / stuart-maxwell test tests the above null hypothesis against the following alternative hypothesis (H_{1} or H_{a}):

_{1}: for some categories of the dependent variable, $\pi_j$ for the first paired group $\neq$ $\pi_j$ for the second paired group

##### Assumptions

Statistical tests always make assumptions about the sampling procedure that's been used to obtain the sample data. So called parametric tests also make assumptions about how data are distributed in the population. Non-parametric tests are more 'robust' and make no or less strict assumptions about population distributions, but are generally less powerful. Violation of assumptions may render the outcome of statistical tests useless, although violation of some assumptions (e.g. independence assumptions) are generally more problematic than violation of other assumptions (e.g. normality assumptions in combination with large samples).

The marginal homogeneity test / stuart-maxwell test makes the following assumptions:

- Sample of pairs is a simple random sample from the population of pairs. That is, pairs are independent of one another

##### Test statistic

Computing the test statistic is a bit complicated and involves matrix algebra. Unless you are following a technical course, you probably won't need to calculate it by hand.##### Sampling distribution

Sampling distribution of the test statistic if H_{0}were true:

Approximately the chi-squared distribution with $J - 1$ degrees of freedom

##### Significant?

This is how you find out if your test result is significant:

If we denote the test statistic as $X^2$:- Check if $X^2$ observed in sample is equal to or larger than critical value $X^{2*}$ or
- Find $p$ value corresponding to observed $X^2$ and check if it is equal to or smaller than $\alpha$

##### Example context

The marginal homogeneity test / stuart-maxwell test could for instance be used to answer the question:

Subjects are asked to taste three different types of mayonnaise, and to indicate which of the three types of mayonnaise they like best. They then have to drink a glass of beer, and taste and rate the three types of mayonnaise again. Does drinking a beer change which type of mayonnaise people like best?##### SPSS

How to perform the marginal homogeneity test / stuart-maxwell test in SPSS:

Analyze > Nonparametric Tests > Legacy Dialogs > 2 Related Samples...- Put the two paired variables in the boxes below Variable 1 and Variable 2
- Under Test Type, select the Marginal Homogeneity test