Check if distribution per week is the same

I have sales by customer (b2b) and by date. I want to check if the distribution per day inside weeks remains the same from week to week.

Initial dataset

Customer Date Sales
Alpha 2019-02-23 527
Beta 2019-02-23 642
Alpha 2019-02-24 776
... ... ...
Beta 2021-07-28 1236

I transformed it into

Customer Week Monday Tuesday Wednesday Thursday Friday Saturday Sunday
Alpha 201906 0.2202 0.15799 0.178202 0.160449 0.1528 0.130214 0.000067
Beta 201906 0.20573 0.183979 0.182207 0.179824 0.140596 0.107601 0.000061
... ... ... ... ... ... ... ... ...
Beta 202130 0.219794 0.181995 0.172113 0.156676 0.151771 0.117579 0.000072

Any ideas on how to tackle this?

Topic hypothesis-testing distribution statistics

Category Data Science


You can create n matrices where n is the number of different products {Alpha, Beta, ...,} then for each different product you group your daily value into weekly so you have something like Product1 : {week_1_sales,...,week_M_sales} with those values you create a confusion squared matrix of dimension MxM with rows and columns week_i_sales and values are the KS statistic (pairwise) so you can see if the distribution of the weekly sales for product changes from one week to another.

You would end with n different matrices with this information. Each individual matrix should look similar to this (just and example in your case rows and columns would be the week id):

enter image description here

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.