All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Two Probability Distributions (Posted on 2021-06-21) Difficulty: 3 of 5
1. Devise an algorithm to generate uniformly distributed points on the surface of a sphere (i.e., so that no area has a higher expected concentration than any other of the same size). Positions can be referenced by latitude and longitude.

2. Say an event happens at 60 times per hour in a Poisson distribution (say customer arrivals in a store), so averaging also once per minute. Devise an algorithm to generate realistic arrival times for a one-hour period.

Note: Assume what's available is a uniformly distributed random real number generator on the interval (0,1).

See The Solution Submitted by Charlie    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
This should work for part 2 Comment 2 of 2 |
The parameter lambda of the Poisson distribution gives a probability distribution for the number of occurrences per unit time.  

Use a cumulative distribution to map an interval x=(0,1) to the number of occurrences n.  

Once you know how many occurrences there are, you can just randomly distribute each to the overall time interval.  Arrival time a(i)=(0,60) for each i from 1 to n.

https://towardsdatascience.com/the-poisson-distribution-and-poisson-process-explained-4e2cb17d459

You can use a uniform distribution to map to simulate any probability distribution.

  Posted by Jer on 2021-06-21 09:37:03
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information