Feeds:
Posts
Comments

Posts Tagged ‘frequency’

Days past due analysis, two condition sum, bucketing data, frequency function

Here I have carried out a days past due (DPD) analysis. This requires organizing data in various days bucket and makes use of conditional sum function.
tip31-conditional-sum

14 cases are presented. Each case has a days past due and a corresponding amount. The objective is to put these numbers in various previously identified buckets

tip31-conditional-sum-result

The days past due is defined as (0,1] which means 0<DPD<=1 and so on. This is re-written as in column F.

To calculate the amount in column G the following formulas are used, where DPD is the array B2:B15

G2 {=SUM(IF((DPD>0)*(DPD<=$F2),C$2:C$15,0))}

G3 {=SUM(IF((DPD>$F2)*(DPD<=$F3),C$2:C$15,0))} which can then be dragged till end of column

Both entered as array formula with ctrl+shift+enter

To count occurences in each DPD bucket the following formulas are used

H2 {=SUM(IF((DPD>0)*(DPD<=$F2),1,0))}

H3 {=SUM(IF((DPD>$F2)*(DPD<=$F3),1,0))} which can then be dragged to end of column

You could also use the frequency function for counting occurences

Enter formula in I2 =FREQUENCY(DPD,F2:F11)

Select I2 to I11, press F2 followed by ctrl+shift+enter

Note that the two conditions entered for summing is akin to using SUMIF with criteria as AND(cond1, cond2). However, AND criteria does not work with SUMIF.

Also one could use nested if to achieve the same result. The above format simplifies nested if through using the following logic

TRUE*TRUE=TRUE

All other permutations give a FALSE result, which is exactly a two condition AND criteria.

Have fun figuring this out 😉

Read Full Post »

The objective is to create a frequency distribution of the data
The given list is in column A
Frequency is to be calculate for data in bins of 0-1, 1-2, 2-3 etc
1. Create bin in Column C {1,2,3,4,5} in above
2. D2:D6 is selected and frequency array formula is entered
{=FREQUENCY(A2:A12,C2:C6)}
Array formula is entered with ctrl+shift+enter
3. The results are displayed in D2:D6

Read Full Post »