Join Peggy Fisher for an in-depth discussion in this video Random number generator, part of Java Essential Training for Students.
- View Offline
- Exercise Files
- Another common simulation technique…is referred to as the Monte Carlo simulation.…A Monte Carlo simulation is a way…of approximating the value of a function…where calculating the actual value…is difficult or impossible.…It uses random sampling to define constraints on the value,…and then makes a sort of "best guess".…Monte Carlo methods vary,…but tend to follow a particular pattern.…First, define a domain of possible inputs.…Then, generate inputs randomly…from a probability distribution over the domain.…
Third, perform a deterministic computation on the inputs.…And, finally, aggregate the results.…A simple Monte Carlo simulation can be used…to calculate the value of PI,…or to approximate the value of PI.…If you had a circle and a square,…where the length of a side of the square…was the same as the diameter of the circle,…the ratio of the area of the circle…to the area of the square would be PI over four.…So, if you put this circle inside the square…and select many random points inside the square,…the number of points that fall inside the circle…
- Getting started with parsing
- Reviewing data types
- Using decisions
- Creating user-defined methods
- Command-line debugging
- Exploring the Java API
- Creating and instantiating classes
- Working with interfaces
- Storing items with arrays
Skill Level Intermediate
1. Command Level Programming
2. Basics Review
4. Java API
5. Simulations and Algorithm Analysis
6. Classes and Objects
7. More on Classes
8. Data Structures
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.