ANOVA Vs t-test

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

ANOVA Vs t-test

Anthony James
Dear Colleagues,
What happens if ANOVA is used instead of t-test when there are two means to compare?
Does ANOVA seriousely affect the results?
Why not using ANOVA instead of t-test all the time?
 
Cheers
Anthony
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Jarrod Teo-2
Hi Anthony,
 
I suppose that the T-test that you had mentioned is 2 independent samples T-test.
 
I had read before that you can use ANOVA for 2 means comparison in place of a 2 independent samples T-Test. However, I am not sure if this will cause any serious effect to the results. What I can suggest is that to do a 2 independent samples T-test and ANOVA on the same set of variables and see if the Statistics output are the same. I am sorry that I could not test this out for you because I do not have an SPSS on hand at the moment.
 
Do be careful when you use means comparison. It is not necessary that a 2 independent samples T-test applies in all situation. If you are doing a means comparison for a before-after scenario, a Paired Sample T-test is more applicable.
 
Warmest Regards
Dorraj Oet
 

Date: Wed, 5 Oct 2011 12:24:28 +0800
From: [hidden email]
Subject: ANOVA Vs t-test
To: [hidden email]

Dear Colleagues,
What happens if ANOVA is used instead of t-test when there are two means to compare?
Does ANOVA seriousely affect the results?
Why not using ANOVA instead of t-test all the time?
 
Cheers
Anthony
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Marta Garcia-Granero
Hi:

If the homogeneity of variances condition is fulfilled, then the t test and the ANOVA are the same (as a matter of fact t^2=F). If HOV fails, then you have to use Welch test (SPSS gives it with the name"homogeneity of variances not assumed"), and the classic ANOVA is not valid (although Brown-Forsythe or Welch ANOVA are).

A t test has the advantage of offering as standard output the 95%CI for the means difference, while ANOVA does not. Confidence intervals should always be reported, not only p values.

HTH,
Marta GG

El 05/10/2011 8:49, DorraJ Oet escribió:
Hi Anthony,
 
I suppose that the T-test that you had mentioned is 2 independent samples T-test.
 
I had read before that you can use ANOVA for 2 means comparison in place of a 2 independent samples T-Test. However, I am not sure if this will cause any serious effect to the results. What I can suggest is that to do a 2 independent samples T-test and ANOVA on the same set of variables and see if the Statistics output are the same. I am sorry that I could not test this out for you because I do not have an SPSS on hand at the moment.
 
Do be careful when you use means comparison. It is not necessary that a 2 independent samples T-test applies in all situation. If you are doing a means comparison for a before-after scenario, a Paired Sample T-test is more applicable.
 
Warmest Regards
Dorraj Oet
 

Date: Wed, 5 Oct 2011 12:24:28 +0800
From: [hidden email]
Subject: ANOVA Vs t-test
To: [hidden email]

Dear Colleagues,
What happens if ANOVA is used instead of t-test when there are two means to compare?
Does ANOVA seriousely affect the results?
Why not using ANOVA instead of t-test all the time?
 
Cheers
Anthony

Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Bruce Weaver
Administrator
Adding to Marta's comments, for the equal variances version of the t-test (or one-way ANOVA), you can also obtain exactly the same result using REGRESSION.  If the two groups are coded 0 and 1, the constant will be equal to the mean for the group coded 0, and the other coefficient (the "slope") will be the Group 1 - Group 0 difference.  The t-test on the slope will be equivalent to the t-test obtained by the usual methods.  And the F-test in the ANOVA summary table for the regression = t-squared.  (Open a data set, and try it.)

What all of this illustrates is that the t-test, ANOVA and OLS linear regression are all special cases of the general linear model.  There is an argument that if all of these statistical techniques were being developed now (i.e., in the age of personal computers and stats packages), we probably would not have all of those special cases.  They arose because someone worked out that in this special case, the formula can be simplified.  (The same argument applies to special cases of Pearson r such as the phi-coefficient, point-biserial, etc.)


Marta García-Granero-2 wrote
Hi:

If the homogeneity of variances condition is fulfilled, then the t test
and the ANOVA are the same (as a matter of fact t^2=F). If HOV fails,
then you have to use Welch test (SPSS gives it with the name"homogeneity
of variances not assumed"), and the classic ANOVA is not valid (although
Brown-Forsythe or Welch ANOVA are).

A t test has the advantage of offering as standard output the 95%CI for
the means difference, while ANOVA does not. Confidence intervals should
always be reported, not only p values.

HTH,
Marta GG

El 05/10/2011 8:49, DorraJ Oet escribió:
> Hi Anthony,
>
> I suppose that the T-test that you had mentioned is 2 independent
> samples T-test.
>
> I had read before that you can use ANOVA for 2 means comparison in
> place of a 2 independent samples T-Test. However, I am not sure if
> this will cause any serious effect to the results. What I can suggest
> is that to do a 2 independent samples T-test and ANOVA on the same set
> of variables and see if the Statistics output are the same. I am sorry
> that I could not test this out for you because I do not have an SPSS
> on hand at the moment.
>
> Do be careful when you use means comparison. It is not necessary that
> a 2 independent samples T-test applies in all situation. If you are
> doing a means comparison for a before-after scenario, a Paired Sample
> T-test is more applicable.
>
> Warmest Regards
> Dorraj Oet
>
> ------------------------------------------------------------------------
> Date: Wed, 5 Oct 2011 12:24:28 +0800
> From: [hidden email]
> Subject: ANOVA Vs t-test
> To: [hidden email]
>
> Dear Colleagues,
> What happens if ANOVA is used instead of t-test when there are two
> means to compare?
> Does ANOVA seriousely affect the results?
> Why not using ANOVA instead of t-test all the time?
> Cheers
> Anthony
>
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

David Marso
Administrator
Y=X*B+E=Yhat+Ehat=X*Bhat+Ehat
Yhat=X*Bhat=X*[X'Y*(X'X)**(-1)] in the OLS case!
ANOVA, Regression, t test .... all special cases of the GLM!!!

Bruce Weaver wrote
Adding to Marta's comments, for the equal variances version of the t-test (or one-way ANOVA), you can also obtain exactly the same result using REGRESSION.  If the two groups are coded 0 and 1, the constant will be equal to the mean for the group coded 0, and the other coefficient (the "slope") will be the Group 1 - Group 0 difference.  The t-test on the slope will be equivalent to the t-test obtained by the usual methods.  And the F-test in the ANOVA summary table for the regression = t-squared.  (Open a data set, and try it.)

What all of this illustrates is that the t-test, ANOVA and OLS linear regression are all special cases of the general linear model.  There is an argument that if all of these statistical techniques were being developed now (i.e., in the age of personal computers and stats packages), we probably would not have all of those special cases.  They arose because someone worked out that in this special case, the formula can be simplified.  (The same argument applies to special cases of Pearson r such as the phi-coefficient, point-biserial, etc.)


Marta García-Granero-2 wrote
Hi:

If the homogeneity of variances condition is fulfilled, then the t test
and the ANOVA are the same (as a matter of fact t^2=F). If HOV fails,
then you have to use Welch test (SPSS gives it with the name"homogeneity
of variances not assumed"), and the classic ANOVA is not valid (although
Brown-Forsythe or Welch ANOVA are).

A t test has the advantage of offering as standard output the 95%CI for
the means difference, while ANOVA does not. Confidence intervals should
always be reported, not only p values.

HTH,
Marta GG

El 05/10/2011 8:49, DorraJ Oet escribió:
> Hi Anthony,
>
> I suppose that the T-test that you had mentioned is 2 independent
> samples T-test.
>
> I had read before that you can use ANOVA for 2 means comparison in
> place of a 2 independent samples T-Test. However, I am not sure if
> this will cause any serious effect to the results. What I can suggest
> is that to do a 2 independent samples T-test and ANOVA on the same set
> of variables and see if the Statistics output are the same. I am sorry
> that I could not test this out for you because I do not have an SPSS
> on hand at the moment.
>
> Do be careful when you use means comparison. It is not necessary that
> a 2 independent samples T-test applies in all situation. If you are
> doing a means comparison for a before-after scenario, a Paired Sample
> T-test is more applicable.
>
> Warmest Regards
> Dorraj Oet
>
> ------------------------------------------------------------------------
> Date: Wed, 5 Oct 2011 12:24:28 +0800
> From: [hidden email]
> Subject: ANOVA Vs t-test
> To: [hidden email]
>
> Dear Colleagues,
> What happens if ANOVA is used instead of t-test when there are two
> means to compare?
> Does ANOVA seriousely affect the results?
> Why not using ANOVA instead of t-test all the time?
> Cheers
> Anthony
>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Rich Ulrich
In reply to this post by Marta Garcia-Granero
Once upon a time, I looked into the literature to find recommendations
for when to use the pooled estimate, versus when to use a Welch-correction.

Sources did not agree on everything, but they did agree that it was
*wrong*  to use the test on homogeneity as a qualifying test for
which test to use.  It was bad theory; it would not, particularly, lead
to good results.  Unequal variances being observed *should*  cause
you to ask new questions about the data.

"Homogeneity not *assumed*"   is the proper qualifier.  What do you
assume? and why?   If you have always assumed those variances would
be unequal, then it is "assumed".  If you assume it because the measure
ought to be transformed (like, taking the log or square root), then you
should transform it before testing. If you are testing a dichotomy or
something measured in ranks, then "pooled" is appropriate since the
variance is "fixed" by the scaling.

The pooled t-test is exactly the square root of the F, whether or not
the variances are homogeneous. 

Which t-test is used makes very little practical difference when the Ns
are equal.

--
Rich Ulrich

Date: Wed, 5 Oct 2011 11:44:46 +0200
From: [hidden email]
Subject: Re: ANOVA Vs t-test
To: [hidden email]

Hi:

If the homogeneity of variances condition is fulfilled, then the t test and the ANOVA are the same (as a matter of fact t^2=F). If HOV fails, then you have to use Welch test (SPSS gives it with the name"homogeneity of variances not assumed"), and the classic ANOVA is not valid (although Brown-Forsythe or Welch ANOVA are).

A t test has the advantage of offering as standard output the 95%CI for the means difference, while ANOVA does not. Confidence intervals should always be reported, not only p values.
[snip, previous]
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Bruce Weaver
Administrator
Re testing for homogeneity of variance, I am reminded of this nice quote from George Box:

“To make the preliminary test on variances [before running a t-test or ANOVA] is rather like putting to sea in a rowing boat to find out whether conditions are sufficiently calm for an ocean liner to leave port!” (Biometrika 1953;40:318–35)

I also like Rich's clarification that whether or not the variances are homogeneous, t^2 = F when one uses the ordinary (pooled variances) versions of both tests.

And finally, Rich's last point about the case of equal sample sizes reminds me of Table 2 in the well-known article by Glass, Peckham & Sanders (1972).  One row shows the actual Type I error rates for ratios of variances ranging from 1 to nearly infinite (with the nominal alpha set to .05).

V1/V2    Actual alpha
  1             .050
  2             .051
  5             .058
 10            .063
infinity       .072

The usual rule of thumb I'm familiar with is that if the ratio of variances is no more than 4 or 5 (when the sample sizes are equal), the t-test (or ANOVA) will be pretty good.  This table suggests that even at a ratio of 10, it's not too bad.  No doubt, Levene's test would be significant in some if not all of these cases.

The other thing shown by Table 2 from Glass et al. is that the t-test (or ANOVA) can be either too liberal or too conservative when there is heterogeneity of variance combined with unequal sample sizes.  When there is a positive relationship between sample size and variance (i.e., larger variance goes with larger sample size), the t-test becomes increasingly conservative as the variance ratio increases.  E.g., when the ratio of variances and ratio of sample sizes are both equal to 5, and the larger variance is associated with larger sample size, the actual Type I error rate (with alpha set to .05) is about .002.  If the larger variance is associated with the smaller sample size, on the other hand, the actual Type I error rate is about .22.


Rich Ulrich-2 wrote
Once upon a time, I looked into the literature to find recommendations
for when to use the pooled estimate, versus when to use a Welch-correction.

Sources did not agree on everything, but they did agree that it was
*wrong*  to use the test on homogeneity as a qualifying test for
which test to use.  It was bad theory; it would not, particularly, lead
to good results.  Unequal variances being observed *should*  cause
you to ask new questions about the data.

"Homogeneity not *assumed*"   is the proper qualifier.  What do you
assume? and why?   If you have always assumed those variances would
be unequal, then it is "assumed".  If you assume it because the measure
ought to be transformed (like, taking the log or square root), then you
should transform it before testing. If you are testing a dichotomy or
something measured in ranks, then "pooled" is appropriate since the
variance is "fixed" by the scaling.

The pooled t-test is exactly the square root of the F, whether or not
the variances are homogeneous.  

Which t-test is used makes very little practical difference when the Ns
are equal.

--
Rich Ulrich
Date: Wed, 5 Oct 2011 11:44:46 +0200
From: [hidden email]
Subject: Re: ANOVA Vs t-test
To: [hidden email]


 


   
 
 
    Hi:

   

    If the homogeneity of variances condition is fulfilled, then the t
    test and the ANOVA are the same (as a matter of fact t^2=F). If HOV
    fails, then you have to use Welch test (SPSS gives it with the
    name"homogeneity of variances not assumed"), and the classic ANOVA
    is not valid (although Brown-Forsythe or Welch ANOVA are).

   

    A t test has the advantage of offering as standard output the 95%CI
    for the means difference, while ANOVA does not. Confidence intervals
    should always be reported, not only p values.

    [snip, previous]
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: ANOVA Vs t-test

Ryan
In reply to this post by David Marso
For those interested, a linear mixed model can be thought of as an
extension of linear regression as demonstrated by:

B_hat = (((X')*(V_hat**(-1))*X)**(-1))*(X')*(V_hat**(-1))*Y

V_hat = the estimated variance-covariance matrix of Y

If we remove V_hat, we end up right back at the linear regression equation:

B_hat = (X'X)**(-1))*X'Y

Ryan

On Wed, Oct 5, 2011 at 10:14 AM, David Marso <[hidden email]> wrote:

> Y=X*B+E=Yhat+Ehat=X*Bhat+Ehat
> Yhat=X*Bhat=X*[X'Y*(X'X)**(-1)] in the OLS case!
> ANOVA, Regression, t test .... all special cases of the GLM!!!
>
>
> Bruce Weaver wrote:
>>
>> Adding to Marta's comments, for the equal variances version of the t-test
>> (or one-way ANOVA), you can also obtain exactly the same result using
>> REGRESSION.  If the two groups are coded 0 and 1, the constant will be
>> equal to the mean for the group coded 0, and the other coefficient (the
>> "slope") will be the Group 1 - Group 0 difference.  The t-test on the
>> slope will be equivalent to the t-test obtained by the usual methods.  And
>> the F-test in the ANOVA summary table for the regression = t-squared.
>> (Open a data set, and try it.)
>>
>> What all of this illustrates is that the t-test, ANOVA and OLS linear
>> regression are all special cases of the general linear model.  There is an
>> argument that if all of these statistical techniques were being developed
>> now (i.e., in the age of personal computers and stats packages), we
>> probably would not have all of those special cases.  They arose because
>> someone worked out that in this special case, the formula can be
>> simplified.  (The same argument applies to special cases of Pearson r such
>> as the phi-coefficient, point-biserial, etc.)
>>
>>
>>
>> Marta García-Granero-2 wrote:
>>>
>>> Hi:
>>>
>>> If the homogeneity of variances condition is fulfilled, then the t test
>>> and the ANOVA are the same (as a matter of fact t^2=F). If HOV fails,
>>> then you have to use Welch test (SPSS gives it with the name"homogeneity
>>> of variances not assumed"), and the classic ANOVA is not valid (although
>>> Brown-Forsythe or Welch ANOVA are).
>>>
>>> A t test has the advantage of offering as standard output the 95%CI for
>>> the means difference, while ANOVA does not. Confidence intervals should
>>> always be reported, not only p values.
>>>
>>> HTH,
>>> Marta GG
>>>
>>> El 05/10/2011 8:49, DorraJ Oet escribió:
>>>> Hi Anthony,
>>>>
>>>> I suppose that the T-test that you had mentioned is 2 independent
>>>> samples T-test.
>>>>
>>>> I had read before that you can use ANOVA for 2 means comparison in
>>>> place of a 2 independent samples T-Test. However, I am not sure if
>>>> this will cause any serious effect to the results. What I can suggest
>>>> is that to do a 2 independent samples T-test and ANOVA on the same set
>>>> of variables and see if the Statistics output are the same. I am sorry
>>>> that I could not test this out for you because I do not have an SPSS
>>>> on hand at the moment.
>>>>
>>>> Do be careful when you use means comparison. It is not necessary that
>>>> a 2 independent samples T-test applies in all situation. If you are
>>>> doing a means comparison for a before-after scenario, a Paired Sample
>>>> T-test is more applicable.
>>>>
>>>> Warmest Regards
>>>> Dorraj Oet
>>>>
>>>> ------------------------------------------------------------------------
>>>> Date: Wed, 5 Oct 2011 12:24:28 +0800
>>>> From: luckyantonio2003@
>>>> Subject: ANOVA Vs t-test
>>>> To: SPSSX-L@.UGA
>>>>
>>>> Dear Colleagues,
>>>> What happens if ANOVA is used instead of t-test when there are two
>>>> means to compare?
>>>> Does ANOVA seriousely affect the results?
>>>> Why not using ANOVA instead of t-test all the time?
>>>> Cheers
>>>> Anthony
>>>>
>>>
>>
>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/ANOVA-Vs-t-test-tp4871521p4872848.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Sample size for Mediation Analysis

E. Bernardo
Dear members,
 
Please share your thoughts about sample size requirement on Mediation Analysis.  I have only one IV, one Mediator M, and one DV. My variables are continuous and not latent.
 
Thanks for any input.
 
Eins
Reply | Threaded
Open this post in threaded view
|

Automatic reply: Sample size for Mediation Analysis

Tierney, Mary Lou

I will be out of the office Friday, 7 October .  I will have limited BlackBerry access.

 

For assistance with Idea Market please contact the [hidden email].

 

For assistance with other Innovation Zone sites, please contact [hidden email].

 

Regards, Mary Lou

 

 

For assistance with Idea Market please contact the [hidden email].

 

For assistance with other Innovation Zone sites, please contact [hidden email].

 

Regards, Mary Lou

 

Reply | Threaded
Open this post in threaded view
|

Re: Sample size for Mediation Analysis

David Marso
Administrator
In reply to this post by E. Bernardo
Eins,
Please begin a *NEW* thread rather than changing the subject line on an old thread!
Thank You
Eins Bernardo wrote
Dear members,
 
Please share your thoughts about sample size requirement on Mediation Analysis.  I have only one IV, one Mediator M, and one DV. My variables are continuous and not latent.
 
Thanks for any input.
 
Eins
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Sample size for MeDiation Analysis

Rich Ulrich
In reply to this post by E. Bernardo
I suspect that Mediation Analysis means different things in different places, but
here is what Google give me, near the top -

**** from  http://www.public.asu.edu/~davidpm/ripl/q&a.htm#q2
Q.
  How do I conduct a mediation analysis?
A.  Mediation analysis uses the estimates and standard errors from the following regression equations (MacKinnon, 1994):
 
 
Y = c X + e
M = a X + e
Y = c' X + bM + e3
The independent variable (X) causes the outcome variable (Y)
The independent variable (X) causes the mediator variable (M)
The mediator (M) causes the outcome variable (Y) when controlling for the independent variable (X). This must be true.
If the effect of X on Y is zero when the mediator is included (c' = 0), there is evidence for mediation (Judd & Kenny, 1981a, 1981b). This would be full mediation.
If the effect of X on Y is reduced when the mEdiator is included (c' < c), then the direct effect is said to be partially mediated.
[snip]
****[see the site for more discussion, and references]

I think this is going to take a larger N than you expect, though I can't offer
a rigorous analysis of what it actually needs.  I would probably try bootstrap
solutions, starting from the additional equations at that page.

By this source, the analysis requires a significant correlation between M and Y,
even after partialing out X, where X is correlated significantly with both.

So as the crudest starting point, you can do ="font-size: 12pt;" size="3">
of Y with both X and M, and X with M.  But if M is going to remain
significant as a predictor, I suspect that it might a useful guideline to
do the initial power analysis for M predicting Y while using a test size
of 0.001 instead of the eventual 0.05 test.  Or do the power analysis for
0.05 and then multiply the resulting N by 4, in order to compensate for
the covariate cutting the coefficient in half.

--
Rich Ulrich


Date: Fri, 7 Oct 2011 18:15:55 +0800
From: [hidden email]
Subject: Sample size for Mediation Analysis
To: [hidden email]

Dear members,
 
Please share your thoughts about sample size requirement on Mediation Analysis.  I have only one IV, one Mediator M, and one DV. My variables are continuous and not latent.
 
Thanks for any input.
 
Eins