I have two datasets i am trying to compare and determine if there is a statistical difference between them. I have been exploring different test such as the f-test, t-test, wilcoxon test, chi square test, etc. The datasets are 49 rows by 15 columns. Each column represents a month going from month 1 to month 15. One row represents how the numbers change from month 1 to month 15 for one individual. What i have been doing is aggregating them together into one row and comparing the aggregation against each other. When i plug them as an aggregate, the model is telling me there is no statistical difference. i am wondering if this is the best approach or not.
Below are my results:
<-data1 = 54 8 6 7 2 7 3 5 3 4 7 4 11 6 4
data2 = 51 7 6 2 7 4 5 5 4 4 4 4 5 4 3
f_test <- var.test(data1, data2)
**F test to compare two variances
data: data1 and data2
F = 1.1147, num df = 14, denom df = 14, p-value = 0.8419
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.3742243 3.3201114
sample estimates:
ratio of variances
1.11466 **
t_test <- t.test(data1, data2)
Welch Two Sample t-test
data: data1 and data2
t = 0.2355, df = 27.918, p-value = 0.8155
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-8.212638 10.345972
sample estimates:
mean of x mean of y
8.733333 7.666667
Would it be better to do the testing with the entire dataset against each other? Below is the dataset prior to aggregation.
data1
month1 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 month13 month14 month15
1 2 0 1 1 0 1 0 0 1 1 1 0 2 0 0
2 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0
3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
7 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0
8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 3 1 0 0 0 0 0 0 1 1 1 0 0 0 0
10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0
12 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0
13 1 0 1 0 0 0 0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