s-news
[Top] [All Lists]

hist and probability=T

To: snews <s-news@lists.biostat.wustl.edu>
Subject: hist and probability=T
From: Furstoss <Vincent.Furstoss@lusignan.inra.fr>
Date: Thu, 04 Sep 2008 12:23:34 +0200
Organization: inra
Reply-to: Vincent.Furstoss@lusignan.inra.fr
User-agent: Thunderbird 2.0.0.6 (X11/20070802)
Dear Splus user,

I am working with Splus Version 6.2.1 for Sun SPARC, SunOS 5.8, 64-bit : 2004

and i am surprise with the results of the following command:

> hist(rnorm(20, mean=.5,sd=.1), probability=T, plot=F)
$breaks:
[1] 0.35 0.40 0.45 0.50 0.55 0.60

$counts:
[1] 2 5 3 7 3

why counts are not probabilities ?

When the variable to display doesn't range between 0 and 1, the results of counts
are probabilities:

>  hist(rnorm(20, mean=.5,sd=.1)*100, probability=T, plot=F)
$breaks:
[1] 30 35 40 45 50 55 60 65

$counts:
[1] 0.01 0.02 0.01 0.04 0.03 0.05 0.04

Is there good reason for this ?

Many thanks for your answers.



--

Vincent Furstoss



fax: 05 49 43 93 72
tel: 05 49 89 00 93



mailto:vincent.furstoss@lusignan.inra.fr



<Prev in Thread] Current Thread [Next in Thread>