Weighted Statistics Class Example
";
print "- Arithmetic Mean
";
print "- The following is the incorrect mean for a weighted data set: ";
print array_sum($inputs)/count($inputs);
print "
- Weighted Mean
";
print "- This is the correct way to perform the mean when the data provided has statistical weights: ";
print $ws->average();
print "
- Standard Deviation
- ";
print $ws->stdev();
print "
- Quartile 1
- ";
print $ws->percentile(25);
print "
- Median
- ";
print $ws->percentile(50);
print "
- Quartile 3
- ";
print $ws->percentile(75);
print "
- Skew
- ";
print $ws->skew();
print "