Anonymous user
Welch's t-test: Difference between revisions
m
→{{header|C}}: removed redundant variable 'x', should save RAM and make easier to read
m (contradiction with the following sentence (it's a translation of a specific R command)) |
m (→{{header|C}}: removed redundant variable 'x', should save RAM and make easier to read) |
||
Line 130:
);
// printf("Welch = %lf DOF = %lf\n", WELCH_T_STATISTIC, DEGREES_OF_FREEDOM);
double value = DEGREES_OF_FREEDOM/(WELCH_T_STATISTIC*WELCH_T_STATISTIC+DEGREES_OF_FREEDOM);
if ((isinf(
return 1.0;
}
if ((isinf(
return 1.0;
}
BETAIN computes the incomplete Beta function ratio.
Line 192 ⟶ 193:
double temp;
double term;
double xx;
// ifault = 0;
//Check the input arguments.
Line 202 ⟶ 201:
// return value;
}
if (
{
// *ifault = 2;
Line 210 ⟶ 209:
Special cases.
*/
if (
return value;
}
psq = a + 0.5;
cx = 1.0 -
if ( a < psq *
{
xx = cx;
cx =
pp = 0.5;
qq = a;
Line 226 ⟶ 225:
else
{
xx =
pp = a;
qq = 0.5;
Line 281 ⟶ 280:
}
}
return value;
}
|