randomness is introduced artificially in order to more efficiently search the domain of the objective function monte carlo techniques are also used to optimize noisy functionswhere the function itself is randomfor examplewhen the objective function is the output of monte carlo simulation the monte carlo method dramatically changed the way in which statistics is used in today' analysis of data the ever-increasing complexity of data requires radically different statistical models and analysis techniques from those that were used to years ago by using monte carlo techniquesthe data analyst is no longer restricted to using basic (and often inappropriatemodels to describe data nowany probabilistic model that can be simulated on computer can serve as the basis for statistical analysis this monte carlo revolution has had an impact on both bayesian and frequentist statistics in particularin frequentist statisticsmonte carlo methods are often referred to as resampling techniques an important example is the well-known bootstrap method [ ]where statistical quantities such as confidence intervals and -values for statistical tests can simply be determined by simulation without the need of sophisticated analysis of the underlying probability distributionsseefor example[ for basic applications the impact on bayesian statistics has been even more profoundthrough the use of markov chain monte carlo (mcmctechniques [ mcmc samplers construct markov process which converges in distribution to desired (often high-dimensionaldensity this convergence in distribution justifies using finite run of the markov process as an approximate random realization from the target density the mcmc approach has rapidly gained popularity as versatile heuristic approximationpartly due to its simple computer implementation and inbuilt mechanism to tradeoff between computational cost and accuracynamelythe longer one runs the markov processthe better the approximation nowadaysmcmc methods are indispensable for analyzing posterior distributions for inference and model selectionsee also [ the following three sections elaborate on these three uses of monte carlo simulation in turn monte carlo sampling in this section we describe variety of monte carlo sampling methodsfrom the building block of simulating uniform random numbers to mcmc samplers random number generator generating random numbers at the heart of any monte carlo method is random number generatora procedure that produces stream of uniform random numbers on the interval ( , since such numbers are usually produced via deterministic algorithmsthey are not truly random howeverfor most applications all that is required is that such pseudo-random numbers are statistically indistinguishable from genuine random numbers that are uniformly distributed on the interval ( , and are independent of each otherwe write ~iid ( for examplein python the rand method of the numpy random module is widely used for this purpose