Stattests#
Stattests Class#
- class retentioneering.tooling.stattests.stattests.StatTests(eventstream)[source]#
- A class for determining statistical difference between two groups of users. - Parameters:
- eventstreamEventstreamType
 
 - See also - Eventstream.stattests
- Call StatTests tool as an eventstream method. 
 - Notes - See StatTests user guide for the details. - fit(test, groups, func, group_names=('group_1', 'group_2'), alpha=0.05)[source]#
- Calculates the stattests internal values with the defined parameters. Applying - fitmethod is necessary for the following usage of any visualization or descriptive- StatTestsmethods.- Parameters:
- test{‘mannwhitneyu’, ‘ttest’, ‘ztest’, ‘ks_2samp’, ‘chi2_contingency’, ‘fisher_exact’}
- Test the null hypothesis that 2 independent samples are drawn from the same distribution. Supported tests are: - mannwhitneyusee scipy documentation.
- ttestsee statsmodels documentation.
- ztestsee statsmodels documentation.
- ks_2sampsee scipy documentation.
- chi2_contingencysee scipy documentation.
- fisher_exactsee scipy documentation.
 
- groupstuple of list
- Must contain a tuple of two elements (g_1, g_2): g_1 and g_2 are collections of user_id`s. 
- funcCallable
- Selected metrics. Must contain a function that takes a dataset as an argument for a single user trajectory and returns a single numerical value. 
- group_namestuple, default (‘group_1’, ‘group_2’)
- Names for selected groups g_1 and g_2. 
- alphafloat, default 0.05
- Selected level of significance. 
 
 
 
Eventstream#
- Eventstream.stattests(test, groups, func, group_names=('group_1', 'group_2'), alpha=0.05)[source]#
- Determine the statistical difference between the metric values in two user groups. - Parameters:
- See parameters’ description
- Stattests
 
- Returns:
- StatTests
- A - StatTestclass instance fitted to the given parameters.