fsml_ttest_1sample Interface

public interface fsml_ttest_1sample

The 1-sample t-test determines if the sample mean has the value specified in the null hypothesis.

Hypotheses:

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

Procedure:

The test statstic is calculated as follows: where is the sample mean, is the sample standard deviation, is the sample size, and is the population mean.

The degrees of freedom is calculated as follows:

Calls

interface~~fsml_ttest_1sample~~CallsGraph interface~fsml_ttest_1sample fsml_ttest_1sample proc~s_tst_ttest_1s s_tst_ttest_1s interface~fsml_ttest_1sample->proc~s_tst_ttest_1s proc~s_err_print s_err_print proc~s_tst_ttest_1s->proc~s_err_print proc~s_tst_ttest_1s_core s_tst_ttest_1s_core proc~s_tst_ttest_1s->proc~s_tst_ttest_1s_core proc~f_utl_r2c f_utl_r2c proc~s_err_print->proc~f_utl_r2c 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_1s(x, mu0, t, df, p, h1)

Impure wrapper procedure for s_tst_ttest_1s_core.

Arguments

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

x vector (samples)

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

population mean (null hypothesis expected value)

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