472,992 Members | 3,704 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

How can I get a number meet the Poisson Distribution

hello all:
I have to program a function which can produce a Poisson
Distribution number,I have no idea about it,
anyone who can give some suggestions? thanks!

Nov 13 '07 #1
4 2686
On Tue, 13 Nov 2007 04:00:34 -0800, cr4kb0y <zy******@126.comwrote:
I have to program a function which can produce a Poisson
Distribution number,I have no idea about it,
anyone who can give some suggestions? thanks!
Have you looked on Wikipedia? They might be able to help with your
homework.
--
PGP key ID 0xEB7180EC
Nov 13 '07 #2
On Nov 13, 5:00 pm, cr4kb0y <zyfri...@126.comwrote:
hello all:
I have to program a function which can produce a Poisson
Distribution number,I have no idea about it,
anyone who can give some suggestions? thanks!
use gsl GNU Scientific Library it has function that can generate a
variety of random numbers

"unsigned int gsl_ran_poisson (const gsl rng * r, double mu)"

regards,
Udai.
http://s.udaykiran.googlepages.com
Nov 13 '07 #3
cr4kb0y wrote:
hello all:
I have to program a function which can produce a Poisson
Distribution number,I have no idea about it,
anyone who can give some suggestions? thanks!
<ot>
here's a hint for a recursive form:
freq(0, lambda) = exp(-lambda)
freq(n, lambda) = freq(n-1, lambda) * lambda / n
</ot>

Nov 13 '07 #4
On Tue, 13 Nov 2007 04:00:34 -0800, in comp.lang.c , cr4kb0y
<zy******@126.comwrote:
>hello all:
I have to program a function which can produce a Poisson
Distribution number,I have no idea about it,
anyone who can give some suggestions?
This is an algorithms question.
First understand the algorithm - a decent textbook will help with
that.
Then write some code.
Then ask again here if your code doesn't work.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rob | last post by:
Hi, I need to get some idea about poisson process to make a simulator, does anyone know where I can get an example code for poisson process? Thanks for any help in advance-Rob
3
by: Tan Thuan Seah | last post by:
Hi all, I am looking for a way to generate a random number given the variance of a gaussian distribution(or normal distribution). The mean is 0 but the variance will be a user input. Does C++...
73
by: cesco | last post by:
I have to generate a list of N random numbers (integer) whose sum is equal to M. If, for example, I have to generate 5 random numbers whose sum is 50 a possible solution could be . Is there a...
2
by: Ardeshir | last post by:
I need help to generate Poisson random variable via Inverse Transform .
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.