Hi,
I am trying to use dunif and runif
however, I have two problems:
if I do
dunif(1:10, min=1, max=10)
I get 10 values, which summed give me 1.
I understand that the probability is computed as f(x) = 1 / (max-min)
but in this case it looks wrong: I have 10 values, each one
equiprobable, and
In short, the unif() distribution corresponds to the continuous
uniform distribution, not the discrete.
Longer: dDIST() doesn't give a pmf so summing it isn't what you are
looking for: it gives a pdf. For punif() consider P\{X = 1\} when X
is distributed on [1, 10]. Clearly this has probability
A point of clarification:
dDIST() sometimes gives a pmf, e.g., dpois(). But dunif() is a pdf.
Sorry for the typo.
Michael
On Mon, Nov 7, 2011 at 12:08 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
In short, the unif() distribution corresponds to the continuous
uniform
On Mon, Nov 7, 2011 at 8:49 AM, michele donato michele.don...@wayne.edu wrote:
Hi,
I am trying to use dunif and runif
however, I have two problems:
if I do
dunif(1:10, min=1, max=10)
I get 10 values, which summed give me 1.
I understand that the probability is computed as f(x) = 1 /
4 matches
Mail list logo