# Alec's ordered data test

## Notes

Consider some data [ilmath]\big(x_i\big)_{i\eq 1}^n[/ilmath] which are of the *ordered type* in Alec's taxonomy of measures, meaning we have the [ilmath]<[/ilmath] and [ilmath]>[/ilmath] operators forming a total ordering, and surely [ilmath]\eq[/ilmath] and [ilmath]\neq[/ilmath] to (from the *present type*)

We may speak of the median with this type of measuring unit

Consider the following null hypothesis:

- [ilmath]\text{H}_0: [/ilmath] [ilmath]\text{median}\eq m[/ilmath]

and the following three alternate hypotheses (we shall design the test, but I'm not sure which will work due to "can't read my own handwriting" issues)

- [ilmath]\text{H}_1: [/ilmath] [ilmath]\text{median}< m[/ilmath]
- [ilmath]\text{H}_2: [/ilmath] [ilmath]\text{median}> m[/ilmath]
- [ilmath]\text{H}_3: [/ilmath] [ilmath]\text{median}\neq m[/ilmath]

### Principle of test

Our goal is to produce a useful method for hypothesis testing by looking at how many are above and below the median. We set this out generally:

## Notes for notes

For an *ordered* data type which is not *additive* we cannot take any meaning from the difference between values, only [ilmath]>[/ilmath] or [ilmath]<[/ilmath].

The concept is to remove the median value (of the sample, which works if n is odd) and then for any remaining item we'd expect a 50/50 chance it's above or below our median. [ilmath]\sim\text{Bin}(n-1,\frac{1}{2})[/ilmath]