[SciPy-user] Strange result from "scoreatpercentile"
hecvillaf at yahoo.com
hecvillaf at yahoo.com
Fri Feb 11 12:50:39 EST 2005
Hi!
I'm trying to get some quartiles from a distribution
with scoreatpercentile. But it doesn't match with the
values I get from R (which seems pretty correct).
Any suggestions? Thanks!
-Hector
At Python:
#----------------------------------#
>>> vals = [342, 354, 1, 11, 31, 352, 323, 297, 29, 6,
376, 335, 354, 305, 311, 14, 15, 351, 352, 310, 329,
331, 2, 7, 393, 324, 333, 408, 204, 8, 20, 370, 300,
307, 357, 77, 8, 3, 305, 305, 309, 231, 19, 11, 37,
28, 13, 15, 11, 10, 19, 1, 331, 340, 308, 305, 314,
12, 20, 404, 427, 395, 373, 331, 27, 7, 354, 380, 394,
350, 340, 13, 15, 266, 401, 328, 415, 349, 22, 19,
364, 350, 312, 342, 303, 8, 21]
>>> scipy.stats.scoreatpercentile(vals,25)
-131.91357142857143
>>> scipy.stats.scoreatpercentile(vals,75)
344.62076923076927
#----------------------------------#
At R
#----------------------------------#
> summary(vals)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.0 19.0 305.0 212.7 349.5 427.0
#----------------------------------#
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
More information about the SciPy-User
mailing list