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.)
A note and solution to 1. | Comment 1 of 2
A single uniform distribution on (0,1) can stand in for any number of uniform distributions on any intervals.

To make one interval on (0,1) stand in for two: look at their decimal representations and separate the digits in even positions from those in odd positions.  0.51205783... becomes 0.5258... and 0.1073...

Changing the endpoints of the interval by addition or multiplication is simple.  

For part 1 lets make use of the fact that the sphere has the same surface area as the lateral surface of the circumscribed cylinder.  https://en.wikipedia.org/wiki/Sphere#Surface_area
The net of this surface is a rectangle with width 2pi*r and height 2*r.
We can get Longitude with the interval E=(-180,180)
If  x=(-1,1) then N=arcsin(x) is the Latitude


  Posted by Jer on 2021-06-21 09:19:58
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 (2)
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