Hi, I have a data set which has subsets having duplicate values like this:
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Customer[/TD]
[TD="width: 64"]Score[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.356[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.356[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.245[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.245[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.378[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.425[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.425[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.235[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.235[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.39[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.38[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.39[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.45[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.45[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.51[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.52[/TD]
[/TR]
</tbody>[/TABLE]
I used the formula =STDEV(IF($A$2:$A$34894=A2,$B$2:$B$34894)). But it gives me the same standard deviation value for the entire set.
Can someone please help me with an appropriate formula?
Also, if i have weights for each individual row, is there a formula that can give me a weighted average for each subset?
Thanks in advance!
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Customer[/TD]
[TD="width: 64"]Score[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.253[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.356[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0.356[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.245[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.245[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]0.378[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.425[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.425[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.235[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.235[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.39[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.38[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]0.39[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.45[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.45[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.51[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0.52[/TD]
[/TR]
</tbody>[/TABLE]
I used the formula =STDEV(IF($A$2:$A$34894=A2,$B$2:$B$34894)). But it gives me the same standard deviation value for the entire set.
Can someone please help me with an appropriate formula?
Also, if i have weights for each individual row, is there a formula that can give me a weighted average for each subset?
Thanks in advance!