Skip to content

Query regarding the z-test() document page. (statsmodels.stats.weightstats.ztest) #28

Open

Description

@Maskedman99

Hi, at https://www.statsmodels.org/stable/generated/statsmodels.stats.weightstats.ztest.html

In the return values section its showing this:
image

Shouldn't it be zstat and p-value of the z-test.

Activity

  1. josef-pkt commented on Feb 11, 2024

    @josef-pkt
    Member

    docstring questions should be in the issues of the main repo. Docs and docstrings are part of the code. github.io is just a storage repo.

    to the answer
    pvalue of the t-test is copy-paste error and needs to be fixed

    tstat versus zstat is ambiguous
    in general we use t-statistic or tvalues for effect / stderror_of_effect independently whether p-values are evaluated using the normal or the t distribution. The test statistics are the same in both cases.

    As in: "The t-statistic is asymptotically normally distributed."

    The only time zstat would have a different interpretation than tstat is in the "exact" case, when the data is really normally distributed and the variance is known and not estimated. But that's not the case here.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions