Algorithm/Calculation to minimize error in the finding the best curve

mannem_teja

New Member
Joined
Mar 13, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi All!

Please check the workbook below. I am trying to calculate the "Continue Rate" for each month so that the variance between calculated repeating customers and observed repeating customers is as minimum as possible.
Basically the continue rate is defined as 'how many customers in one month will stay as customers in the next month, or the second month and so on'.
So, is there any method to minimise the variance with some constraints such as the continue rate cannot be over 100% or below 0%, the subsequent month cannot have more continue rate than the previous month? For example, the Apr'20 continue rate curve for 2nd month cannot be more than 100%. And similarly the 3rd month's rate cannot be over 97% and so on.

Here is the workbook if you want to take a closer look : algo try v1.xlsx

Any help is appreciated! Thank you.

algo try v1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2Start MonthApr'20
3End MonthMar'22
4
5Apr'20May'20Jun'20Jul'20Aug'20Sep'20Oct'20Nov'20Dec'20Jan'21Feb'21Mar'21Apr'21May'21Jun'21Jul'21Aug'21Sep'21Oct'21Nov'21Dec'21Jan'22Feb'22Mar'22
6Starting Customers Each Month131914981010291520161888261910159181414104
7Observed Repeating Customers2323403235284042776976807168731019297939989837781
8
9Calculated Repeating Customers01230435056637195106122132143145146164175176182181189192196194
10%Variance80%
11
12Continue RateApr'20May'20Jun'20Jul'20Aug'20Sep'20Oct'20Nov'20Dec'20Jan'21Feb'21Mar'21Apr'21May'21Jun'21Jul'21Aug'21Sep'21Oct'21Nov'21Dec'21Jan'22Feb'22Mar'22
131100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%100%
14297%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%97%
15393%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%93%
16490%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%90%
17586%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%86%
18683%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%83%
19779%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%79%
20876%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%76%
21973%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%73%
221069%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%69%
231166%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%66%
241262%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%62%
251359%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%59%
261455%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%55%
271552%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%52%
281648%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%48%
291745%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%45%
301842%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%42%
311938%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%38%
322035%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%35%
332131%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%31%
342228%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%28%
352324%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%24%
362421%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%
Sheet1
Cell Formulas
RangeFormula
C5C5=C2
D5:Z5D5=EDATE(C5,SEQUENCE(,DATEDIF(C2,C3,"M")))
C9:Z9D9=SUM(D40:D62)
C10C10=SUM(C9:Z9)/SUM(C7:Z7)-1
C12C12=C2
D12:Z12D12=EDATE(C5,SEQUENCE(,DATEDIF(C2,C3,"M")))
B14:B36B14=B13+1
Dynamic array formulas.


1647615933777.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,198
Messages
6,123,589
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top