Generate random numbers obeying poisson distribution

hi,
can anyone help me to write a program to generate random numbers obeying poisson distribution with mean 4?
Please read tips for efficient and successful posting and posting code

ROOT Version: 6
Platform: Not Provided
Compiler: Not Provided


Hi,

        TRandom3 r;
        for (unsigned short i=1; i<=100; ++i)
                printf("Random number %i was generated\n", r.Poisson(4));

1 Like

thanks yus