How many bins are created for b4[] = {[79:99],[110:130],140}

Hi

I have a doubt about how many bins are created for the below cover point


bins b4[]  = {[79:99],[110:130],140}

Are 3 bins only created
b[0] for 79:99,
b[1] for [110:130],
b[2] for 140, or
Total (21+21+1)43 bins created ?

and what if it is a fixed bin like


bins b1[3]  = {[79:99],[110:130],140}
bins b1[4]  = {[79:99],[110:130],140}

how these values are spread out among bins?

In reply to SUNODH:

When you have an open bracket set of bins, each range get expanded into a set of individual values with each value getting a bin. b4 creates 43 bins. And if there were duplicate values, they would get removed. In other words only one bin for a particular value gets created.

When you have a fixed size set of bins, the ranges also get expanded into a set of individual values in the order they appear. Duplicate values get retained in the order they appear.

b1[3] would be 3 bins with the first having the first 14 values 79-92, the second getting the next 14 values 93-99 & 110-116, and the third getting the last 15 values 117-130 & 140.

b1[4] would be 4 bins with 10, 10, 10, and 13 values each.

In reply to dave_59:

Hi dave,

if we consider


b1[5] = {[79:99],[110:130],140} :: 8,8,8,8,11 :: b1[1]<79-86>, b1[2]<87-94>, b1[3]<95-99,110-112>, b1[4]<113-120>, b1[5]<121-130,140> :: 5 bins
b2[6] = {[79:99],[110:130],140} :: 7,7,7,7,7,8 :: b1[1]<79-85>, b1[2]<86-92>, b1[3]<93-99>, b1[4]<110-116>, b1[5]<117-123>, b1[6]<124-130,140> :: 6 bins

It implies bins are spread like below
Total no of vaues / bins == integer
for b1 43/5 == 8, b2 43/6 == 7
Is this understanding correct?
Correct me if I am wrong

Thanks

In reply to SUNODH:

For b4, I just calculate it as the below,

b4[4] =
79~88 => 10
89~98 => 10
99, 110~118 =>10
119~128,129,130,140 => 13

Total 43.