fsml_ttest_paired Interface

public interface fsml_ttest_paired

The paired sample t-test (or dependent sample t-test) determines if the mean difference between two sample sets are zero. It is mathematically equivalent to the 1-sample t-test conducted on the difference vector with .

Hypotheses:

The null hypothesis and alternative hypothesis can be written as: : , and :

Procedure:

The test statstic is calculated as follows: where is the mean of the differences between the sample sets, is the standard deviation of the differences, and is the number of paired samples.

The degrees of freedom is calculated as follows:

Calls

interface~~fsml_ttest_paired~~CallsGraph interface~fsml_ttest_paired fsml_ttest_paired proc~s_tst_ttest_paired s_tst_ttest_paired interface~fsml_ttest_paired->proc~s_tst_ttest_paired proc~s_err_print s_err_print proc~s_tst_ttest_paired->proc~s_err_print proc~s_tst_ttest_paired_core s_tst_ttest_paired_core proc~s_tst_ttest_paired->proc~s_tst_ttest_paired_core proc~f_utl_r2c f_utl_r2c proc~s_err_print->proc~f_utl_r2c proc~s_tst_ttest_1s_core s_tst_ttest_1s_core proc~s_tst_ttest_paired_core->proc~s_tst_ttest_1s_core proc~f_dst_t_cdf_core f_dst_t_cdf_core proc~s_tst_ttest_1s_core->proc~f_dst_t_cdf_core proc~f_sts_mean_core f_sts_mean_core proc~s_tst_ttest_1s_core->proc~f_sts_mean_core proc~f_dst_betai_core f_dst_betai_core proc~f_dst_t_cdf_core->proc~f_dst_betai_core

Module Procedures

public impure subroutine s_tst_ttest_paired(x1, x2, t, df, p, h1)

Impure wrapper procedure for s_tst_ttest_paired_core.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x1(:)

x1 vector (samples)

real(kind=wp), intent(in) :: x2(:)

x2 vector (samples); must be same length as x1

real(kind=wp), intent(out) :: t

test statistic

real(kind=wp), intent(out) :: df

degrees of freedom

real(kind=wp), intent(out) :: p

p-value

character(len=*), intent(in), optional :: h1

option: two (default), le, ge