comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: idl bimodal distribution
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: idl bimodal distribution [message #73562] Fri, 19 November 2010 10:32 Go to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 19, 4:24 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Nov 19, 4:14 pm, Ana <u...@compgroups.net/> wrote:
>
>> I'm trying to simulate a bimodal "randomn" distribution with the 2 peaks having the sigmas of 0.3 each for example and mean around -1.2 and -0.7...
>> Do you have any tips?
>
>> I've tried adding these below, but it doesn't work..., I get a unimodal distribution...
>> met_1a = randomn(seed,100000)*0.3-1.2
>> met_1b = randomn(seed,100000)*0.3-0.7
>
>> Can someone help?
>
> Maybe I misunderstood it, but is this not a result of the central
> limit theorem?

If you want two peaks, it seems that you want the concatenation, not
the addition of the two distributions. Still, the distance between the
peaks will have to be large compared to the sum of their standard
deviations.
Re: idl bimodal distribution [message #73563 is a reply to message #73562] Fri, 19 November 2010 10:24 Go to previous messageGo to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 19, 4:14 pm, Ana <u...@compgroups.net/> wrote:
> I'm trying to simulate a bimodal "randomn" distribution with the 2 peaks having the sigmas of 0.3 each for example and mean around -1.2 and -0.7...
> Do you have any tips?
>
> I've tried adding these below, but it doesn't work..., I get a unimodal distribution...
> met_1a = randomn(seed,100000)*0.3-1.2
> met_1b = randomn(seed,100000)*0.3-0.7
>
> Can someone help?

Maybe I misunderstood it, but is this not a result of the central
limit theorem?
Re: idl bimodal distribution [message #73706 is a reply to message #73562] Fri, 19 November 2010 15:42 Go to previous message
Robin Wilson is currently offline  Robin Wilson
Messages: 40
Registered: August 2010
Member
On 19/11/2010 18:32, Paulo Penteado wrote:
>>> I've tried adding these below, but it doesn't work..., I get a unimodal distribution...
>>> met_1a = randomn(seed,100000)*0.3-1.2
>>> met_1b = randomn(seed,100000)*0.3-0.7

Just to complete the answer with an example. You could concatenate those
arrays by doing:

bimodal_dist = [met_1a, met_1b]

As Paula stated, you may need a larger distance between your peaks to
get a noticeably bimodal distribution.

Best regards,

Robin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 8.0.1 patch question: !version.release
Next Topic: tvim color

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:10:36 PDT 2025

Total time taken to generate the page: 0.00580 seconds