[SciPy-Dev] Adding non-parametric methods to scipy.stats

Warren Weckesser warren.weckesser at gmail.com
Thu Jun 11 14:54:32 EDT 2020


On 6/11/20, josef.pktd at gmail.com <josef.pktd at gmail.com> wrote:
> I think it would make a good and useful addition and fit into scipy.stats.
> There are no pure confint functions yet, AFAIR.

I agree with Josef and Matt, this looks like it would be a nice
addition to SciPy.  At the moment, I'm not sure what the API should
look like.  Romain, is the work that you've already done available
online somewhere?

Warren


>
> I recently wrote a function for the confidence interval for the median,
> mainly because I ran into the formulas that were easy to code.
> related open issue: how do we get confidence intervals for QQ-plot.
>
> aside: I don't like "percent", I prefer quantiles in [0, 1]. See discussion
> a while ago in numpy.
>
> Josef
>
>
> On Thu, Jun 11, 2020 at 1:01 PM Matt Haberland <mhaberla at calpoly.edu>
> wrote:
>
>> OK, we should let our statistics experts weigh in on this. (I'm not
>> actually one of them.)
>>
>> On Wed, Jun 10, 2020 at 10:46 PM Romain Jacob <jacobr at ethz.ch> wrote:
>>
>>> I think a dedicated function makes more sense. This function takes as
>>> input an array, a percentile and a confidence level, and returns the
>>> corresponding one-sided confidence intervals.
>>>
>>> I quickly looked at the list of existing functions in scipy.stats but
>>> did
>>> not see any function in "summary statistics" that does similar things. So
>>> I
>>> would go for a new function.
>>> On 10/06/2020 20:38, Matt Haberland wrote:
>>>
>>> Where do you envision this living in SciPy? In its own function, or
>>> added
>>> functionality to other functions e.g. scipy.stats.percentileofscore
>>> <https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.percentileofscore.html#scipy.stats.percentileofscore>
>>> ?
>>>
>>> On Tue, Jun 9, 2020 at 11:12 PM Romain Jacob <jacobr at ethz.ch> wrote:
>>>
>>>> On 09/06/2020 20:18, Matt Haberland wrote:
>>>>
>>>> Yes, I think we would be interested in confidence intervals, but I
>>>> think
>>>> the algorithm should be very well standard/cited, even if it's not the
>>>> best/most modern.
>>>>
>>>> Yes definitely! We did not invented the method I am referring to, it a
>>>> long-known approach (first proposed by Thompson in 1936 [1], extended
>>>> later
>>>> and commonly found in textbooks, eg [2,3]). This method is very simple,
>>>> quite powerful, yet it has been largely overlooked in many scientific
>>>> fields. I found no available implementation to facilitate its use (at
>>>> least
>>>> not in Python, there may be something in R, I have not looked).
>>>>
>>>> [1] https://www.jstor.org/stable/2957563
>>>> [2] doi.org/10.1002/0471722162.ch7
>>>> [3] https://perfeval.epfl.ch/
>>>>
>>>> @WarrenWeckesser and I had planned to work on confidence intervals for
>>>> the test statistics returned by our statistical tests
>>>> <https://docs.scipy.org/doc/scipy/reference/stats.html#statistical-tests>.
>>>>
>>>>
>>>> That is also definitely interesting, although I am not myself an expert
>>>> in that area. I am glad to see that the complete list contains some
>>>> non-parametric tests :-)
>>>>
>>>> Cheers,
>>>> --
>>>> Romain
>>>>
>>>>
>>>> On Mon, Jun 8, 2020 at 2:11 AM Romain Jacob <jacobr at ethz.ch> wrote:
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> I have been working for some time on the implementation of
>>>>> non-parametric methods to compute confidence intervals for
>>>>> percentiles.
>>>>> There are some very interesting results in the literature (see e.g. a
>>>>> nice
>>>>> pitch in [1]) which I think it would be great to add to SciPy to make
>>>>> them
>>>>> more readily available. It also seems to be rather in line with
>>>>> "recent"
>>>>> discussions of the roadmap for scipy.stats [2].
>>>>>
>>>>> I would be interested in contributing this. What do you think?
>>>>>
>>>>> Cheers,
>>>>> --
>>>>> Romain
>>>>>
>>>>> [1] https://ieeexplore.ieee.org/document/6841797
>>>>> [2] https://github.com/scipy/scipy/issues/10577
>>>>> --
>>>>> Romain Jacob
>>>>> Postdoctoral Researcher
>>>>> ETH Zurich - Computer Engineering and Networks Laboratory
>>>>> www.romainjacob.net
>>>>> @RJacobPartner <https://twitter.com/RJacobPartner>
>>>>> Gloriastrasse 35, ETZ G75
>>>>> 8092 Zurich
>>>>> +41 7 68 16 88 22
>>>>> _______________________________________________
>>>>> SciPy-Dev mailing list
>>>>> SciPy-Dev at python.org
>>>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>>>
>>>>
>>>>
>>>> --
>>>> Matt Haberland
>>>> Assistant Professor
>>>> BioResource and Agricultural Engineering
>>>> 08A-3K, Cal Poly
>>>>
>>>> _______________________________________________
>>>> SciPy-Dev mailing
>>>> listSciPy-Dev at python.orghttps://mail.python.org/mailman/listinfo/scipy-dev
>>>>
>>>> --
>>>> Romain Jacob
>>>> Postdoctoral Researcher
>>>> ETH Zurich - Computer Engineering and Networks Laboratory
>>>> www.romainjacob.net
>>>> @RJacobPartner <https://twitter.com/RJacobPartner>
>>>> Gloriastrasse 35, ETZ G75
>>>> 8092 Zurich
>>>> +41 7 68 16 88 22
>>>> _______________________________________________
>>>> SciPy-Dev mailing list
>>>> SciPy-Dev at python.org
>>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>>
>>>
>>>
>>> --
>>> Matt Haberland
>>> Assistant Professor
>>> BioResource and Agricultural Engineering
>>> 08A-3K, Cal Poly
>>>
>>> _______________________________________________
>>> SciPy-Dev mailing
>>> listSciPy-Dev at python.orghttps://mail.python.org/mailman/listinfo/scipy-dev
>>>
>>> _______________________________________________
>>> SciPy-Dev mailing list
>>> SciPy-Dev at python.org
>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>
>>
>>
>> --
>> Matt Haberland
>> Assistant Professor
>> BioResource and Agricultural Engineering
>> 08A-3K, Cal Poly
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at python.org
>> https://mail.python.org/mailman/listinfo/scipy-dev
>>
>


More information about the SciPy-Dev mailing list