Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How does matlab handle the poisson distribution parameters?

34 views
Skip to first unread message

Grant

unread,
Jul 26, 2009, 10:45:03 PM7/26/09
to
I'm working on a simulation for a neural network with population codes, and the initial activity of neurons is dictated by a poisson distribution.

The lambda value is a function, f(x), and the k value is activity of a specific neuron.

But, the poissrnd function in matlab only takes lambda as a parameter, so I can only give it poissrnd(f(x)). How can I get it to use the k value I want so the distribution is P(lambda, k) = (lambda^k * exp(-lambda))/k! as the poisson distribution should be?

Does matlab use a default value for k?

Lorenzo Guerrasio

unread,
Jul 27, 2009, 3:10:04 AM7/27/09
to
"Grant " <kuroe...@hotmail.com> wrote in message <h4j4bf$oa0$1...@fred.mathworks.com>...

You don't need to change K,because K represents the value of the occurence. For the function poissonrnd,you can decide the number of sample that you take from the poisson distribution.
In other words, K is always 1:1:N, once you decide lambda you can compute the probability of each descrete occurence K.

Peter Perkins

unread,
Jul 27, 2009, 11:15:22 AM7/27/09
to

Grant, the Poisson distribution only has one parameter. Lorenzo's post may have solved your problem, or you may have to explain what you mean by "k". Perhaps you are talking about some generalization of the Poisson?

Tom Lane

unread,
Jul 27, 2009, 11:31:48 AM7/27/09
to
>> But, the poissrnd function in matlab only takes lambda as a parameter, so
>> I can only give it poissrnd(f(x)). How can I get it to use the k value I
>> want so the distribution is P(lambda, k) = (lambda^k * exp(-lambda))/k!
>> as the poisson distribution should be?
>>
>> Does matlab use a default value for k?
>
> Grant, the Poisson distribution only has one parameter. Lorenzo's post
> may have solved your problem, or you may have to explain what you mean by
> "k". Perhaps you are talking about some generalization of the Poisson?

The expression you wrote is the probability function evaluated at k for a
given lambda. So k in that formula is analogous to the output from poissrnd.
You don't supply that value when you generate random numbers.

-- Tom


0 new messages