2

Comparing two datasets for consistent difference?

I have to compare the difference between two datasets made by subtracting four lists w,x,y, and z : w-x and y-z. I have to show that the difference between w and x is in the same range as the difference between y and z. The w-x dataset is 12 data points with an average of 24, and y-z dataset is 365 data points with an average of 27.

How can I statistically compare the two datasets and show that the difference is in the same range?

w and x are lists of monthly electricity demand values and y and z are lists of daily demand. I have to show that the difference between y and z follows a similar trend as the difference between w and x.

rm2222's avatar
53
rm2222
asked 2021-09-22 16:52:41 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2022-02-07 14:12:16 -0500
edit flag offensive 0 remove flag close merge delete

Comments

@rm2222 since this question is more about output analysis than energy modeling tools creating the outputs, this question might be a better fit in a user forum for Python or programming/scripting in general, such as Stack Overflow.

Aaron Boranian's avatar Aaron Boranian (2021-09-22 21:19:14 -0500) edit
add a comment see more comments

1 Answer

3

Use Welch's t-test to test the means of two different samples with unequal sample sizes. The null hypothesis is that both population groups have equal means. It assumes both groups are normally distributed and that both groups have unequal variances (hence it's also called an unequal variances t-test). In Python, you can test it with scipy.stats.ttest_ind(a, b, equal_var=False)

dbf's avatar
46
dbf
answered 2022-01-27 08:12:16 -0500
edit flag offensive 0 remove flag delete link

Comments

Yes, this works. Thank you!

rm2222's avatar rm2222 (2022-01-27 09:31:20 -0500) edit
add a comment see more comments