rmg51 | Morning | 09:25 |
---|---|---|
icey | ahoy | 11:53 |
teddy-dbear | Morning peoples, critters and everything else | 12:21 |
MutantTurkey | waltman: got a minute for a math question? | 13:50 |
MutantTurkey | is 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 column | 13:51 |
waltman | Sorry, I'm confused about what you want to do, and also by what you mean by "a mathematical way". | 14:28 |
waltman | Since it sounds like you know what calculations you want to do, can't you just do them? | 14:30 |
MutantTurkey | waltman: no i wrote the script already, i didn't know if there was a more technical term for what i did | 17:01 |
MutantTurkey | one that was already existing i didn't know about | 17:01 |
MutantTurkey | waltman: not sure if math people have a term for averaging averages | 17:02 |
waltman | Well, for one thing, it wasn't even super clear that's what you were doing. | 17:17 |
waltman | Also, unless those averages are all of the same size, I'm not sure it even makes mathematical sense. | 17:17 |
MutantTurkey | waltman: 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 represents | 20:20 |
MutantTurkey | waltman: 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 average | 20:22 |
MutantTurkey | using 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 |
MutantTurkey | by 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 given | 20:27 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!