Simulate the throwing of the darts and printout the approximate value of pi computed for various iterations
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Simulate the throwing of the darts and printout the approximate value of pi computed for various iterations

1. Computing Π (Pi) probablistically

Think of a square, with sides = 2, centered at the origin with a circle inscribed within the square. If you throw N darts that land in the square, some of them, M, will land inside of the circle. Since the area of the circle is pi r2 ( which is pi since r = 1) and the area of the square is 4, the ratio of the circle's area to the square's area is pi/4. M/N should approximate pi/4, so 4M/N should approximate pi.

Simulate the throwing of the darts and printout the approximate value of pi computed for various iterations such as 1000, 10,000, 100,000, 1,000,000 and 100,000,000 (if time allows (it should)).

Hint
Mathematics"A probability distribution represents an upsetting abstract object. For one to overtly detail a probability distribution totally there must be specification of probability allocated to every ambient (σ-algebra) element. This is practically impossible even in simple cases. Practically, probability distributions acquire implicit definition within their computational consequences."...

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.