# Median Test

## Small sample (n1 <= 10, n2 <= 10)

## Steps

_for example of data set:_

Data below shows one week growth(in cm) of maize plant from two different localities (Sample I & Sample II):

| Sample I  | 10 | 11 | 8  | 8 | 14 | - | -  |
| --------- | -- | -- | -- | - | -- | - | -- |
| Sample II | 9  | 12 | 13 | 9 | 15 | 9 | 17 |

Test whether the two samples have come from the same population with respect to their medians. Use median test at 0.05 level of significance.

* Goto variable view and add the variables
* Goto the data view and add the data
*   Click on **Analyze** tab > **NonParametric Tests** > **Legacy Dialogs** > **k Independent Samples**.

    ![Step](https://1701689154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlhGYIl7VJdlGnlsVvVWa%2Fuploads%2Fgit-blob-aa229c5b172dd413b74a227380443ca293b3c1f2%2Fstep.png?alt=media)
*   Add the required variable in **Test Variable List** and click **Options**.

    ![Dialog](https://1701689154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlhGYIl7VJdlGnlsVvVWa%2Fuploads%2Fgit-blob-0a6b66925fd84c9166d0b3815c58ca8eba3ff46a%2Fdialog.png?alt=media)
*   Click **Descriptives** and **Quartiles** and click **Continue**.

    ![Dialog](https://1701689154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlhGYIl7VJdlGnlsVvVWa%2Fuploads%2Fgit-blob-88c21aa3bcf3d982a85fcd3973010cbd4e42c2fc%2Fdialog2.png?alt=media)
*   Required Output:

    ![Output](https://1701689154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlhGYIl7VJdlGnlsVvVWa%2Fuploads%2Fgit-blob-b7e6e993bb852c3427ab4a1f8bd4cec60d538d82%2Foutput.png?alt=media)

    ![Output](https://1701689154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlhGYIl7VJdlGnlsVvVWa%2Fuploads%2Fgit-blob-f2c4944df2b58fbb706602528348c7397ae7cee3%2Foutput2.png?alt=media)
