Home > Python > Application in Statistical Mechanics

Ch. 20.2 Generate Different Variate from Uniform Variate

Chapters Index
Program 1

Generate Different Variate from Uniform Variate

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

The Central Limit Theorem (CLT)

The Central Limit Theorem (CLT) is a fundamental theorem in statistics that describes the behavior of the mean of a large number of independent, identically distributed (i.i.d.) random variables. In essence, the CLT states that the distribution of the sample mean approaches a normal distribution as the sample size increases, regardless of the original distribution of the data.

For a uniformly distributed variable \( U(a, b) \), the expected mean value \( \mu \) for a sample size \( n \) is calculated as:

\( \mu = \frac{a + b}{2} \)

Here, \( a = 0 \) and \( b = 10 \), so the expected mean is 5. The mean for each sample will approximate 5 as \( n \) increases.

Program 2

Generate Different Variate from Uniform Variate

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

Box-Muller transform from uniform to normal random series

Program 3

Generate Different Variate from Uniform Variate

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

Exponential variate from uniform variate

Program 4

Generate Different Variate from Uniform Variate

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

Exponential variate from uniform variate

Program 5

Generate Different Variate from Uniform Variate

Python 3.11 Ready

                                
Click "Run Code" to execute script and render figures.

Mathematical Problem Formulation

uniform to normal distribution using central limit theorem