============= Weighted Mean ============= :doc:`/WorkProcessClassifiers/GlobalAlgorithm/index` - :doc:`/WorkProcessClassifiers/OneDimensionalAlgorithm/index` *Weighted Mean* of a data set is similar to the mean, but the values in the data set are weighted differently. The basic formula is stated as follows: .. math:: \mu_{\text{weighted}} = \frac{\sum_{i=1}^{N} w_i \cdot Y_i}{\sum_{i=1}^{N} w_i} \, \text{,} where :math:`Y_i` is the :math:`i`\ th value in the data set, :math:`N` is the length of the data vector and :math:`\mu_{\text{weighted}}` is the weighted mean value. .. rubric:: Input Parameters +--------------------+--------------------------------------------+----------------------------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Constraint | Description | Remarks | +====================+============================================+========================================+=====================================================+====================================================================================================================================================================+ | :math:`Y` | :math:`Y \in \mathbb R^N` | :math:`N \in \mathbb{N}` | Input data vector of length :math:`N` | | +--------------------+--------------------------------------------+----------------------------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :math:`W` | :math:`W \in \mathbb R^N` | :math:`N \in \mathbb{N}` | Input weighting vector of length :math:`N` | If :math:`\sum w_i = 1` \ , the algorithm simplifies to :math:`\mu_{\text{weighted}} = \sum w_i \cdot Y_i` \ . | +--------------------+--------------------------------------------+----------------------------------------+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rubric:: Output Parameters +------------------------------------------------+--------------------------------------------------------------------+------------+------------------------------------------------+--------------------------------------------------------------------------------+ | Parameter | Type | Constraint | Description | Remarks | +================================================+====================================================================+============+================================================+================================================================================+ | :math:`\mu_{\text{weighted}}` | :math:`\mu_{\text{weighted}} \in \mathbb R` | | Weighted mean value of data :math:`Y` | The result is sensitive to improper values such as 'nan', 'inf', 'null', etc. | +------------------------------------------------+--------------------------------------------------------------------+------------+------------------------------------------------+--------------------------------------------------------------------------------+ .. rubric:: Single Steps using the Algorithm * :doc:`/DataPreprocessing/MathematicalComputation/ComputingWeightedMeanValueWithWeightedMean/index` * :doc:`/DataPreprocessing/DataCleaning/HandlingImproperValues/ReconstructingImproperValues/ReconstructingImproperValuesWithLocalCenteredMovingWeightedMean/index`