T-Test

Username
Username New Altair Community Member
edited November 5 in Community Q&A
Hi,

what type of significance test is done by the T-Test operator (left-sided, right-sided or both-sided)? I couldn't find any info in the documentation.

Thanks
Tagged:

Answers

  • steffen
    steffen New Altair Community Member
    Hello,

    the description says:
    Determines if the null hypothesis (all actual mean values are the same) holds for the input performance vectors.
    so I say it is a both-sided test with H0: mu1=mu2, H1: mu1!=mu2

    greetings

    Steffen
  • Username
    Username New Altair Community Member
    steffen wrote:

    Hello,

    the description says:
    so I say it is a both-sided test with H0: mu1=mu2, H1: mu1!=mu2

    greetings

    Steffen
    I looked at the source code and it does look like a left sided test, doesn't it?
  • steffen
    steffen New Altair Community Member
    Nope

    As far as I see the following method TTestSignificanceTestOperator#getProbability(PerformanceCriterion pc1, PerformanceCriterion pc2) calculates the p-value of the test. The test itself is ''performed'' here:
    TTestSignificanceTestOperator#TTestSignificanceTestResult#toString() , i.e. here:
    result.append("Values smaller than alpha=" + Tools.formatNumber(alpha) + " indicate a probably significant difference between the mean values!" + Tools.getLineSeparator());
    the comparison of pvalue < alpha is no clear indication for a left-sided test...

    this is the used formula:
    http://en.wikipedia.org/wiki/Student';s_t-test#Unequal_sample_sizes.2C_equal_variance => two-sided-test

    BUT looking at this formula raises another questions:
    First: I have read somewhere that the assumption of equal variances is not a problem if the sizes of the test samples are equal. On the other hand, if this is not valid, no one can guarantee anything for the true alpha error. What do you think about it?

    Second:
    I thought in case of  a two-sided test the alpha parameter must be divided by 2. Or is this already implied by the test statistics ?

    greetings

    Steffen

    PS:
    Username wrote:

    I looked at the source code and it does look like a left sided test, doesn't it?
    I prefer such argumentations with class names and line numbers ;)
       
  • Username
    Username New Altair Community Member
    steffen wrote:

    Second:
    I thought in case of  a two-sided test the alpha parameter must be divided by 2. Or is this already implied by the test statistics ?   
    That's why I guessd it's a one sided test.  ;)
  • steffen
    steffen New Altair Community Member
    Hello again
    steffen wrote:

    Second:
    I thought in case of  a two-sided test the alpha parameter must be divided by 2. Or is this already implied by the test statistics ?
    Username wrote:

    That's why I guessd it's a one sided test.  ;)
    I checked it and found that it is ok that alpha is not divided. You can see the t-test as a special case of ANOVA with two groups. In this case t=sqrt(F) (regarding the teststatistics). The F-teststatistics is tested again the 1-alpha-quantile for the same hypothesis, so ...

    I guess everything is clear now

    greetings

    Steffen