Class StatisticsHandler

Description

An interface to calculate various statistical information.

  • version: $Id: StatisticsHandler.class.php,v 1.4 2007/09/04 20:25:54 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/utilities/StatisticsHandler.class.php (line 14)


	
			
Variable Summary
mixed $_data
mixed $_max
mixed $_mean
mixed $_median
mixed $_min
mixed $_sortedData
Method Summary
boolean StatisticsHandler (object $data)
float getMax ()
float getMean ()
float getMedian ()
float getMin ()
float getModal ()
float getSecondaryDiscrimination (object $secondData)
boolean _checkdata ()
Variables
mixed $_data (line 16)
mixed $_discrimination (line 19)
mixed $_max (line 19)
mixed $_mean (line 19)
mixed $_median (line 19)
mixed $_min (line 19)
mixed $_sortedData (line 17)
mixed $_standardDeviation (line 19)
Methods
Constructor StatisticsHandler (line 28)

Create a Add a handler with given information.

  • return: Wheter all data is numeric.
  • access: public
boolean StatisticsHandler (object $data)
  • object $data: The object, which contains all the data. It should be provided with methods: next(), getNext() and getSize().
getDiscrimination (line 171)

Return the discrimination value of the data. Discrimination is the difference between the mean value of the top 27% and the mean value of the bottom 27% calculated separately. In the case of test results the discrimination ranges from 0 to 100, so divide the result by 100 before printing.

  • return: The discrimination value of the data.
  • access: public
float getDiscrimination ()
getMax (line 133)

Return the maximum value of the data.

  • return: The maximum value of the data.
  • access: public
float getMax ()
getMean (line 46)

Return the mean value of the data.

  • return: The mean value of the data.
  • access: public
float getMean ()
getMedian (line 65)

Return the median value of the data.

  • return: The median value of the data.
  • access: public
float getMedian ()
getMin (line 151)

Return the minimum value of the data.

  • return: The minimum value of the data.
  • access: public
float getMin ()
getModal (line 104)

Return the modal (most frequent value) of the data.

  • return: The modal (most frequent value) of the data.
  • access: public
float getModal ()
getSecondaryDiscrimination (line 209)

Return the Discrimination of a different set in accordance to the base set.

The function will take the results of the original, calculate who got the top 27% of them and see how these compare to the results of the second data. The same will be done for the bottom 27%, after which the results will be substracted. This should be used if the original data is the overall results of the test and the second set is the results of one particular question.

  • return: The discrimination of the second set in accordance with the first.
  • access: public
float getSecondaryDiscrimination (object $secondData)
  • object $secondData: The data to get the discrimination from. It should have the same number of elements as the original data and The values should be in the same order as the original. Clearly $secondData should either be an array or also have next() and hasNext().
getStandardDeviation (line 84)

Return the standard deviation of the data.

  • return: The standard deviation of the data.
  • access: public
float getStandardDeviation ()
_checkdata (line 244)

Check if all the data is numerically interpretable (only contains numbers and numeric strings)

  • return: Whether all data is float interpretable.
  • access: private
boolean _checkdata ()

Documentation generated on Wed, 19 Sep 2007 10:26:42 -0400 by phpDocumentor 1.3.0RC3