RE: [Rd] (PR#7225) propogation of rounding error for t.tests with unequal sample sizes (PR#7225)

From: Tucker-Kellogg, Gregory <Gregory.Tucker-Kellogg_at_mpi.com>
Date: Tue 14 Sep 2004 - 06:07:21 EST

My apologies for not including the transcript in the original message:

> xx <- rep(2.10,80)
> groups.balanced <- as.factor(c(rep("one",40),rep("two",40)))
> groups.unbalanced <- as.factor(c(rep("one",44),rep("two",36)))
> t.test(xx ~ groups.balanced)

        Welch Two Sample t-test

data: xx by groups.balanced
t = 0, df = 78, p-value = 1
alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval:
 -4.004247e-16 4.004247e-16
sample estimates:
mean in group one mean in group two

              2.1 2.1

> t.test(xx ~ groups.unbalanced)

        Welch Two Sample t-test

data: xx by groups.unbalanced
t = -4.1007, df = 54.298, p-value = 0.0001388 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval:
 -1.322366e-15 -4.539911e-16
sample estimates:
mean in group one mean in group two

              2.1 2.1

>-----Original Message-----
>From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk]
>Sent: Monday, September 13, 2004 4:04 PM
>To: Tucker-Kellogg, Gregory
>Cc: r-devel@stat.math.ethz.ch; R-bugs@biostat.ku.dk
>Subject: Re: [Rd] (PR#7225) propogation of rounding error for
>t.tests with unequal sample sizes (PR#7225)
>
>
>What are you seeing here? I get identical results in the two cases.
>
>On Mon, 13 Sep 2004 tucker@mpi.com wrote:
>
>>
>> # users would benefit from a warning about the behavior in the #
>> groups.unbalanced case below. A propogation of difference is the
>> variance # calculation is leading to an apparently significant
>> difference in # means, even though the numeric values are all
>> identical. Obviously upon # inspection the difference in means is
>> meaningless, but users might be warned # if all of the input data is
>> identical
>
>That's not so easy to achieve, given rounding error, but I am
>seeing 0 variance in both cases.
>
>> xx <- rep(2.10,80)
>>
>> groups.balanced <- as.factor(c(rep("one",40),rep("two",40)))
>> groups.unbalanced <- as.factor(c(rep("one",44),rep("two",36)))
>>
>> t.test(xx ~ groups.balanced)
>>
>> t.test(xx ~ groups.unbalanced)
>>
>>
>>
>> <<insert bug report here>>
>>
>>
>>
>> --please do not edit the information below--
>>
>> Version:
>> platform = sparc-sun-solaris2.8
>> arch = sparc
>> os = solaris2.8
>> system = sparc, solaris2.8
>> status =
>> major = 1
>> minor = 9.0
>> year = 2004
>> month = 04
>> day = 12
>> language = R
>>
>> Search Path:
>> .GlobalEnv, package:methods, package:stats, package:graphics,
>> package:utils, Autoloads, package:base
>>
>>
>>
>> This e-mail, including any attachments, is a confidential business
>> communication, and may contain information that is confidential,
>> proprietary and/or privileged. This e-mail is intended only for the
>> individual(s) to whom it is addressed, and may not be saved, copied,
>> printed, disclosed or used by anyone else. If you are not the(an)
>> intended recipient, please immediately delete this e-mail from your
>> computer system and notify the sender. Thank you.
>>
>> ______________________________________________
>> R-devel@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>
>--
>Brian D. Ripley, ripley@stats.ox.ac.uk
>Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>University of Oxford, Tel: +44 1865 272861 (self)
>1 South Parks Road, +44 1865 272866 (PA)
>Oxford OX1 3TG, UK Fax: +44 1865 272595
>
>

This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Sep 14 06:11:09 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:00:17 EST