Re: [PHP] Deviation? Distribution? OT?



I don't think I'm quite following why you wouldn't just want to break it
up into groups of 20....



On 5/1/07, Richard Lynch <ceo@xxxxxxxxx> wrote:

My boss and the web designer have decided to do something that
requires statistical formulae well beyond my statistically-challenged
capabilities, so I'm turning to y'all...

Basically, the current query looks something like this:

select * from
(select whatever, count(*) as popular
from the_table
group by whatever
order by popular desc
limit 100
) as pop
order by rand()

So basically it's the "Top 100" popular, ordered at random

They then want to have the MOST popular stuff with a CSS class="t5"
and the least popular with class="t1"

The t5 are BIG AND BOLD and the t1 are >> tiny and plain << basically,
with t2, t3, and t4 sort of "in between" in bigness and boldness.

The CSS guy has that bit worked out, in terms of style.

I just have to label the dang things t1 to t5, no more, no less.

Now I have NO IDEA what the range is going to be for the "popuplar"
score as time goes on and the site gets super-popular...

So I guess I want some kind of standard deviation thingie among those
Top 100?

I know for sure I don't want just 20 of each t1 through t5.

There are way more t1 than there are t5.

So maybe it's more logarithmic than standard deviation?

Or is there some kind of weighted deviation?

Or maybe it's some other statistical thingie like standard deviation
only not?

All I now for sure is, my current hack of taking log($popular, 3) in
PHP is only going to sort of "work" with our sample data and make them
THINK that it's working, when it's actually quite borked as soon as
the number of data points increases. (I.e., next week or so)

Little help here?

I suspect it's going to turn out to be some magical MySQL statistics
function, but not knowing what "standard deviation" actually *means*
any more, I'm at a loss to guess which one...

I guess I *could* take the results in order without the wrapping
rand() query, do min/max and log games in PHP on the highest/lowest,
and then do a shuffle... But there's got to be a better way.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


Relevant Pages

  • Deviation? Distribution? OT?
    ... order by popular desc ... So I guess I want some kind of standard deviation thingie among those ... PHP is only going to sort of "work" with our sample data and make them ... I suspect it's going to turn out to be some magical MySQL statistics ...
    (php.general)
  • Re: Roulette software statistics
    ... A standard deviation of 28.26 seems very high. ... I have a basic knowledge of maths and statistics but not enough. ... There is talk that some software-based roulette games are not strictly ... green zero is 30.39 with a standard deviation of 28.26 when I play my ...
    (sci.math)
  • Re: negative adjusted r square
    ... > I am reciving a negative adjusted R square when running my regerssion. ... also find that the residual standard deviation is greater than the original ... Whatever statistics you care to look at you can be pretty confident ...
    (sci.stat.math)
  • Re: clarify or clogify? re: Why the human race is growing apart
    ... If we were to divide the population at random into two groups, ... I gather that statistics works differently on your planet. ... swapping two individuals at random is not likely to make the ... 1,000,000 the then the sample mean standard deviation is .01. ...
    (talk.origins)
  • Re: To what lengths will you go to avoid poor quality rolling stock?
    ... It's not possible draw that conclusion from those statistics, as FGW, GNER and MML ... If we assume that the 222s are at least as popular as ...
    (uk.railway)