Recommended randomness tests?

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,462
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hi

I'm working with some values that must appear to be random and should also appear to be random when applying statistical tests. Not being a statistics person myself I'm not sure what tests, if any, i can use. Searching on the 'net I found references to the chi square test but I'm not sure if that is suitable for my sample nor how to use it.

Can someone with a statistics background point me in the right direction? Following is a sample of some of my data - each string is 50 characters long and contains alphanumeric characters.

Sample:
Code:
DOXKBZ1LXITP18BV1CEKTG5BKTC6TACO6CVEHZ56I5ZMJVSIKL
UYYLL7AWYIZNJ75L6HXXLU6SK5Q3DRL0EGCS5SGYX5CR9SJXGG
684Q19PQOHBU2PMB7TSQNREEFWXJOROPQMN7YB7NT884MKUEIL
5KY0QQ9DKJ69B90QSHER0Q81M8CA0VJIXKQYS0UKP5TCCEQ954

If I analyse the frequency of characters in a sample of 75 strings of 50 characters each, I get frequency values ranging from 1.8% to 3.6% - the numbers given are the outliers, most values are between 2.3% and 3.2%. However I think I need to test the 'runs' but am not sure how.....

Thanks in advance for any pointers
Andrew
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi

A lot of that was over my head and I believe the programming language was C, with which I am not familiar. The concepts were useful but I'm not 100% sure if I have applied them correctly. For instance, the runs test was based on two variable values (X's and O's) - I have 10 values (being 0 to 9). A way around this is to convert the values to High/Low values and whilst I can get that aspect going, there is also a third option (i.e. Same) that is not covered by that test. Hence my reason for not being sure about having applied it correctly.

Andrew

P.S. This is one of the values that I am subjecting to the test:

17958342716512576730157498409439523238955671684983792211089761440730099586655030476888947999178200993199818
47899981208555423740442432391084919195525284857431840401697307982823805255325755624137612580910065434604723
48270680598905382953412102183620145400712674398056904409673089339756727837749824700909800748435595389848548
27290744717666401372513696571325603041504631699555950620991314945292407937258473561213189118929780585026157
64803726318155020700712978298372170508197632391822270557409024976550850104279801347925943641304624442098890
93953006533394101795001081280340132975205667332292708729970375567261718823018387813609256856328678217018657
44009278710423203550040676795451506910365058494498788554513780706468956665169418087025470254180442491145430
34775345381814675519044256407361589957524305775560346155985141887543855776611397598963224151607987572402469
30219597653366238935197101992968389465947318960315827146839535830809031878687578641199475197043330151387234
7570530190541913334082563959545137443
 
Last edited:
Thanks Marbles but I couldn't find anything to test randomness on that site.

Thanks anyway
Andrew
 
Hi Erik

I'm not sure I understand. I was using VB6 to do the calculations but I'm not sure if a) I was using the correct calculations and b) that I had correctly applied those calculations. I'm not sure how Excel would help....?

Cheers
Andrew
 
Excel can test - using formulas - how many of each character are terurned by your calculations. I thought that was the main question. But perhaps is was not clear to me? And you would probably have figured out that yourself, or? :oops:
 

Forum statistics

Threads
1,222,682
Messages
6,167,603
Members
452,122
Latest member
Warwick89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top