Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page

# 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.

edit retag close merge delete

@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.

( 2021-09-22 21:19:14 -0500 )edit

Sort by ยป oldest newest most voted

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)

more

Yes, this works. Thank you!

( 2022-01-27 09:31:20 -0500 )edit