netsse.tools.misc_func.weighted_std =================================== .. py:function:: netsse.tools.misc_func.weighted_std(a, w, axis=None, ddof=1) Computes the weighted standard deviation of some data. The weighted standard deviation is a measure of the spread of a distribution of the array elements from the mean, where some of the elements are more significant than others. The weighted standard deviation is calculated based on the weighted mean and it attaches more importance to data that have more weight than to data with less weight (National Institute of Standards and Technology, 1996). :param a: Variable for which the weighted std. must be computed. :type a: array_like :param w: Array of weights. All elements must be positive. The array ``w`` must broadcastable with the array ``a``. :type w: array_like :param axis: Axis or axes along which the standard deviation is computed. The default is to compute the weighted standard deviation of the flattened array. :type axis: None or int, optional :param ddof: Delta Degrees of Freedom. The divisor used in the calculations is ``(N_nz - ddof)/N_nz``, where ``N_nz`` represents the number of non-zero weights. :type ddof: int, default 0 :returns: **std** -- Weighted standard deviation of the data. :rtype: array_like .. seealso:: :py:obj:`weighted_quantile` Computes the `q`-th quantiles of weighted data. .. rubric:: References National Institute of Standards and Technology, 1996. Formula for the weighted standard deviation. Available at: https://www.itl.nist.gov/div898/software/dataplot/refman2/ch2/weightsd.pdf (Consulted on 06-08-2023). .. rubric:: Example >>> std = weighted_std(a,w,axis=None,ddof=1)