test for proportions based on normal (z) test
Parameters : | count : integer or array_like
nobs : integer
value : None or float or array_like
alternative : string in [‘two-sided’, ‘smaller’, ‘larger’]
prop_var : False or float in (0, 1)
|
---|---|
Returns : | zstat : float
p-value : float
|
Notes
This uses a simple normal test for proportions. It should be the same as running the mean z-test on the data encoded 1 for event and 0 for no event, so that the sum corresponds to count.
In the one and two sample cases with two-sided alternative, this test produces the same p-value as proportions_chisquare, since the chisquare is the distribution of the square of a standard normal distribution. (TODO: verify that this really holds)
TODO: add continuity correction or other improvements for small samples.