Statistics Utilities

ttest_ind_phenotype(case, control, alternative='two-sided')[source]

Two sided t-test of case sample(s) and mean expression values in base samples across all genes :type case: Union[SampleCollection, Sample] :param case: either Sample of SampleCollection object with case sample(s) :type control: Union[SampleCollection, Sample] :param control: either Sample of SampleCollection object with control sample(s) :param alternative: string with the alternative hypothesis, H1, has to be one of the following:

‘two-sided’: H1: difference in means not equal to value (default) ‘larger’ : H1: difference in means larger than value ‘smaller’ : H1: difference in means smaller than value
Returns: tstat : float or numpy array in case of multiple case samples - test statisic
pvalue : float or numpy array in case of multiple case samples - pvalue of the t-test df : int or float - degrees of freedom used in the t-test