# [R] Problem

Jonathan Baron baron at cattell.psych.upenn.edu
Wed May 22 22:28:52 CEST 2002

```On 05/22/02 21:35, Ambrosini Alessandro wrote:
>Hello. I don't know if you can help me but I try.
>I have a collection of objects, we suppose that they are 1000. After some
>works that I made I divided this collection in some clusters. Suppose to
>have obtained 50 clusters. For each cluster I found a particular value
>called Precision, where 0<Precision<1.
>Taken the firs cluster I want to compare his Precision with the precision of
>his complement that his obtained by the union of the remainder clusters.

So you want to compare two numbers.  Without some estimate of the
error of each number, I don't see how you can do this.  I am
assuming that the "precision of the complement" is one number.

[If it is actually 49 numbers, then you can (in principle) use a
t test, or a z test, comparing one number to the mean of the 49,
if you are willing to use the standard deviation of the 49 to
estimate the error of the one (which seems reasonable).  But I
don't think you mean this, because, if you did, the mean
difference between each number and the mean of the 49 others
would be zero.]

>After this I want to take the second cluster and make the same thing
>comparing his precision with the precision of his complement. Take the third
>cluster and so on. I want to do this for each cluster.
>I want to use a test that compare the precision obtained for each cluster

I don't think you mean "each".

>with the precision of each complement. I want to know if the precision of
>the singolar clusters are significantly different respect the precision of
>the complement. I think that I have to make a vector with the precision of
>the clusters and a vector with the precision of the complement. Maybe I have
>to find the means of each vector and compare them. But wich is the test that
>I have to use? Is it a t-student? And wich command I have to use if I want
>to make this test?

Now it sounds more like you are comparing two numbers for each
cluster.  Its precision and the precision of its complement.  A t
test does sound reasonable.  But you want the matched-pairs
version.  So if you have two vectors - clusters and complements -
you say
t.test(clusters,complements,paired=T)
or, equivalently,
t.test(clusters-complements)
(except that one may be the reverse of the other - I never
remember which way the first one goes).

See the help for t.test.

Jon Baron
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```