Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Question on Poisson distrbution

Subject: Question on Poisson distrbution

From: Ag

Date: 2 Apr, 2009 15:25:04

Message: 1 of 2

Dear people,

I am working with random variables and I want to generate random values with a Poisson distribution whose ranges are between 0.8 and 1 and with a mean distribution of 5.

I have tried the following line (10 values vector) but I am not sure if I it is the right line....

a=0.8 + (1-0.8) * poissrnd(5,1,10)


Can somebody tell me if I am commiting a mistake?

Thanks a lot for the help!!!


Ag

Subject: Question on Poisson distrbution

From: Roger Stafford

Date: 2 Apr, 2009 15:57:01

Message: 2 of 2

"Ag" <ag@gmail.com> wrote in message <gr2lcg$kg7$1@fred.mathworks.com>...
> .....
> I am working with random variables and I want to generate random values with a Poisson distribution whose ranges are between 0.8 and 1 and with a mean distribution of 5.
> ......
> a=0.8 + (1-0.8) * poissrnd(5,1,10)
> ......

  I believe you are confusing the notions of matlab's 'rand' function with those of 'poissrnd'. The output of 'rand' is essentially a continuous, uniform distribution on the interval [0,1], and when you write

 x = a + (b-a)*rand

you get a uniform distribution over the interval [a,b].

  No such result can be obtained from 'poissrnd' using such a computation. In the first place the poisson distribution is discrete with integer values, and in the second place it is unbounded. Like normal distributions, there is no limit to its possible size. The 'a' in your computation could very easily extend far beyond the interval [.8,1].

  You need to rethink what it is you wish to achieve.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us