Percentiles (still hurting my brain)

John Darrington <[email protected]> Mon, 29 Mar 2004 08:38:54 +0800
Newsgroups gmane.comp.gnu.fiasco.devel
Message-ID <[email protected]>
--===============2072186781==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw"
Content-Disposition: inline


--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

You wouldn't belive such a simple concept could cause so much trouble!

I've implemented Michael's algorithm in frequencies.q whcih we can run
with if we so desire.  If however, we want the SPSS one, then I'm all
at sea. =20

Let's run the data (1 2 3 4 5)  through  it, searching for the 50th
percentile:



     _SPSS Statistical Algorithms_ says, roughly:

W in this case is 5.    =20

     The p'th percentile:
    =20
     Find the first score interval (x2) containing more than tp cases.

Well further down it says that tp=3D(W+1)*p/W so tp=3D6*50/5 =3D 60
So the first problem is that there is no score with more than 60
cases.  So I assume that either Ben, or the typsetter of the book made
a mistake, and should have typed tp=3D(W+1)*p/100 in which case
tp =3D 6*50/100 =3D 3.

Thus x2 =3D 4 and x1 =3D 3

Now cc1 =3D 1+2+3 / 1+2+3+4+5 =3D 10/15 =3D 2/3
and therefore cp1 =3D 200/3

so tp - cp1 =3D 3 - 200/3  which doesn't satisfy the condition=20
tp-cp1 >=3D 100/W

So that answer is the 2nd case, viz:=20

1 - ((W+1)p/100 - cc1) x1 + ((W+1)p/100 - cc1)x2

which can be simplified to=20

1 + ((W+1)p/100 - cc1)( x2 - x1)

which in our case is


1 + (6 50/100 - 2/3)(4-3)

1 + ( 3 - 2/3)(1)

1 + ( 7/3)

10/3 =3D 3.333

which is a very poor value of the median of 1 2 3 4 5



No matter how many times I look at it, the algorithm that Ben posted
makes no sense to me.


Frustrated!

J'            =20

--=20
PGP Public key ID: 1024D/2DE827B3=20
fingerprint =3D 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://wwwkeys.pgp.net or any PGP keyserver for public key.



--wac7ysb48OaltWcw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAZ3AeimdxnC3oJ7MRAqomAJ9u55O6uYF8Q5zR+m9w94oYV+I4ZACfU1+p
ZVYpwUstiIMa1HDJvn8qWMQ=
=Hmmd
-----END PGP SIGNATURE-----

--wac7ysb48OaltWcw--



--===============2072186781==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pspp-dev mailing list
[email protected]
http://mail.gnu.org/mailman/listinfo/pspp-dev

--===============2072186781==--