Mathematica's Quantile[] vs. Matlab's prctile()
- From: Dave <foo@xxxxxxx>
- Date: Mon, 10 Dec 2007 17:09:54 +0000
From what I gather, there is no universally agreed definition of percentile. Is there one which more people use than another?
I've been calculating the 5th percentile of some data in Mathematica using the Quantile[] function.
In[1]:= t={1,2,1000,100000}
Out[1]= {1, 2, 1000, 100000}
In[2]:= Quantile[t,.5]
Out[2]= 2
Doing similar in Matlab with prctile() gives a very different result -
>> y=[1 2 1000 100000]
>> prctile(y,50)
ans =
501
So one gives 2, the other 501.
I've picked a set of data which maximises the differences - I think with a larger range of more similar data, the differences will be much smaller.
.
- Follow-Ups:
- Re: Mathematica's Quantile[] vs. Matlab's prctile()
- From: Steven Lord
- Re: Mathematica's Quantile[] vs. Matlab's prctile()
- From: Dave
- Re: Mathematica's Quantile[] vs. Matlab's prctile()
- Prev by Date: Re: Simple question about solving simultaneous equations
- Next by Date: Re: Simple question about solving simultaneous equations
- Previous by thread: Simple question about solving simultaneous equations
- Next by thread: Re: Mathematica's Quantile[] vs. Matlab's prctile()
- Index(es):
Relevant Pages
|