# Testing mathematical relation in dataset

#### kokosi60

##### New Member
Consider a sample dataset that consists of numbers between 1 and 83 as follows:

List 1:
Code:
[2, 5, 6, 8, 13, 14, 15, 18, 19, 20, 22, 24, 32, 34, 35, 39, 42, 43, 45, 46, 47, 50, 52, 53, 54, 55, 56, 57, 58, 60, 62, 66, 67, 71, 72, 73, 74, 76, 79, 80]
List 2:
Code:
[[1, 2, 72], [30, 76, 79], [9, 18, 74], [24, 28, 55], [2, 16, 49], [8, 64, 73], [29, 38, 58], [48, 56, 69], [7, 12, 14], [17, 34, 76], [16, 23, 46], [35, 60, 70], [33, 66, 80], [36, 59, 66], [68, 70, 75], [28, 60, 71], [10, 80, 81], [52, 67, 68], [12, 22, 47], [20, 39, 78], [25, 50, 78], [3, 6, 52], [27, 54, 58], [4, 32, 57], [6, 48, 65], [37, 40, 74], [14, 15, 30], [20, 51, 64], [19, 38, 56], [13, 26, 34], [40, 46, 61], [11, 22, 54], [18, 31, 62], [5, 10, 32], [24, 44, 53], [26, 44, 63], [4, 43, 62], [50, 72, 77], [21, 36, 42], [8, 42, 45]]
So for each element of List 1 corresponds a list of 3 numbers in list 2, i.e. for 5, the corresponding list is [30,76,79].
The numbers in list 2 are seemingly random, but I need to verify if they are indeed random or if there's any mathematical relation between the numbers in the lists in List2 and those in List 1.
What would the best model to verify this? I have basic knowledge in statistics, I thought to apply something similar to linear regression but I'm not sure how to apply this in this case, or if there's any different statistical function to derive any relation.

#### AngleWyrm

##### Member
Could you model list2 as a set of 3D coordinates and list1 as a value associated with those coordinates?

#### kokosi60

##### New Member
Not sure how this would help, but the sublists in list2 could be n-dimensional..

#### AngleWyrm

##### Member
With 1 dimension it looks to me like finding some function f(x) that results in list1, something plotted in a 2D graph. Maybe a line that passes near the points which minimizes the distance from points to line. But it could be any kind of curve.
With 2 dimensions, it's f(x,y) that results in a 3D surface; still the same problem though.
With 3 dimensions, f(x,y,z) the result is no longer a spatial graph, and the nearest I can comprehend it is as a timeline of some 3D surface, but the process is still mathematically identical: estimating some function f(x,y,z) that approximates list1

Last edited:

#### kokosi60

##### New Member
Ok agree, so the same thing applies if there are n dimensions, to find a function f(x1, x2, ... ,xn) (if exists) that approximates list1.
But let's stay to the 3 dimensions case for now.
What is the correct way to find if such function f exists?

#### hlsmith

##### Less is more. Stay pure. Stay poor.
You gotta tell us where these data are from to better help us figure out things or tell you if a process already exists. That and I kinda want to make sure this isn't some wonky conspiratory hoax, like numbers in the bible.

#### kokosi60

##### New Member
They are generated from the following code in python:

Python:
def generators(n):
s = set(range(1, n))
results = []
for a in s:
g = set()
for x in s:
if g == s:
results.append(a)
return results

p = 83

gens = generators(p)

T = int(p/2)

distr = []

for g in gens:
rlist = []
for r in range(1,p-1):
res = (g**r)%p
if res < 5:
rlist.append(r)
distr.append(rlist)
print("Printing only results with T less than " + str(T))
print(gens)
print(distr)