Anonymous user
Welch's t-test: Difference between revisions
m
→{{header|Fortran}}
mNo edit summary |
|||
Line 197:
Using IMSL function '''TDF'''. With Absoft Pro Fortran, compile with <code>af90 %FFLAGS% %LINK_FNL% pvalue.f90</code>.
Alternatively, the program shows the p-value computed using the IMSL '''BETAI''' function.
<lang fortran>subroutine
use tdf_int
implicit none
Line 215 ⟶ 216:
program pvalue
use betai_int
implicit none
double precision :: x(4) = [3d0, 4d0, 1d0, 2.1d0]
double precision :: y(3) = [490.2d0, 340.0d0, 433.9d0]
double precision :: t, df, p
call
print *, t, df, p
print *, betai(df / (t**2 + df), 0.5d0 * df, 0.5d0)
end program</lang>
'''Output'''
<pre> -9.55949772193266 2.00085234885628 1.075156114978449E-002
1.075156114978449E-002</pre>
=={{header|Go}}==
|