banner



How To Calculate Median For Grouped Data In Spss

In my basic-statistics class I wanted to delve deeper into the problem of the (grouped) median-computation and did some computations using SPSS. The protocol seems to indicate either a unlike ansatz which I did not still anticipate correctly or a an mistake in the implementation. After two days of fiddling with tests and recomputations it seems to me that it is an error.
To brand things simple, I generate a test data fix with $3$ categories of data: class "one-i.999..","2-2.999..","3-3.999..", where SPSS works expecting the class means, so I provide the information for SPSS with the form-mean-values computed as "1.5","two.v","3.5".
I call the procedure equally

frequencies testvar /statistics median /grouped testvar.

where I provide the data but as a column in a simple dataset.

The general frequencies tabular array is $$ \begin{array} {r|r} \text{value} & \text{freq} \\ \hline one.v & 4 \\ 2.5 & v \\ 3.5 & x \\ \end{array} $$ where I permit variate $x$ from $two$ to $10$ giving $N$ from $11$ to $19$. The median should lay in the second class/category for $Northward \lt eighteen$. This is the table of medians, depending on $N$: $$ \modest \brainstorm{array} {r|rrr| |r|rrr|r} \text{cat:}&1.5 & 2.5 & 3.5 & N && \text{gmedian (SPSS)}&& \text{expected}^{a)} \\ \hline \text{frq.:}&4 & v & ii & 11 & & 2.27777... &= 2+ {5 \over 18} & 2.3 \\ \text{frq.:}&iv & 5 & 3 & 12 & & 2.38888... &= two+ {7 \over eighteen} & 2.4 \\ \text{frq.:}&4 & 5 & iv & 13 & & 2.five &= 2+ {9 \over xviii} & 2.5 \\ \hline \text{frq.:}&four & v & v & 14 & & ii.6 &= two+ {12 \over 20} & 2.6 \\ \text{frq.:}&4 & 5 & 6 & 15 & & two.68181... &= 2+ {15 \over 22} & 2.vii \\ \text{frq.:}&4 & 5 & 7 & 16 & & 2.75 &= two+ {18 \over 24} & 2.8 \\ \text{frq.:}&four & 5 & 8 & 17 & & 2.807... &= 2+ {21 \over 26} & 2.9 \\ \text{frq.:}&iv & 5 & 9 & xviii & & 2.857... &= two+ {24 \over 28} & 3.0 \\ \hline \text{frq.:}&4 & 5 & 10 & 19 & & 2.9 &= 2+ {27 \over 30} & 3.0 \\ \cease{array} \\ \small{ \_^{a)} \text{Median}_\text{expected}=two+{N/two-iv \over 5}\cdot (iii-2)} $$ What we observe is not but the divergence in the values of the medians (which might exist correctable past a tiny tweak). Just fifty-fifty more than of import/surprising is the observation of the linear increase of the median for $Northward=11$ to $N=13$ (which we in fact expect), but in one case the index for the median-case moves from the left(=lower) office of the median category over its hateful-point to the right(=higher) part, then the linear increase changes to a nonlinear one (the denominator changes with N). Just the denominator in the official median-formula does not change equally long as the index points to the aforementioned category: it should just contain the number of cases, mayhap additionally divided by the fraction of the values of the categories. So even if I accept a tiny misconception here, which might then explicate the linear difference for the smaller $N$'s, I retrieve in that location must be some error in the SPSS-internal routine.

Question: So what is going on here? Or did I overlook something of import/elementary?


Remark 1: This consideration was too inspired by the tech-article in the IBM-SPSS knowledgebase apropos the gmedian-ciphering and the use of the category-means
Remark 2: The formula in the SPSS-algorithms-transmission is not completely clear to me, but it does not seem and so far to give reason for the ascertainment of the varying denominator.
Remark 3: From the IBM_SPSS-algorithms-manual, "grouped median" picture

How To Calculate Median For Grouped Data In Spss,

Source: https://stats.stackexchange.com/questions/154260/median-computation-grouped-median-problem-with-gmedian-computation-in-spss

Posted by: burkemasimed.blogspot.com

0 Response to "How To Calculate Median For Grouped Data In Spss"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel