statistics v0.5.1 Statistics.Tests.TTest
Student’s t test
Link to this section Summary
Functions
A two-sided test for the null hypothesis that the
mean of list1 is different to the mean of list2
A two-sided test for the null hypothesis that the
expected value (mean) of a sample of independent
observations a is equal to the given population mean, popmean
Link to this section Functions
Link to this function
ind_samples(list1, list2)
A two-sided test for the null hypothesis that the
mean of list1 is different to the mean of list2.
The variance of the lists should be equal but the sample size of each last can be different.
Returns the t statistic, and the p value.
Example
iex> Statistics.Tests.TTest.ind_samples([1,2,3,2,1], [3,2,4,3,5])
%{p: 0.022802155958137702, t: -2.82842712474619}
iex> Statistics.Tests.TTest.ind_samples([1,2,3,2,1], [3,2,4,3,5,4,5,6])
%{p: 0.0044530673387188, t: -3.5858542135407596}
Link to this function
one_sample(list, popmean)
A two-sided test for the null hypothesis that the
expected value (mean) of a sample of independent
observations a is equal to the given population mean, popmean.
Returns the t statistic, and the p value.
Example
iex> Statistics.Tests.TTest.one_sample([1,2,3,2,1], 3)
%{p: 0.023206570788795993, t: -3.585685828003181}