import math


def stats(data):

    """
    Computes basic distribution statistics from the list *data*. Returns
    a tuple ``(m, V, sd, se)`` where *m* is the mean, *V* the unbiased
    variance, *sd* the unbiased standard deviation and *se* the
    unbiased standard error.
    
    .. note::
        Returns a tuple of zeros if data is empty.
    """

    n= len(data)
    if not n: return (0., 0., 0., 0.)
    SUM=0.
    SUM2=0.
    for i in data:
        SUM+=i
        SUM2+=i**2
    m= SUM/n
    v= SUM2/n - m**2
    sd= math.sqrt(math.fabs(v))
    se= sd/math.sqrt(n)
    return (m,v,sd,se)