Wpis z mikrobloga

Po przetworzeniu 1 502 002 241 536 bajtów = 1.50200224 terabajtów (losowo wygenerowanych) komputer wypluł jeden wielki znak zapytania.

Poniżej kilka danych statystycznych. Jest w pytę.

W ogóle metoda Monte Carlo to prosta metoda. Strzelasz losowo w kwadrat w których wpisane jest koło i stosunek ilości punktów które trafiły w koło do ilości wszystkich strzałów razy 4 da nam w przybliżeniu wartość Pi ;)

**Pi ~= 4 * trafienia w koło / wszystkie strzały**

Graficzna reprezentacja tego o czym mówię: https://academo.org/demos/estimating-pi-monte-carlo/

Value Char Occurrences Fraction
0 6008009298850 0.500000
1 6008008633438 0.500000

Total: 12016017932288 1.000000

Entropy = 1.000000 bits per bit.

Optimum compression would reduce the size
of this 12016017932288 bit file by 0 percent.

Chi square distribution for 12016017932288 samples is 0.04, and randomly
would exceed this value 84.78 percent of the times.

Arithmetic mean value of data bits is 0.5000 (0.5 = random).
Monte Carlo value for Pi is 3.141591197 (error 0.00 percent).
Serial correlation coefficient is 0.000000 (totally uncorrelated = 0.0).

Swoją drogą, jeżeli potrzebujesz losowych bitów oto one: https://random.flameit.io

#dev_random #random #matematyka #statystyka #entropia #komputery #programista15k
felixd - Po przetworzeniu 1 502 002 241 536 bajtów = 1.50200224 terabajtów (losowo wy...

źródło: monte-carlo

Pobierz
  • 1
  • 0
@felixd:

ubuntu@fr:~/up$ rngtest < random.bin
rngtest 2.2
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: entropy source exhausted!
rngtest: bits received from input: 12016017932288
rngtest: FIPS 140-2 successes: 600322408
rngtest: FIPS 140-2 failures: 478488
rngtest: FIPS 140-2(2001-10-10) Monobit: 62185
rngtest: FIPS 140-2(2001-10-10)