MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: t-test question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64186] Re: [mg64150] t-test question
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Sat, 4 Feb 2006 04:13:41 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

As an aside to the responses that have already been posted, if you have the 
data at hand, you can use MeanDifferenceTest to perform the test directly 
from the data.

In[1]:= << Statistics`HypothesisTests`

In[2]:= data1 = Table[Random[], {20}];

In[3]:= data2 = Table[Random[Real, {.3, 1.3}], {35}];


This will give the signed t-statistic for a difference of 0, which is the 
difference in the case you described, and the p-value for the two-sided test.

In[4]:= MeanDifferenceTest[data1, data2, 0, TwoSided -> True, FullReport -> 
True]

Out[4]= {FullReport ->    MeanDiff    TestStat   Distribution                ,
                           -0.265388   -3.22715   StudentTDistribution[41.354]

 >    TwoSidedPValue -> 0.00244793}


The two-sided p-value is the p-value for the absolute value of the 
t-statistic, which is the case you described.


Darren Glosemeyer
Wolfram Research


At 07:09 PM 2/2/2006 -0500, Csukas Attila wrote:
>Dear all,
>
>I have found an equation for comparing two means.
>
>Ue = (na - 1)*Ua + (nb - 1)Ub/na + nb - 2    This is for the pooled
>value of distribution and
>
>t0 = |xa-xb|/ Root Ue*(1/na+1/nb)   This is for the t value.
>
>Sample values
>na=342
>nb=170
>Ua=6.39
>Ub=6.07
>xa=177.19
>xb=170.37
>
>Does anybody have idea how this works in Mathematica?
>I am not familiar with Mathematica syntax but interested how would this
>work...
>
>Any help and idea appreciated.
>
>Attila


  • Prev by Date: Re: Problem to evaluate a function inside a function
  • Next by Date: Re: Re: SetPrecision causes logical comparisons to fail in Mathematica 5.1 on Mac OS X?
  • Previous by thread: Re: t-test question
  • Next by thread: how to visualize 3+D normal density contour?