473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2699
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.