Skip to content

BUG/ENH: proportions_ztest with 2d count  #2734

Closed

Description

@josef-pkt

count with two values is interpreted as two sample test
According to the docstring nobs needs to be of the same shape as count, but it's not checked and return incorrect results if nobs is scalar.
There is one sum in the calculation that calculates the pooled variance which requires that nobs has full length.

Also, there is no asarray for count and nobs and it raises an exception if they are lists.

ENH: this only allows pooled variance, not a constrained mle variance (if value != zero).

ENH: we could vectorize this, I think, which would be useful for sample size or power calculations.

Activity

  1. dhpiyush commented on Jan 19, 2016

    @dhpiyush
    Contributor

    @josef-pkt So it should raise error if the shape of count is not equal to nobs ??

  2. josef-pkt commented on Jan 19, 2016

    @josef-pkt
    MemberAuthor

    No, I think if nobs is scalar, then we assume that it's the same nobs for all counts, and expand.

  3. added this to the 0.8 milestone on May 27, 2017
  4. josef-pkt commented on May 27, 2017

    @josef-pkt
    MemberAuthor

    bug/problems fixed by #3058 for 0.8

    new issue #3720 for enhancement ideas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions