statsmodels / statsmodels.github.io

documentation for statsmodels - currently temporary structure and location
BSD 3-Clause "New" or "Revised" License
12 stars 9 forks source link

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

Open Maskedman99 opened 6 months ago

Maskedman99 commented 6 months ago

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.

josef-pkt commented 6 months ago

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.