'jaar', 'onderdelen' => 'onderdeel', 'geslachten' => 'geslacht', 'leeftijden' => 'leeftijd' ); $db = mdb2_open($dsn); $prestaties = mdb2_col($db, 0, << $max) $max = $prestatie; $count++; } $mean = $sum/$count; $step = ($max - $min)/7; $log = floor(log($step, 10)-1); $cleanstep = ceil($step/10**$log)*10**$log; if ($_GET['start']) { if (!is_numeric($_GET['start'])) error_user("Syntax", "Start moet numeriek zijn"); if ($_GET['start'] > $min) error_user("Range", "start is too large, should be < $min", 'antwoorden.php'); $min = $_GET['start']; } if ($_GET['step']) { if (!is_numeric($_GET['start'])) error_user("Syntax", "Start moet numeriek zijn"); if ($_GET['step'] < 0) error_user("Range", "step moet positief zijn"); $cleanstep = $_GET['step']; } $counts = array(); $index = 0; for ($i = $min; $i < $max+0.001; $i += $cleanstep) { $counts[$index++] = 0; } $sumsquaredist = 0; foreach ($prestaties as $prestatie) { $sumsquaredist += ($mean - $prestatie)**2; $counts[floor(($prestatie-$min)/$cleanstep)]++; } $sd = (($sumsquaredist/$count)**.5); html_start(); ?>

frequentietabel van van leeftijd bij onderdeel

startwaarde=, stapgrootte=, mean=, sd=

\n"); $index++; } ?>
klassefrequentiecumulatieve frequentierelatieve frequentie (%)relatieve cumulatieve frequentie (%)normal (%)
$i <- ".($i+$cleanstep)."$freq".$cumfreq."".round($relfreq, 1)."".round($relcumfreq, 1)."".round($relcumnormal, 1)."

Chi-squared comparison to normal distribution .

terug naar de antwoorden