473,607 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Falsification of probability

24 New Member
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

Dec 28 '19 #1
8 13472
DANILIN
24 New Member
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
Dec 30 '19 #2
DANILIN
24 New Member
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
Jan 4 '20 #3
DANILIN
24 New Member
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
Jan 5 '20 #4
DANILIN
24 New Member
Developments of several years issued on new year's weekend
received a state certificate of registration of computer system

Research and transformation of sorting of pseudorandom sequences

and formula is fixed on internet N=LOG(1-c)/LOG(1-p)

Abstract includes tables and formulas and graphs
therefore it is possible to publish images of pages


Research and transformation of sorting of pseudorandom sequences
Feb 11 '20 #5
DANILIN
24 New Member
Program for distribution spectra of random
number of consecutive identical features
less \ more and even \ odd

number of numbers depends on seconds
and counts 10 ^ 5 elements per second
and I imagine what will happen in fast languages

Expand|Select|Wrap|Line Numbers
  1. 'datable99.bas
  2.  
  3. RANDOMIZE TIMER
  4. tb = TIMER: s = 0
  5. OPEN "zz99.txt" FOR OUTPUT AS #2
  6. n = VAL(MID$(TIME$, 7, 2)) * 10 ^ 5
  7. DIM b(n), d(n), e(n), f(n)
  8. DIM j(n), k(n), m(n), p(16), q(16)
  9. LOCATE 1, 1: PRINT " THEORY        Average       BIG           EVEN "
  10.  
  11. FOR i = 2 TO n - 1
  12.     b(i) = INT(RND * 900) + 100: s = s + b(i): m = s / i
  13.  
  14.     IF b(i) < m THEN d(i) = 0 ELSE d(i) = 1
  15.     IF (b(i) MOD 2) = 0 THEN j(i) = 0 ELSE j(i) = 1
  16.  
  17.     IF d(i) = d(i - 1) THEN e(i) = e(i - 1) + 1 ELSE e(i) = 0
  18.     IF e(i) = 0 THEN f(i) = e(i - 1) ELSE f(i) = 12
  19.     IF f(i) > 12 THEN f(i) = 12
  20.  
  21.     IF j(i) = j(i - 1) THEN k(i) = k(i - 1) + 1 ELSE k(i) = 0
  22.     IF k(i) = 0 THEN m(i) = k(i - 1) ELSE m(i) = 12
  23.     IF m(i) > 12 THEN m(i) = 12
  24.  
  25.     p(f(i)) = p(f(i)) + 1: q(m(i)) = q(m(i)) + 1
  26.  
  27.     IF (i MOD 1000) = 0 THEN LOCATE 3, 1: PRINT i, " from ", n, INT(100 * i / n); " %", 
  28. NEXT
  29.  
  30. LOCATE 3, 1: FOR t = 1 TO 12
  31.     PRINT INT(n / (2 ^ (t + 1))), INT((p(t - 1) + q(t - 1)) / 2), p(t - 1), q(t - 1)
  32. NEXT
  33.  
  34. te = TIMER
  35. PRINT: PRINT te - tb; "second", INT(n / (te - tb)); " in second  "
  36. PRINT n, " elements ",
  37.  
  38. PRINT #2, te - tb; "second", INT(n / (te - tb)); " in second  "
  39. PRINT #2, n, " elements ",: PRINT #2,
  40.  
  41. PRINT #2,: PRINT #2, " THEORY        Average       BIG           EVEN ": PRINT #2,
  42. FOR t = 1 TO 12
  43.     PRINT #2, INT(n / (2 ^ (t + 1))), INT((p(t - 1) + q(t - 1)) / 2), p(t - 1), q(t - 1)
  44. NEXT
Results:

Expand|Select|Wrap|Line Numbers
  1.  40 second             139555  in second  
  2.  5600000       elements     
  3.  
  4.  THEORY        Average       BIG           EVEN 
  5.  
  6.  1400000       1400610       1399595       1401625 
  7.  700000        700026        700122        699931 
  8.  350000        349716        349508        349925 
  9.  175000        174823        174892        174755 
  10.  87500         87424         87564         87285 
  11.  43750         43837         43931         43744 
  12.  21875         22028         21983         22074 
  13.  10937         10850         10865         10835 
  14.  5468          5481          5496          5466 
  15.  2734          2755          2732          2778 
  16.  1367          1388          1396          1380 
  17.  687           687           687           687 
Practical distributions correspond to theoretical ones
so random sequence is qualitative
and it is possible to study patterns of different sequences

Binomial Logarithmic Integral Pyramidal Distribution
BLIP distribution of Random numbers

Feature of program: index of indixes p(f(i)) & q(m(i))

I think random have problems with parity:
parity of random changes too sharply
Mar 5 '20 #6
DANILIN
24 New Member
Number of consecutive matches is calculated by formula N = log(1-C)/log(1-P),
where N is step, P is probability, C is reliability of probability.

Substituting C and P: N = log(1-0.99)/log(1-0.5) = 6.7 = natural value 7,
that means that 7th step of distribution should include
about 1% of half data, due to counting repetitions and 0 and 1, in amount of 100%.

Distribution step number:
at C = P = 0.5; N = 1 = log0.5/log0.5 = log(1-1/2)/log(1-1/2) = 1
at C = 0.25; P = 0.5; N = 2 = log0.75/log0.5 = log(1-1/4)/log(1-1/2) = 2, etc.

Multiplication of constant probabilities c+p^n = 1
personifies reliability of probability and creates a formula
N = log(1-c)/log(1-p)
c - probability of winning guaranteed
p - probability of winning event.

for example: with a probability of 99% for a probability of 48.65%
number of mismatches in a row n = log(1-0,99)/log(1-0,4865) = 7
and that means about 50% probability is easy to guess 7 times in a row.

it is simpler to calculate by formula N=7+(5*(1/p-2))
for example p = 0.1 N = 47 is normal and p = 0.78 N = 4 is normal
and same formulas are valid for probabilities above 50%.




what I was required to prove
Mar 30 '20 #7
DANILIN
24 New Member
Checking in Wolframalpha

Reliability win and lose
both probability of winning and losing create 4 combinations:

C+p^N=1
(1-C)+p^N=1
C+(1-p)^N=1
(1-C)+(1-p)^N=1

Everything is interchangeable :

C=1-c
c=1-C
P=1-p
p=1-P

Artificial intelligence of Wolframalpha knows logarithm:

solve C+(1-p)^N=1 for N

https://wolframalpha.com/input/?i=so...%5EN%3D1+for+N

Apr 6 '20 #8
DANILIN
24 New Member
Quantum random observe principles of binomial distribution
Feb 24 '23 #9

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

Similar topics

1
2306
by: kpp9c | last post by:
Greetings, I am working on a program to produce patterns. What would like is for it to exhaustively produce all possible permutations of a sequence of items but for each permutation produce variations, and also a sort of stutter based on probability / weighted randomess. Let us say we have tiles of four primary colors: . Now we also have 4 alternatives or substitutes for each color
1
1710
by: Richard Fleming | last post by:
hi, i need to write a probability engine that works out the score in a football match based on player stats, formation, weather etc. I dont even know how to use probability in c..... so please can anygive me any pointers? thanks..
2
2068
by: Andreas Schmitt | last post by:
Hi, Sorry for posting in German before, totally forgot about that when I was pasting this in here from another German newsgroup I was writing to, trying to get help I am programming a simple version of a soccer simulation The logic works like this so far: = constant value goals/game
11
4213
by: Mayank Kaushik | last post by:
hi everyone, im trying to create a function that generates a 1 or a 0, with the probability of a 1 being generated equal to X (which is passed to the function as a parameter). any ideas? thanks in anticipation, Mayank
8
2749
by: Elliot Temple | last post by:
Problem: Randomly generate 10 integers from 0-100 inclusive, and sum them. Do that twice. What is the probability the two sums are 390 apart? I have code to do part of it (below), and I know how to write code to do the rest. The part I have calculates the number of ways the dice can come out to a given number. The problem is the main loop has 9 iterations and it takes about 2.5 minutes to begin the 4th one, and each iteration is about...
3
2022
by: Arun Nair | last post by:
''' Can anyone help me with this program it just takes probability of the first team and runs the program doesnt takes the probability of the second team even though specified''' from random import * def volleySimulation(): printInstructions() probA, probB, n = getInputs() winA, winB = simGames(n, probA, probB)
1
1649
by: coolguyraj | last post by:
I have a PHP and javascript code to take value from two text boxes and calculate on triggering the "OnBlur" function and display in the third box. The code works fine with one line item,If i have more that one line item.i will be able too calculate the value only for the last line item added ,But if i change any of the values in the two boxes from which it takes values.The probablity will not be recalculated. Could anyone help me to fix...
25
5613
TheSmileyCoder
by: TheSmileyCoder | last post by:
I have a table of names, with 2 fields in it, dblProbability and txName, where dblProbabilty is the relative probability that the Name in that row should be selected. How can I get 1 random name from my table, taking into account the probability that it should occur?
1
1614
by: maxg1 | last post by:
I have to formulate this in excel and was wondering if anyone could help me with the formulas. It has also determined that the number of repair claims filed each week is a random variable which can take values 1, 2, 4, 5, 6, 7, 8, 9. The probability of having 1 or 9 claims in a week is equal. The probability that there are 2, 6, 7 or 8 claims in a week is twice the probability of there being a single claim. The probability that there are 4...
0
8472
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8130
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8324
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.