help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between normal_rnd (m,v, n,n) and randn (n)


From: Henry F. Mollet
Subject: Re: Difference between normal_rnd (m,v, n,n) and randn (n)
Date: Thu, 04 Mar 2004 13:39:34 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

I have to check what exactly people say when they say that they use a
triangular distribution. I surmise that the probability density function in
the range [0,1] increases linearly from some value at 0 to a maximum at an
intermediate value (might be in the middle of the range) and then decreases
linearly to some value at 1.  I'll try to modify what you gave below to get
something that looks like a triangle. Thanks.
Henry


on 3/4/04 12:04 PM, Quentin Spencer at address@hidden wrote:

> Henry F. Mollet wrote:
> 
>> The only one I haven't found yet is a triangular distribution.
>>  
>> 
> Do you mean a distribution whose density is  f(x)=2x in the range [0,1]?
> This can be generated by taking the square root of a uniformly
> distributed random variable. To test this, try
> 
> N = some large number
> x = rand(1,N);
> hist(sqrt(x));
> 
> 
> -Quentin



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]