stats.ttest_ind: extract df value

Advertisements I am using stats.ttest_ind: a = list(range(0, 10)) b = list(range(20, 40, 2)) out = stats.ttest_ind(a, b) print(out) #Output TtestResult(statistic=-11.443934479174386, pvalue=1.0790209865144616e-09, df=18.0) I can extract statistic and pvalue using out[0] and out[1], but when I try to extract df with out[2], I get the following error: IndexError: tuple index out of range. out[-1] also… Read More stats.ttest_ind: extract df value

How to extract lower and upper bounds from confidence level in R from t test function?

Advertisements I used the following code to retrieve a confidence level for my data: c <- t.test(my_data$my_col, conf.level = 0.95) c This returns something like: data: my_data$my_column t = 30, df = 20, p-value < 2.1e-14 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 62.23191 80.11201 sample estimates: mean of… Read More How to extract lower and upper bounds from confidence level in R from t test function?