0
$\begingroup$

I have two datasets: one consists of expected values and the second includes observed values. I want to test the difference between these two datasets.

This is dataset A

 Variable Value

1          0,9
2          1,1
3          292,7
4          71,5
5          47,2
6          62,1
7          22,3
8          12,4
9          22,8
..         ..
60         0,1

This is dataset B

Variable Value

1          0,1
2          2,5
3          274,8
4          71,3
5          46,3
6          62,5
7          22,5
8          12,5
9          22,2
..         ..
60         1,5

What I would like to know is: are these datasets discrete or continuous? The first column can only take integers, while the second column can take any continuous value.

$\endgroup$
2
  • $\begingroup$ Are you using commas as decimal points? In many data formats, this would be ambiguous, because of Comma-Separated Value files. $\endgroup$ – Adrian Keister Jun 9 '20 at 14:50
  • $\begingroup$ decimal points, but I rounded on 1 decimal. $\endgroup$ – Jonathan Jun 9 '20 at 14:53
1
$\begingroup$

I think that you have answered your question.

What you called "Variable" is a discrete variable. Nonetheless, checking that the values are sequential, perhaps is just a row identifier (each row has a value, like the sheets in excel).

Then, what you call "value" might be the response variable, which is continuous.

In brief, if "variable" is a row identifier, your dataset contains continuous data. Otherwise, you have two variables, one discrete and another continuous.

Then, if you want to test the difference between dataset A values and dataset B values you can apply an error metric calculus (to see how far are your estimations from the observed values). Or, you can apply a paired t-test http://www.sthda.com/english/wiki/paired-samples-t-test-in-r, if the hypothesis are fullfilled (to see if they're significantly different).

In addition, what Adrian Keister commented you might be your problem here.

$\endgroup$
8
  • $\begingroup$ Thank you for your reply. The column variable are representing categories, and the second column are driven kilometres. Let's say, the amount of driven kilometres can only be attached to one of the discrete values in the first column. I was thinking about the Kolmogorov Smirnov two sample test. But the requirement is that the two samples tested are continuous. It won't work for discrete data. $\endgroup$ – Jonathan Jun 9 '20 at 14:56
  • $\begingroup$ You could apply an error metric (such as mean squared error or whatever) for each category, so you can see which is your prediction error per categories. On the other hand, if you want to test diferences between dataset A and dataset B taking categories into account, you could apply an ANOVA. $\endgroup$ – Dave Jun 9 '20 at 15:00
  • $\begingroup$ I am aiming to test whether the distributions between the two datasets are significantly different. $\endgroup$ – Jonathan Jun 9 '20 at 15:01
  • $\begingroup$ As I can see, "value" in dataset A is continuous and "value" in dataset B is continuos. Then, you could apply your test. Nonetheless, knowing that they share the same "variable" column, you could apply a en.wikipedia.org/wiki/Wilcoxon_signed-rank_test (which is useful for paired data, and in the end, you're using the same values of "variable"). $\endgroup$ – Dave Jun 9 '20 at 15:03
  • $\begingroup$ I just thought the first column was a hindrance because it is discrete. Let me put it differently, the first column consists of categories of buckets (discrete data) and the second column consists of kilometers driven (continuous data). The driven kilometers can only be assigned to one of these discrete data (buckets). I therefore thought that the Kolmogorov Smirnov does not work because it requires continuous data. If I graph it, the first column would be X axis and the second column would be the Y axis to show the distribution. From that thought I thought it is a discrete data. $\endgroup$ – Jonathan Jun 9 '20 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.