更改

添加861字节 、 2021年7月29日 (四) 19:30
第264行: 第264行:  
==Definitions==
 
==Definitions==
   −
A Monte Carlo method simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including quantum chromodynamics, cancer radiation therapy, traffic flow, stellar evolution and VLSI design.  All these simulations require the use of random numbers and therefore pseudorandom number generators, which makes creating random-like numbers very important.
+
''A Monte Carlo method simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including quantum chromodynamics, cancer radiation therapy, traffic flow, stellar evolution and VLSI design.  All these simulations require the use of random numbers and therefore pseudorandom number generators, which makes creating random-like numbers very important.''
   −
蒙特卡罗方法模拟被定义为任何利用随机数序列来执行模拟的方法。蒙特卡罗模拟被应用于许多主题,包括量子色动力学、癌症放射治疗、交通流、恆星演化和 VLSI 设计。所有这些模拟都需要使用随机数,因此伪随机数生成器非常重要,这使得创建类随机数变得非常重要。
+
''蒙特卡罗方法模拟被定义为任何利用随机数序列来执行模拟的方法。蒙特卡罗模拟应用于许多课题,包括量子色动力学,癌症放射治疗,交通流,恒星进化和超大规模集成电路设计。所有这些模拟都需要使用随机数,因此产生类随机数的伪随机数生成器非常重要。(和维基原文相比多出来的部分)''
    
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name=Ripley>{{harvnb|Ripley|1987}}</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name=Sawilowsky>{{harvnb|Sawilowsky|2003}}</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
 
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name=Ripley>{{harvnb|Ripley|1987}}</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name=Sawilowsky>{{harvnb|Sawilowsky|2003}}</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
    
*Simulation: Drawing ''one'' pseudo-random uniform variable from the interval [0,1] can be used to simulate the tossing of a coin: If the value is less than or equal to 0.50 designate the outcome as heads, but if the value is greater than 0.50 designate the outcome as tails. This is a simulation, but not a Monte Carlo simulation.
 
*Simulation: Drawing ''one'' pseudo-random uniform variable from the interval [0,1] can be used to simulate the tossing of a coin: If the value is less than or equal to 0.50 designate the outcome as heads, but if the value is greater than 0.50 designate the outcome as tails. This is a simulation, but not a Monte Carlo simulation.
 +
*Monte Carlo method: Pouring out a box of coins on a table, and then computing the ratio of coins that land heads versus tails is a Monte Carlo method of determining the behavior of repeated coin tosses, but it is not a simulation.
 +
*Monte Carlo simulation: Drawing <nowiki>''</nowiki>a large number<nowiki>''</nowiki> of pseudo-random uniform variables from the interval [0,1] at one time, or once at many different times, and assigning values less than or equal to 0.50 as heads and greater than 0.50 as tails, is a <nowiki>''</nowiki>Monte Carlo simulation<nowiki>''</nowiki> of the behavior of repeatedly tossing a coin.
 +
 +
对于如何定义蒙特卡洛还没有达成共识。例如,Ripley将大多数概率建模定义为随机模拟,蒙特卡罗保留用于蒙特卡罗积分和蒙特卡罗统计检验。Sawilowsky[54]区分了模拟、蒙特卡罗方法和蒙特卡罗模拟:蒙特卡罗方法是一种可以用来解决数学或统计问题的技术,蒙特卡罗模拟使用重复抽样来获得某些现象(或行为)的统计特性。例如:
    
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of π.  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the Python code below utilizing a SciPy package to generate pseudorandom numbers with the MT19937 algorithm.  Note that this method is a computationally inefficient way to numerically approximate π.
 
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of π.  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the Python code below utilizing a SciPy package to generate pseudorandom numbers with the MT19937 algorithm.  Note that this method is a computationally inefficient way to numerically approximate π.
   −
计算机如何进行蒙特卡罗模拟的一个简单例子是 π 的计算。如果一个正方形包含一个圆,一个点在正方形内被随机选择,那么这个点要么在圆内,要么在圆外。如果这个过程重复多次,圆内的随机点与正方形内随机点总数的比值将近似于圆的面积与正方形面积的比值。由此我们可以估算 pi,如下面的 Python 代码所示,利用 SciPy 包使用 MT19937算法生成伪随机数生成器。注意,这种方法是一种计算效率低下的方法,数值上接近 π。
+
计算机进行蒙特卡罗模拟的一个简单实例是 π 的计算。如果一个正方形包含一个圆,一个点在正方形内被随机选择,那么这个点要么在圆内,要么在圆外。如果这个过程重复多次,圆内的随机点与正方形内随机点总数的比值将近似于圆的面积与正方形面积的比值。由此我们可以估算π,如下面的Python代码所示,利用 SciPy 包使用 MT19937算法生成伪随机数生成器。值得注意的是,这种从数值上近似得到π的方法计算效率低下。
 
  −
*Monte Carlo method: Pouring out a box of coins on a table, and then computing the ratio of coins that land heads versus tails is a Monte Carlo method of determining the behavior of repeated coin tosses, but it is not a simulation.
      
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
596

个编辑