1886 views|4 replies

5791

Posts

44

Resources
The OP
 

Programmers make their own epidemic simulation program: The spread of the epidemic is more terrible than you think [Copy link]

This post is from Talking

Latest reply

Normal distribution model: in five steps 1. Define a range, such as 0-2000. Generate a random number Rx, and it can be assumed that the probability of Rx in the range of 0-2000 is balanced. 2. Construct a function, such as the normal function (Gaussian probability function), substitute x=Rx into the function y=f(x) to find the function value Ys, and use cP=Ys/Ymax (the maximum value of the Ymax function). 3. Generate a random number Ry between 0 and Ymax. Compare Ry with cP, if Ry>cP, discard it, if Ry<=cP, Ry is retained and displayed. 4. Repeat this process several times, and the ratio of the total number of cycles Nz to the effective number Ne is the probability that it roughly conforms to the normal distribution. 5. If you want to display it more vividly, you can use a circular pattern. The effective value Ry is the distance from the center of the circle. Rx is the angle of the circumference. Polar coordinates. [attach]458288[/attach]   Details Published on 2020-2-10 10:52
Personal signature

射频【放大器】

 
 

1305

Posts

0

Resources
2
 

In reality, there are more variables and the models are more complex.

This post is from Talking
 
 
 

2865

Posts

4

Resources
3
 

Mathematical models are very complex. The usual simple probability model is the "normal distribution" model. This program does not even do a local diffusion well. It is far from the actual model. The real model requires many parameters. Therefore, some models are very expensive. It costs hundreds of thousands.

This post is from Talking
 
 
 

2865

Posts

4

Resources
4
 

Normal distribution model: in five steps

1. Define a range, such as 0-2000. Generate a random number Rx, and it can be assumed that the probability of Rx in the range of 0-2000 is balanced.

2. Construct a function, such as the normal function (Gaussian probability function), substitute x=Rx into the function y=f(x) to find the function value Ys, and use cP=Ys/Ymax (the maximum value of the Ymax function).

3. Generate a random number Ry between 0 and Ymax. Compare Ry with cP, if Ry>cP, discard it, if Ry<=cP, Ry is retained and displayed.

4. Repeat this process several times, and the ratio of the total number of cycles Nz to the effective number Ne is the probability that it roughly conforms to the normal distribution.

5. If you want to display it more vividly, you can use a circular pattern. The effective value Ry is the distance from the center of the circle. Rx is the angle of the circumference. Polar coordinates.

This post is from Talking
 
 
 

5791

Posts

44

Resources
5
 

So much development means too many variables

This post is from Talking
Personal signature

射频【放大器】

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list