1

I am new with poisson point process. I did one simluation (matlab) as below. My intensity lambda = 50;

clear all;
lambda=50;
 npoints = poissrnd(lambda);
  pproc = rand(npoints, 2);
  plot(pproc(:, 1), pproc(:, 2), '.');

Then I have plot, enter image description here

However, the link

http://connor-johnson.com/2014/02/25/spatial-point-processes/

showed me that when intensity lamuda = 0.2, smaller than 1 , he got

enter image description here

The link also showed the code in Python.Please check it.

Here is my question, why intensity is smaller than 1, he still can plot something here? If I let my code's lamda = 0.2, there will be no value to plot. I think I miss something about Poisson point process? or it's a programming problem? I want to simulate this lambda = 0.2 in matlab.

Thank you so much for your help.

total lambda = 0.4. I want to have 100 unit. This means unit intensity = 0.4 * 100 = 40. thank you so much.

 la=0.4;
 lala=0.4*100;
  npoints = poissrnd(lala);

  pproc = rand(npoints, 2);

  plot(pproc(:, 1).*100, pproc(:, 2).*100, '.');

enter image description here

sunson29
  • 43
  • 1
  • 9
  • 1
    Yes, there's a misunderstanding of the math. Look at the example more closely: the *rate of events per unit time per unit area* is 0.2, but lambda (the argument to the `poisson` function) is not 0.2. Your code only considers *one unit of area*, which will *usually* get zero events per unit time (but sometimes 1 or more). This isn't really a programming problem (thus I'm not leaving this as an Answer) – Lack Jan 14 '15 at 07:03
  • 1
    Note that you're just plotting a uniform distribution; the Poisson distribution is only used once to get a number of points. Edit: the author does point out, "the only thing Poisson about this is the number of points." – Lack Jan 14 '15 at 07:11
  • @Lack But a Poisson point process is just that: a Poisson number of points with uniform spatial distribution – Luis Mendo Jan 14 '15 at 09:44
  • @LuisMendo What do you mean by "Poisson number"? Is there some "Poissonness" that sticks around with `npoints` after is assigned? ;-) – Lack Jan 14 '15 at 14:53
  • @Lack Thanks for your reply. Yes, you are right. I go zero events per unit time. that's why I can not have the figure. Could you please give me more detail about this? and How can I fix it for intensity smaller than 1? If there is a related link, it will be helpful. I am still learning PPP now. Thank you so much. – sunson29 Jan 14 '15 at 15:41
  • @Lack Dear Lack, I just edit my question. Could you please check the code for me very quick. It's short. Thank you so much. – sunson29 Jan 14 '15 at 15:58
  • @LuisMendo Hey, bro. I just re-edit. I think Lack is right. Please check it. – sunson29 Jan 14 '15 at 17:26

2 Answers2

2

I think your solution should be following. (Note : Two different methods of drawing PPP spatial distribution)

clear all;
clc;
close all;

lambda=50;

%Method 1
pproc  = poissrnd(lambda, 100, 2);
size(pproc)
plot(pproc(:, 1), pproc(:, 2), '.');
title('Poisson with poissrnd')

%Method 2
pproc2 = random('Poisson', lambda, 100, 2);
size(pproc2)
figure;
plot(pproc2(:, 1), pproc2(:, 2), '.');
title('Poisson with Random statement')
SJa
  • 487
  • 4
  • 14
1

total lambda = 0.4. I want to have 100 unit. This means unit intensity = 0.4 * 100 = 40. thank you so much.

 la=0.4;
 lala=0.4*100;
  npoints = poissrnd(lala);

  pproc = rand(npoints, 2);

  plot(pproc(:, 1).*100, pproc(:, 2).*100, '.');

Please check the figure in my question at the end.

sunson29
  • 43
  • 1
  • 9