ttest_ind_from_stats(mean1, std1, nobs1, mean2, std2, nobs2, equal_var=True, alternative='two-sided')
This is a test for the null hypothesis that two independent samples have identical average (expected) values.
The statistic is calculated as (mean1 - mean2)/se
, where se
is the standard error. Therefore, the statistic will be positive when mean1 is greater than mean2 and negative when mean1 is less than mean2.
The mean(s) of sample 1.
The corrected sample standard deviation of sample 1 (i.e. ddof=1
).
The number(s) of observations of sample 1.
The mean(s) of sample 2.
The corrected sample standard deviation of sample 2 (i.e. ddof=1
).
The number(s) of observations of sample 2.
If True (default), perform a standard independent 2 sample test that assumes equal population variances . If False, perform Welch's t-test, which does not assume equal population variance .
Defines the alternative hypothesis. The following options are available (default is 'two-sided'):
The calculated t-statistics.
The two-tailed p-value.
T-test for means of two independent samples from descriptive statistics.
import numpy as np
from scipy.stats import ttest_ind_from_stats
ttest_ind_from_stats(mean1=15.0, std1=np.sqrt(87.5), nobs1=13,
mean2=12.0, std2=np.sqrt(39.0), nobs2=11)
a = np.array([1, 3, 4, 6, 11, 13, 15, 19, 22, 24, 25, 26, 26])
b = np.array([2, 4, 6, 9, 11, 13, 14, 15, 18, 19, 21])
from scipy.stats import ttest_ind
ttest_ind(a, b)
ttest_ind_from_stats(mean1=0.2, std1=np.sqrt(0.161073), nobs1=150,
mean2=0.225, std2=np.sqrt(0.175251), nobs2=200)
group1 = np.array([1]*30 + [0]*(150-30))
group2 = np.array([1]*45 + [0]*(200-45))
ttest_ind(group1, group2)
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them