By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,730 Members | 1,540 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,730 IT Pros & Developers. It's quick & easy.

Falsification of probability

P: 13
Falsification of probability

exploring possibility of falsification of random
qbasic qb64 programs were created in an hour
and a table using formulas

= CASEBETWEEN(0;1)
= IF (B3 = B2; C2 + 1; 0)
= COUNTIF (C$3: C$55000; D2)
= SUM(E2:E10)
= E2 / E3



idea: fake a 50% chance

results:

research E green pure excel:
randomly distributed naturally

research 0 yellow qb 0:
randomly distributed naturally

research 1 in red qb 1:
explicit fake equal number in a row

research 2 violet qb 2:
smart fake but not all programmed
and skew due to algorithm

Conclusion: identify fake random real

Expand|Select|Wrap|Line Numbers
  1. ' 0.bas
  2. OPEN "0.txt" FOR OUTPUT AS #1
  3. FOR s = 1 TO 50000: PRINT #1, (INT(RND * 1000) MOD 2): NEXT
  4. CLOSE
Expand|Select|Wrap|Line Numbers
  1. ' 1.bas
  2. OPEN "1.txt" FOR OUTPUT AS #1
  3. FOR d = 1 TO 5: FOR s = 1 TO 100
  4. FOR i = 1 TO s: PRINT #1, 1: NEXT
  5. FOR i = 1 TO s: PRINT #1, 0: NEXT
  6. NEXT: NEXT: CLOSE
Expand|Select|Wrap|Line Numbers
  1. ' 2.bas
  2. OPEN "2.txt" FOR OUTPUT AS #1
  3. FOR k = 1 TO 100: FOR s = 1 TO 7
  4. FOR d = 1 TO 2 ^ (7 - s)
  5. FOR i = 1 TO s: PRINT #1, 1: NEXT
  6. FOR i = 1 TO s: PRINT #1, 0: NEXT
  7. NEXT: NEXT: NEXT: CLOSE
sequence fake shuffled
turns into a random sequence

and began to correspond to distributions



and excel more clearly than programs
but c# synthesis programs are possible online

using a random synthesis program
and dividing into small 0 and large 1
synthesized 55000 random and tested

despite normality of number of consecutive 0...7
a larger number in a row is not possible
therefore sequence is worse than usual rnd

Expand|Select|Wrap|Line Numbers
  1. 'rndxx.bas
  2. OPEN "rndxxx.txt" FOR OUTPUT AS #1
  3.  
  4. FOR i = 1 TO 55555: r = Rand
  5.     IF r < 0.5 THEN PRINT #1, 0 ELSE PRINT #1, 1
  6.     'IF r <= 0.5 THEN PRINT #1, 0 ELSE PRINT #1, 1
  7.     'IF r <= 0.7 THEN PRINT #1, 0 ELSE PRINT #1, 1
  8. NEXT: CLOSE
  9.  
  10. FUNCTION Rand: STATIC Seed
  11. x1 = (Seed * 214013 + 2531011) MOD 2 ^ 24
  12. Seed = x1: Rand = x1 / 2 ^ 24
  13. END FUNCTION



in C# randomness is also low-power
I suppose understood by people as supposedly normal

Expand|Select|Wrap|Line Numbers
  1. using System;using System.Linq;
  2. using System.Collections.Generic;
  3. using System.Text.RegularExpressions;
  4. namespace Rextester
  5. { public class Program
  6.     { public static void Main(string[] args)
  7.         { Random rand = new Random();
  8. for (int i = 1; i < 5555; i++)
  9. { var d = rand.Next(2);
  10. if (d<0.5)
  11.     Console.WriteLine("0");
  12.      else Console.WriteLine("1");
  13. }}}}
on-line compiler: https://rextester.com/WXH62544


significant reliable probability: shuffled
that is: 2-sided and that is: integraly probability


Program peretas.bas creates a sequence
random a: 0 and 1 by manual algorithm from Internet

and program creates random d: 0 ... 77777
for shuffling and sorting an array d array a is ordered
and perhaps against repetition it is better to shuffle cards 1000000


Expand|Select|Wrap|Line Numbers
  1. 'peretas.bas
  2. DIM a(55555), d(55555)
  3.  
  4. OPEN "aa.txt" FOR OUTPUT AS #1: OPEN "dd.txt" FOR OUTPUT AS #2
  5. OPEN "aaaa.txt" FOR OUTPUT AS #3: OPEN "dddd.txt" FOR OUTPUT AS #4
  6.  
  7. FOR i = 1 TO 55555: r = Rand: a(i) = INT(r * 2): PRINT #1, a(i): NEXT
  8. FOR i = 1 TO 55555: r = Rand: d(i) = INT(r * 77777): PRINT #2, d(i): NEXT
  9.  
  10. FOR i = 1 TO 55554: FOR j = i TO 55555
  11.         IF d(i) > d(j) THEN SWAP d(i), d(j): SWAP a(i), a(j)
  12. NEXT: NEXT
  13.  
  14. FOR i = 1 TO 55555: PRINT #3, a(i): PRINT #4, d(i): NEXT
  15. CLOSE
  16.  
  17. FUNCTION Rand
  18. STATIC Seed
  19. x1 = (Seed * 214013 + 2531011) MOD 2 ^ 24
  20. Seed = x1
  21. Rand = x1 / 2 ^ 24
  22. END FUNCTION

Theoretical values in Excel Excel via formulas

=C3/2
=D3+C4
=D4*55000

show: out of 55000 for 7 steps covered 54570
numbers in their sequences
and probably deviation betrays a false accident

and shuffling involved 54885 close to theory

Theoretical values in Excel Excel via formulas

https://www.youtube.com/watch?v=YIJmgOTnkTU&t=33

3 Weeks Ago #1
Share this Question
Share on Google+
3 Replies


P: 13
Check for randomness of digits of number of PI

Using 55,000 digits of pi
first in Word translated to column by replacement
Excel compiles formulas for dividing into:
even \ odd and small \ big

and then my tables are used
at same time comparing with theoretical separation

Results: average for both divisions: 0.5
and separation matches chance by true
and itís still possible to shuffle
and itís still possible to explore other constants and roots





Meaning of task: true chance for people is unnatural
and it is possible to synthesize low-power human probabilities

But if we are talking about overcoming chance
understanding wave of probability increases reliability

Probability waves increase reliability:
my development of past 10th anniversary
3 Weeks Ago #2

P: 13
Invented by me at random algorithm of RNG
where is trigonometry used

check shows distribution is bad
comparing even\odd and small\large
but shuffling turns array into a normal one

I came up with an algorithm Blizzard at school
in last century even under old regime and in our century
about same too foreign called vortex

Blizzard algorithm: number 1 is random and is added
random increment and control range
and if necessary controlled repetition of numbers

Expand|Select|Wrap|Line Numbers
  1. 'VYUGA.bas
  2. DIM a(55555)
  3. RANDOMIZE TIMER: CLS
  4. OPEN "VYUGA.txt" FOR OUTPUT AS #1
  5. d=37
  6. a(1) = INT(RND*d)+1
  7. PRINT #1, a(1)
  8. FOR i = 2 TO 55555
  9.     a(i) = a(i-1) + INT(RND*3*d)+1
  10.     22 IF a(i) > d THEN a(i) = a(i)-d: GOTO 22
  11.     PRINT #1, a(i)
  12. NEXT
https://ideone.com/cPYZad
Expand|Select|Wrap|Line Numbers
  1. //VYUGA.cs
  2. using System;using System.Linq;
  3. using System.Collections.Generic;
  4. using System.Text.RegularExpressions;
  5. namespace VYUGA
  6. { public class Program
  7.     { static double w; 
  8.     static void Main(string[] args) 
  9.         { Random rand = new Random();
  10. int d=37;
  11. double s = rand.Next(5000000);
  12. double a = Math.Round(d*s/5000000)+1;
  13. Console.WriteLine(a);
  14.  
  15. for (int i = 1; i < 255; i++)
  16. { w = rand.Next(3000000)+1;
  17. double v = Math.Round(w*d/1000000)+1;
  18. a=a+v;
  19. da: if (a>d) 
  20. { a=a-d; goto da; }
  21. Console.WriteLine(a);}
  22. Console.ReadKey(); }}}
check shows distribution is good
comparing even\odd and small\large

and a Blizzard suddenly makes normal randomness trigonometric

therefore I am looking
for an algorithm of form Mersenne twister c# & qbasic
2 Weeks Ago #3

P: 13
Nearest step: shuffling by weak algorithm
weak randomness is randomness of normal

Sequence is bad
and inserted into Excel in 2 columns at a distance
and to left end-to-end of 2nd column is a column of numbers in a row
and columns are sorted end to end from maximum to minimum

Grouped together: reverse and forward sequences
and then sort both by ordering reverse
sequence is shuffled simultaneously.

Test shows normality of a shuffled
sequences of even\odd and large\small

An automatic algorithm without rnd reads array straight
and immediately there is an array reverse: ... it's a computer ...

Sorting reverse array shuffles forward array
and it turns out sequence is normal

Expand|Select|Wrap|Line Numbers
  1. 'tasov.bas
  2. DIM a(55000), d(55000)
  3. OPEN "aa.txt" FOR INPUT AS #1
  4. OPEN "dd.txt" FOR OUTPUT AS #2
  5.  
  6. FOR i = 1 TO 55000
  7.     INPUT #1, a(i): d(55000 - i + 1) = a(i):NEXT
  8.  
  9. FOR i = 1 TO 54999: FOR j = i TO 55000
  10.         IF d(i) > d(j) THEN SWAP d(i), d(j): SWAP a(i), a(j)
  11. NEXT: NEXT
  12.  
  13. FOR i = 1 TO 55000: PRINT #2, a(i): NEXT: CLOSE


Expand|Select|Wrap|Line Numbers
  1. //tasov.cs
  2. using System; using System.Linq;
  3. using System.Collections.Generic;
  4. using System.Text; using System.IO;
  5. namespace tasov
  6. { class Program
  7.     { static long[] a; static long[] d;
  8.         static void Main(string[] args)
  9.         {a = new long[55500]; d = new long[55500]; 
  10. var inpFile = new StreamReader("aa.txt");
  11. for (int i = 1; i <= 55000; i++) 
  12. { a[i] = Convert.ToInt64(inpFile.ReadLine());
  13. d[55000-i+1] = a[i]; }
  14.  
  15. for (int i = 1; i <= 54999; i++) 
  16. for (int j = i; j <= 55000; j++) 
  17. if (d[i] > d[j])
  18. { var temp = d[i]; d[i] = d[j]; d[j] = temp;
  19. temp = a[i]; a[i] = a[j]; a[j] = temp; }
  20.  
  21. var outFile = new StreamWriter("vv.txt");
  22. for (int i = 1; i <= 55000; i++) 
  23. outFile.WriteLine(a[i]);
  24. Console.ReadKey();}}}
I'm testing the idea: RNG trigonometric

created a bad array that doesn't pass validation
binary even\odd and small\large

therefore, we shuffle equally real in Excel & basic & c#
just using this bad array

means: sequence is weak
shuffled through a sequence of weak
turns into a normal sequence

based on results of this topic
2 Weeks Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.