Buying for a Team? Gift This Course
Wishlisted Wishlist

Please confirm that you want to add R Programming for Simulation and Monte Carlo Methods to your Wishlist.

Add to Wishlist

R Programming for Simulation and Monte Carlo Methods

Learn to program statistical applications and Monte Carlo simulations with numerous "real-life" cases and R software.
4.1 (62 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,487 students enrolled
Last updated 9/2015
$10 $70 86% off
3 days left at this price!
30-Day Money-Back Guarantee
  • 11.5 hours on-demand video
  • 2 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?

R Programming for Simulation and Monte Carlo Methods focuses on using R software to program probabilistic simulations, often called Monte Carlo Simulations. Typical simplified "real-world" examples include simulating the probabilities of a baseball player having a 'streak' of twenty sequential season games with 'hits-at-bat' or estimating the likely total number of taxicabs in a strange city when one observes a certain sequence of numbered cabs pass a particular street corner over a 60 minute period. In addition to detailing half a dozen (sometimes amusing) 'real-world' extended example applications, the course also explains in detail how to use existing R functions, and how to write your own R functions, to perform simulated inference estimates, including likelihoods and confidence intervals, and other cases of stochastic simulation. Techniques to use R to generate different characteristics of various families of random variables are explained in detail. The course teaches skills to implement various approaches to simulate continuous and discrete random variable probability distribution functions, parameter estimation, Monte-Carlo Integration, and variance reduction techniques. The course partially utilizes the Comprehensive R Archive Network (CRAN) spuRs package to demonstrate how to structure and write programs to accomplish mathematical and probabilistic simulations using R statistical software.

Who is the target audience?
  • You do NOT need to be experienced with R software and you do NOT need to be an experienced programmer.
  • Course is good for practicing quantitative analysis professionals.
  • Course is good for graduate students seeking research data and scenario analysis skills.
  • Anyone interested in learning more about programming statistical applications with R software would benefit from this course.
Students Who Viewed This Course Also Viewed
What Will I Learn?
Use R software to program probabilistic simulations, often called Monte Carlo simulations.
Use R software to program mathematical simulations and to create novel mathematical simulation functions.
Use existing R functions and understand how to write their own R functions to perform simulated inference estimates, including likelihoods and confidence intervals, and to model other cases of stochastic simulation.
Be able to generate different different families (and moments) of both discrete and continuous random variables.
Be able to simulate parameter estimation, Monte-Carlo Integration of both continuous and discrete functions, and variance reduction techniques.
View Curriculum
  • Students will need to install the popular no-cost R Console and RStudio software (instructions provided).
Curriculum For This Course
Expand All 107 Lectures Collapse All 107 Lectures 11:42:12
Review of Vectors, Matrices, Lists and Functions
13 Lectures 01:13:36

Install R and RStudio

Review: Vectors, Matrices, Lists (part 1)

Sequences and Replications (part 1)

Sort and Order

Creating a Matrix (part 1)

Using Matrices (part 2)

List Structures and Horsekicks (part 1)

Dpois() Function and Horsekicks (part 2)

Sampling from a Dataframe

Section 1 Exercises
Simulation Examples: Tossing a Coin
8 Lectures 58:12
R Expressions Exercises Answers (part 1)

R Expressions Exercises Answers (part 2)

Introduction to Simulation: A Game of Tossing a Coin (part 2)

Write a Simulation Function (part 1)

Write a Simulation Function (part 2)

Continue Coin Tossing Simulation (part 3)

Continue Coin Tossing Simulation (part 4)
Simulation Examples: Returning Checked Hats
7 Lectures 39:22

A random permutation is a random ordering of a set of objects, that is, a permutation-valued random variable. The use of random permutations is often fundamental to fields that use randomized algorithms such as coding theory, cryptography, and simulation. A good example of a random permutation is the shuffling of a deck of cards: this is ideally a random permutation of the 52 cards.

Preview 04:00

Random Permutations: Hat Problem (part 2 )

Random Permutations: Hat Problem (part 3)

Random Permutations: Hat Problem (part 4)

Random Permutations: Hat Problem (part 6)

Checking Hats Exercise
Simulation Examples: Collecting Baseball Cards and "Streaky" Behavior
11 Lectures 56:15
Solution to Checking Hats Exercise

Collecting Baseball Cards Simulation (part 1)

Collecting Baseball Cards Simulation (part 3)

Collecting Baseball Cards Simulation (part 4)

Collecting Quarters Exercise

Collecting State Quarters Exercise Solution

"Streaky" Baseball Batting Behavior (part 1)

"Streaky" Baseball Batting Behavior (part 2)

"Streaky" Baseball Batting Behavior (part 3)

"Streaky" Behavior Exercise
Monte Carlo Methods for Inference
12 Lectures 01:19:05
Solution to "Streaky" Behavior Exercise

Monte Carlo methods (or Monte Carlo experiments) are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. They are often used in physical and mathematical problems and are most useful when it is difficult or impossible to use other mathematical methods. Monte Carlo methods are mainly used in three distinct problem classes: optimization, numerical integration, and generating draws from a probability distribution.

Using Monte Carlo Simulation to Estimate Inference

Sleepless in Seattle (part 2)

Statistical inference is the process of deducing properties of an underlying distribution by analysis of data. Inferential statistical analysis infers properties about a population: this includes testing hypotheses and deriving estimates. The population is assumed to be larger than the observed data set; in other words, the observed data is assumed to be sampled from a larger population.

Applying Monte Carlo Methods to Inference (part 1)

Applying Monte Carlo Methods to Inference (part 2)

Applying Monte Carlo Methods to Inference (part 3)

Applying Monte Carlo Methods to Inference (part 4)

Applying Monte Carlo Methods to Inference (part 5)

Comparing Estimators: The Taxi Problem (part 1)

Comparing Estimators: The Taxi Problem (part 2)

Late to Class Again ? Exercise
Stochastic Simulation and Random Variable Generation
11 Lectures 01:13:50
Late to Class Again Exercise Solution

A stochastic simulation is a simulation that traces the evolution of variables that can change stochastically (randomly) with certain probabilities.

What is Stochastic Simulation ?

In probability and statistics, a probability distribution assigns a probability to each measurable subset of the possible outcomes of a random experiment, survey, or procedure of statistical inference. Examples are found in experiments whose sample space is non-numerical, where the distribution would be a categorical distribution; experiments whose sample space is encoded by discrete random variables, where the distribution can be specified by a probability mass function; and experiments with sample spaces encoded by continuous random variables, where the distribution can be specified by a probability density function. More complex experiments, such as those involving stochastic processes defined in continuous time, may demand the use of more general probability measures.

Simulation and Random Variable Generation (part 1)

Simulation and Random Variable Generation (part 2)

Simulation and Random Variable Generation (part 3)

Simulating Discrete Random Variables (part 2)

Simulating Discrete Random Variables (part 3)

The idea of the method is as follows: one starts with an initial guess which is reasonably close to the true root, then the function is approximated by its tangent line (which can be computed using the tools ofcalculus), and one computes the x-intercept of this tangent line (which is easily done with elementary algebra). This x-intercept will typically be a better approximation to the function's root than the original guess, and the method can be iterated.

Root Finding: Newton-Raphson Technique (part 1)

Root Finding: Newton-Raphson Technique (part 2)

Create Random Variables Exercise
Inverse and General Transforms
10 Lectures 01:02:54
Create Random Variables Exercise Solution (part 1)

Create Random Variables Exercise Solution (part 2)

Inverse transform sampling (also known as inversion sampling, the inverse probability integral transform, the inverse transformation method, Smirnov transform, golden rule,) is a basic method for pseudo-random number sampling, i.e. for generating sample numbers at random from any probability distribution given its cumulative distribution function (cdf).

The basic idea is to uniformly sample a number between 0 and 1, interpreted as a probability, and then return the largest number from the domain of the distribution such that . For example, imagine that is the standardnormal distribution (i.e. with mean 0, standard deviation 1). Then if we choose , we would return 0, because 50% of the probability of a normal distribution occurs in the region where . Similarly, if we choose , we would return 1.95996...; if we choose , we would return 2.5758...; if we choose , we would return 4.7534243...; if we choose , we would return 4.891638...; if we choose , we would return 8.1258906647...; if we choose , we would return 8.2095361516... etc. Essentially, we are randomly choosing a proportion of the area under the curve and returning the number in the domain such that exactly this proportion of the area occurs to the left of that number. Intuitively, we are unlikely to choose a number in the tails because there is very little area in them: We'd have to pick a number very close to 0 or 1.

Inverse Transforms (part 1)

Inverse Transforms (part 2)

General Transformations (part 1)

General Transformations (part 2)

In mathematics, rejection sampling is a basic technique used to generate observations from a distribution. It is also commonly called the acceptance-rejection method or "accept-reject algorithm" and is a type of Monte Carlo method. The method works for any distribution in with a density.

Rejection sampling is based on the observation that to sample a random variable one can sample uniformly from the region under the graph of its density function.

Preview 06:52

Accept-Reject Method (part 2)

Accept-Reject Methods (part 3)

Random Variable (Poisson) Exercise 2
1 page
Simulating Numerical Integration
12 Lectures 01:15:52
Random Variable Exercise Solution (part 1)

Random Variable Exercise Solution (part 2)

In numerical analysis, numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equations.

Introduction to Simulating Numerical Integration (part 1)

Introduction to Simulating Numerical Integration (part 2)

Simpson's Rule for Trapezoidal Approximation

Simulating Numerical Integration (part 1)

More on Simpson's Rule

Simpson's Rule with phi Functions

Phi Functions Exercises

Hit and Miss (part 1)

Hit and Miss (part 2)
Permutation Tests
6 Lectures 47:06
Phi Functions (Numerical Integration) Exercise Solution

In statistics, resampling is any of a variety of methods for doing one of the following:

  1. Estimating the precision of sample statistics (medians, variances, percentiles) by using subsets of available data (jackknifing) or drawing randomly with replacement from a set of data points (bootstrapping)
  2. Exchanging labels on data points when performing significance tests (permutation tests, also called exact tests, randomization tests, or re-randomization tests)
  3. Validating models by using random subsets (bootstrapping, cross validation)

Common resampling techniques include bootstrapping, jackknifing and permutation tests.

Permutation Tests on a Distribution: Chckwts Example (part 1)

Permutation Tests on a Distribution: Chckwts Example (part 2)

Permutation Tests on a Distribution: Chckwts Example (part 3)

Permutation Tests on a Distribution: Chckwts Example (part 4)

Finish Permutation Tests and an Exercise
Simulation Case Studies: Seed Dispersal
9 Lectures 01:12:45
Solution to Permutation Tests Exercises

Seed Dispersal Case: Creating Classes and Functions (part 1)

Seed Dispersal Case: Creating Classes and Functions (part 2)

Seed Dispersal Case (part 1)

Seed Dispersal Case (part 3)

Seed Dispersal Case (part 4)

Finish Seed Dispersal Case
1 More Section
About the Instructor
4.1 Average rating
1,056 Reviews
9,615 Students
27 Courses
Professor of Information Systems

Dr. Geoffrey Hubona held full-time tenure-track, and tenured, assistant and associate professor faculty positions at 3 major state universities in the Eastern United States from 1993-2010. In these positions, he taught dozens of various statistics, business information systems, and computer science courses to undergraduate, master's and Ph.D. students. He earned a Ph.D. in Business Administration (Information Systems and Computer Science) from the University of South Florida (USF) in Tampa, FL (1993); an MA in Economics (1990), also from USF; an MBA in Finance (1979) from George Mason University in Fairfax, VA; and a BA in Psychology (1972) from the University of Virginia in Charlottesville, VA. He was a full-time assistant professor at the University of Maryland Baltimore County (1993-1996) in Catonsville, MD; a tenured associate professor in the department of Information Systems in the Business College at Virginia Commonwealth University (1996-2001) in Richmond, VA; and an associate professor in the CIS department of the Robinson College of Business at Georgia State University (2001-2010). He is the founder of the Georgia R School (2010-2014) and of R-Courseware (2014-Present), online educational organizations that teach research methods and quantitative analysis techniques. These research methods techniques include linear and non-linear modeling, multivariate methods, data mining, programming and simulation, and structural equation modeling and partial least squares (PLS) path modeling. Dr. Hubona is an expert of the analytical, open-source R software suite and of various PLS path modeling software packages, including SmartPLS. He has published dozens of research articles that explain and use these techniques for the analysis of data, and, with software co-development partner Dean Lim, has created a popular cloud-based PLS software application, PLS-GUI.

Report Abuse