The standard deviation of AREA ratings gives an indication of the relative skill levels of two games. The game with more skill will have a higher standard deviation. For the standard deviation to be useful in this respect, a game should have a number of players who are rated and have played enough games for their ratings to be relatively accurate.

The 90% low and high values bound the actual standard deviations for which the null hypothesis that the actual standard deviation is the actual standard deviation would not be rejected at the .1 significance level.

EOF # Since there is only one query no transaction isolation setting is needed $result = $conn->exec("select games.gameid, title, stddev(rate)::bigint, count(rate) from games, crate where games.gameid = crate.gameid and frq >= 20 group by games.gameid, title having count(rate) >= 20 order by stddev(rate) desc, lower(title), games.gameid"); if ($result->resultStatus != PGRES_TUPLES_OK) { print << "EOF"; Unable to access the games or crate tables. EOF exit; } if ($result->ntuples <= 0) { print << "EOF"; No games were found. EOF exit; } print "\n\n"; while (@row = $result->fetchrow) { $code = clean(urlencode($row[0])); $title = clean($row[1]); $row[2] = 'Undefined' unless defined $row[2]; $stddev = clean($row[2]); $count = clean($row[3]); $low = 'Undefined'; $high = 'Undefined'; if ($count > 1) { $low = int(.5 + $stddev * sqrt(($count-1)/ Statistics::Distributions::chisqrdistr($count-1,.05))); $high = int(.5 + $stddev * sqrt(($count-1)/ Statistics::Distributions::chisqrdistr($count-1,.95))); } $low = clean($low); $high = clean($high); print "

Standard Deviation for 20+ matches | 90% Low | 90% High | Number of people with 20+ matches | Title |
---|---|---|---|---|

$stddev | $low | $high | $count | $title\n";
}
print < |