/srv/irclogs.ubuntu.com/2016/03/17/#ubuntu-us-pa.txt

rmg51Morning09:25
iceyahoy11:53
teddy-dbearMorning peoples, critters and everything else12:21
MutantTurkeywaltman: got a minute for a math question?13:50
MutantTurkeyis there a mathematical way to represent this "weighted averages of averages": for all the elements in N array, containing two fields, average and total, (Navg[0] x Ntotal[0]) + (Navg[1] x Ntotal[1]) + ... etc  all divided by total sum of the Ntotal column13:51
waltmanSorry, I'm confused about what you want to do, and also by what you mean by "a mathematical way".14:28
waltmanSince it sounds like you know what calculations you want to do, can't you just do them?14:30
MutantTurkeywaltman: no i wrote the script already, i didn't know if there was a more technical term for what i did17:01
MutantTurkeyone that was already existing i didn't know about17:01
MutantTurkeywaltman: not sure if math people have a term for averaging averages17:02
waltmanWell, for one thing, it wasn't even super clear that's what you were doing.17:17
waltmanAlso, unless those averages are all of the same size, I'm not sure it even makes mathematical sense.17:17
MutantTurkeywaltman: they're not the same size, but i am trying to come up with a closish approximation, by weighting them against how many that avg represents20:20
MutantTurkeywaltman: essentially, we have a cached number of reviews and their average for each category on our website. On a page that contains many categories, my designer wants an overall average. which, would kill performance, so i want to leverage that cach'd average20:22
MutantTurkeyusing just the average itself was giving wonky results, with 3 categorys, Cat A -> avg 1/5 stars, total reviews 1, Cat B avg 4.5starts total reviews 20, Cat C, avg 5.0stars  total reviews 50, just averaging those averages raw gives me ~3.5, when most of the reviews have been very positive, with outliers causing more issues,20:26
MutantTurkeyby normalizing the average somewhat, (1 star * 1 review) + (4.5 star * 20 reviews) + (5.0 star * 50 reviews) / (71 reviews total) = 4.8 stars, somewhat more representative of the reviews given20:27

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!