Welch's t-test: Difference between revisions
Content added Content deleted
(→{{header|R}}: added more test sets, printf function, and state that this is used to benchmark the C program above) |
m (comparison to R) |
||
Line 79: | Line 79: | ||
This shows how pvalue can be calculated from any two arrays, using Welch's 2-sided t-test, which doesn't assume equal variance. |
This shows how pvalue can be calculated from any two arrays, using Welch's 2-sided t-test, which doesn't assume equal variance. |
||
This is the equivalent of R's |
This is the equivalent of R's<code>t.test(vector1,vector2, alternative="two.sided", var.equal=FALSE)</code> and as such, it is compared against R's pvalues with the same vectors/arrays to show that the differences are very small (here 10^-14). |
||
<lang C>#include <stdio.h> |
<lang C>#include <stdio.h> |
||
#include <math.h> |
#include <math.h> |