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

Comparing two datasets for consistent difference?

asked 2021-09-22 16:52:41 -0500

rm2222's avatar

updated 2022-02-07 14:12:16 -0500

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 flag offensive 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

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-01-27 08:12:16 -0500

dbf's avatar

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)

edit flag offensive delete link more

Comments

Yes, this works. Thank you!

rm2222's avatar rm2222  ( 2022-01-27 09:31:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Question Tools

1 follower

Stats

Asked: 2021-09-22 16:13:22 -0500

Seen: 91 times

Last updated: Jan 27