[Python] In "statsmodels" Python library, why does z-test not require Population standard...

Discussão em 'Python' iniciado por Stack, Julho 7, 2025.

  1. Stack

    Stack Membro Participativo

    So to execute a z-test in python, I have seen people doing:

    from statsmodels.stats.weightstats import ztest as ztest
    # IQ levels of 20 patients post medication
    data = [88, 92, 94, 94, 96, 97, 97, 97, 99, 99,
    105, 109, 109, 109, 110, 112, 112, 113, 114, 115]

    ztest(data, value=100) # value is mean


    Why is the Population standard deviation (std) not required in the argument? How does the library apply the z-test formula without getting the population std?

    Continue reading...

Compartilhe esta Página