Welch's t-test: Difference between revisions

Content added Content deleted
No edit summary
Line 36: Line 36:
{{works with|C99}}
{{works with|C99}}
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.
The high "n" value ensures roughly 17 digits convergence with Simpson's integral approximation.
The high "n" value ensures roughly 6 digits convergence with Simpson's integral approximation.
<lang C>#include <stdio.h>
<lang C>#include <stdio.h>
#include <math.h>
#include <math.h>
Line 113: Line 113:
Test sets 4 p-value = 0.090773
Test sets 4 p-value = 0.090773
Test sets 5 p-value = 0.010751</pre>
Test sets 5 p-value = 0.010751</pre>

=={{header|Racket}}==
=={{header|Racket}}==
{{trans|C}}, producing the same output.
{{trans|C}}, producing the same output.