Thinking about random numbers ........

Source: Internet
Author: User

Yesterday, it rained,

When I went to a company for an interview, it rained out and began to *** it was wet ......

At last, you can see the hexagonal bricks on the ground and the rain falls on the ground ...........

I think the rain points (drops) falling on the square bricks should be evenly distributed. After looking at them for a long time, it seems like this ..........

This reminds me of the random number (pseudo-random number) generated by the computer )... I have seen some people think that the numbers generated in this way are not random, and the simulation results are not good (not in line with the actual situation). Some people use the changes of the solar geomagnetic wave to generate random numbers, is this true random?

For example, coin placement ...... the probability of positive and negative events should be 50%, but in a limited experiment, the number of positive and negative events is usually not the same, is there a relationship between more lab times and such situations? I don't know.) One thing is that, as the number of labs increases, the difference in positive and negative times leads to a larger chance, the ratio is small. Maybe it is like this .....

MATLAB program... <0.5

Rand can get 0, but less than 1, can only be infinitely close to 1

N = 100:100:000000;
Num = length (N );
Err = zeros (1, num );
For I = 1: num
R = rand (1, n (I ));
Morehalf = sum (r <0.5 );
Err (I) = ABS (N (I)-2 * morehalf );
% [N (I), morehalf, n (I)-morehalf, ABS (N (I)-2 * morehalf)]
End
% Plot (n, err, '. R ');
% Hold on
Plot (n, Err./N );

I feel that the small ratio is slow.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.