Syntax to compute probability for a continuous distribution?

All:
I know this is a newbie question, but I’m struggling to find documentation and/or an example on how to do this. :frowning:

If I have a UniformDistribution[0,1] what is the syntax to compute the probability that P(U <= 2/3)?

From what I was able to find I think the command should be something like this:

PDF[UniformDistribution[{0,1}], {x, 2/3, 0}]

I’ve tried a number of variations of that to no avail so far. Can some one please give me a pointer to some documentation that describes how to calculate probabilities for uniform distributions and/or a few examples?

Many thanks!

Look up the Probability function:

Probability[u <= 2/3, Distributed[u, NormalDistribution[0, 1]]]

Gianluca:

Thank you very much! I’ll go read up on the documentation for each of those commands you utilized.

Also, I hope you have a good upcoming weekend. :slight_smile:

Thanks again!

Perhaps it would be simpler to use CDF[UniformDistribution[]]. This gives the cumulative distribution function (or, more concisely, the distribution function) of a uniform distribution in the range {0, 1}. The CDF at x is, by definition, the probability of obtaining a value less than or equal to x. Then,

In[5]:= CDF[UniformDistribution[], 2/3]

Out[5]= 2/3

I hope you’ll find this useful.

Tomas:

Thank you very much for the pointer. I’ll read up on the commands you utilized, and do some testing with the code.

I hope you have a good upcoming Memorial weekend. :slight_smile:

Nathan