s-news
[Top] [All Lists]

Re: hist and probability=T

To: Vincent.Furstoss@lusignan.inra.fr
Subject: Re: hist and probability=T
From: David L Lorenz <lorenz@usgs.gov>
Date: Thu, 4 Sep 2008 07:39:42 -0500
Cc: snews <s-news@lists.biostat.wustl.edu>, s-news-owner@lists.biostat.wustl.edu
In-reply-to: <48BFB726.3020107@lusignan.inra.fr>

Vincent,
  They are probability densities. For the first one, the gap is 0.05, so the sum of the counts times the gap is equal to one. For the second one, the gap is 5, so the densities are much smaller. Try varying the number of classes to see the effect on counts when probability=T.
Dave



Furstoss <Vincent.Furstoss@lusignan.inra.fr>
Sent by: s-news-owner@lists.biostat.wustl.edu

09/04/2008 05:23 AM
Please respond to
Vincent.Furstoss@lusignan.inra.fr

To
snews <s-news@lists.biostat.wustl.edu>
cc
Subject
[S] hist and probability=T





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


--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

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