Chapter 104 Random Simulation
The stochastic simulation method is a way of thinking about the problem, because the conventional method, i.e., the idea of analysis, requires us to consider the relationship of many variables, and the solution of the final equation may be too complex to be possible. So there is a need for new approaches, which are essentially planning, and most of the time inference is made through experience and experimentation, which is really statistical learning. It is not necessary to force the optimal solution, but only to make an unsatisfactory local optimal solution under limited resources. For example, Alpha go uses the Monte Carlo random algorithm.
Stochastic system-sampling-statistical learning, which abstracts a complex multivariate system into a finite state, and then has a random simulation algorithm to calculate it. The mathematical principles behind it include the law of large numbers, the central limit theorem, and so on. Repeating a large number of independent experiments, i.e. simulating all cases, it is theoretically possible to observe the consistency of the sampling with the pattern of the population distribution, which makes it possible to extrapolate large with small and the final average result is mathematically expected.
Frequency is similar to probability, and the principle behind probability can be analyzed through the statistics of sampling, such as the needle method to measure pi. It is also possible to use the stochastic simulation method to calculate the definite integral problem.
Applying the general idea of stochastic simulation, the system is regarded as a change in state (simulating the state of the system), these changes are random and affected by some random factors, so the operating performance index of the system is designed as the amount of the problem that needs to be solved, and the solution is solved through a large number of repeated experiments, which is a different traditional analysis.
In the IPO mode, the input input is a random state, the Progress process is the running logic of the system, that is, the state update, and the output output is the possible prediction. There are certain variables that need to be set to describe the situation of the system, these states need to be quantifiable, and we need to define meaningful statistics. Finally, there is a repeated stochastic simulation to see if there is a stable convergence solution.
In the hidden Markov model, there is a certain probability of occurrence between different states, and these states have the possibility of transfer in the dimension of time, that is, the transition probability matrix.
The axiomatic system of probability theory: 1 is non-negative, the probability is greater than or equal to 0, less than or equal to 1. 2 normality, the sum of probabilities is equal to 1. 3 Columnarily additive, the probability of incompatible events is equal to the sum of the probabilities of the respective events.
There is a sample space, and all event spaces, for each event in the sample space, correspond to a real number P (A), satisfying the following five axioms: 1 The sample space belongs to all event spaces 2 If event A belongs to all event spaces, then the complement = sample space / Event A belongs to all sample spaces 3 If the event Ai belongs to all event spaces and its union also belongs to all event spaces 4 Non-negative and normative 5 Events are incompatible with each other have columnar additivity.
Then, from the basic definitions, various properties are derived: 1 The probability of an impossible event is 0, and the probability of a necessary event is 1. 2 finite incompatibility, additiveness. 3 The probability of an opposing event is equal to 1 - the probability of the event.
The law of large numbers, the average result has a certain stability. The probability of an event can be defined as the limit of the frequency
Objects of uncertainty are described in deterministic language, so random phenomena can only be understood at the statistical level.
The issue of stake distribution needs to take into account all the possibilities and then distribute them according to their respective proportions.
Conditional probability, independent event P(A|B)=P(AB)/P(B)
The full probability formula P(ABi)=P(Bi)P(A|Bi)
Bayesian formula, known results to find the cause, i.e., conditional probability. P(Bi|A)=P(Bi)P(A|Bi)/∑P(Bj)P(A|Bj)
A random variable is essentially a function that maps a particular event to a certain real number, i.e., a probability. There are discrete random variable probability distributions, the former being the discrete probability of a particular event, and the continuous random variable probability distribution, which can be understood using calculus methods such as probability as a high-dimensional function relative to the probability density function (calculus fundamental theorem).
Further, there is the distribution function, where probability distributions have the same properties as probability, such as non-negativity and normativeness.
Binomial distribution C(n,r)p^r(1-p)^(n-r)—Poisson distribution, probability distribution of the number of occurrences of random events per unit time—normal distribution
Mathematical Expectation = Event * Probability
The central limit theorem states that independently distributed random variables can be approximated to obey a standard normal distribution.
Introduction to MATLAB, basic syntax, basic commands, basic statements that are sequential branching loop structures, functional programming ideas, writing various functions to achieve various functions. File-based processing. Visualization, using the software's mapping capabilities.
Matrix operations are features of MATLAB, such as ranking, eigenvalues, matrix factorization, and so on. This is especially true for large-scale matrix operations, which have great applications in machine learning.
Any elementary function can be Taylor expanded as the sum of power series and can be encapsulated into various functions.
Different distributions, discrete uniform/Poisson distributions, continuous uniform/normal/logarithmic distributions, and random number generation.
Simulation programming, initialization of the number of experiments, and then
The core of stochastic simulation, the inverse transformation method and the acceptance-rejection method, can produce random numbers that obey a special distribution. This distribution pattern is actually a high-dimensional model. It's all construction in nature.
Inverse transformation method (let F(X) be a specific one-dimensional probability distribution function): 1. Write the inverse function of the distribution function F-I(x) 2. Generate random numbers u~U(0,1); 3 Calculate x = F-1 (u)
The acceptance-rejection method is actually a constructive density function, which is a high-dimensional primitive function relative to the distribution function, like a series expansion.
Markov model
Statistical mechanics, based on the maximum degree of disorder, i.e., entropy (a measure of uncertainty), relates the statistical laws of the microscopic state of the system with the macroscopic physical quantities. The probability method is used to describe the distribution of a large number of particles in the microscopic state, and the macroscopic eigenquantity of the system is calculated by statistical average
The ensemble method and the Boltzmann distribution and the ISING model to explain the phase transition phenomenon of ferromagnets when the temperature changes, can be regarded as a classifier and a kind of swarm intelligence.
The principle of maximum entropy, the application of the second law of thermodynamics, determines the results of the evolution of thermodynamic systems.
Monte Carlo simulation
Simulate annealing to solve for the global minimum of the objective function.